/* Reset & base */
body {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  background: #111 url(./images/dark-bg.jpg) no-repeat center center fixed;
  background-size: cover;
  color: #ccc;
  padding-top: 60px; /* space for fixed menu */
  
}

/* Top navigation */
.top-menu {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  padding: 10px 0;
}
.top-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.top-menu li {
  display: inline-block;
  margin: 0 15px;
}
.top-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}
.top-menu a i {
  margin-right: 6px;
}
.top-menu a:hover {
  color: #ffd700;
}

/* Frosted card boxes */
.frosted-box {
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-width: 1200px;
  text-align: center;
}
.frosted-box h2, .frosted-box h3 {
  margin-top: 0;
  color: #fff;
}

/* Buttons */
button {
  margin: 8px;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: #666;
  color: #fff;
  transition: background 0.2s ease;
}
button:hover {
  background: #555;
}

/* Catalog grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 20px;
}
.catalog-card {
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
}
.catalog-card img {
  width: 100%;
  aspect-ratio: 6 / 9;
  object-fit: cover;
  border-radius: 6px;
}
.catalog-card h4 {
  margin: 10px 0 5px;
  font-size: 14px;
  color: #fff;
}
.catalog-card p {
  font-size: 12px;
  color: #ccc;
}

/* "NEW" badge */
.new-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Search + filter form */
.catalog-search {
  text-align: center;
  margin-bottom: 15px;
}
.catalog-search input[type="text"],
.catalog-search select {
  padding: 10px;
  margin: 5px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  backdrop-filter: blur(6px);
}
.catalog-search input[type="text"]::placeholder {
  color: #ddd;
}
.catalog-search select option {
  background: #333;
  color: #fff;
}
.catalog-search button {
  margin: 8px;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: #666;
  color: #fff;
  transition: background 0.2s ease;
}
.catalog-search button:hover {
  background: #555;
}

/* Pagination links */
.pagination {
  text-align: center;
  margin-top: 20px;
}
.pagination a,
.pagination strong {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}
.pagination a:hover {
  background: rgba(255,255,255,0.3);
}
.pagination strong {
  background: #ffd700;
  color: #000;
}

/* Chat room container - adjusted for fixed size and scrolling */
.chat-box {
  height: 400px; /* Fixed height to prevent growing */
  overflow-y: auto; /* Enable scrolling inside */
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  /* Remove flex: 1; to prevent it from expanding */
  /* Keep min-height: 0; if you have flex layout outside this, but here it's not needed */
}

/* Each message bubble */
.chat-box p {
  background: rgba(255,255,255,0.15);
  padding: 8px;
  border-radius: 6px;
  margin: 5px 0;
  text-align: left;
  display: flex;
  align-items: center;
}

/* Message avatar */
.chat-box p .msg-avatar {
  flex-shrink: 0;
  margin-right: 10px;
}
.chat-box p .msg-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* Username styling */
.chat-box strong {
  color: #fff;
}

/* Timestamp styling */
.chat-box span {
  font-size: 0.8em;
  color: #aaa;
  margin-left: 5px;
}

/* Chat input field */
form input[type="text"] {
  padding: 8px;
  border-radius: 6px;
  border: none;
}

/* Send button */
form button {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: #444;
  color: #fff;
  cursor: pointer;
}
form button:hover {
  background: #666;
}

/* Footer */
footer {
  width: 100%;
  padding: 15px 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  text-align: center;
  clear: both;
  box-sizing: border-box;
  margin-top: 40px;
}
footer .footer-inner {
  display: block;
  text-align: center;
}
footer p {
  margin: 0;
  font-size: 14px;
}
footer i {
  color: #e74c3c;
  font-size: 16px;
}

/* Chat layout and structure */
.chat-layout {
  flex: 1;
  display: flex;
  gap: 20px;
  overflow: hidden;
}

.chat-sidebar {
  width: 250px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 15px;
  color: #fff;
  overflow-y: auto;
}
.chat-sidebar h3 {
  margin-top: 0;
  font-size: 1.2em;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

/* User row in sidebar */
.user-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.avatar {
  flex-shrink: 0;
  margin-right: 10px;
}
.avatar img {
  width: 100px;   /* bigger avatar */
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}
.user-info span {
  font-size: 0.8em;
  color: #aaa;
}

/* Online dot */
.online-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #0f0;
  border-radius: 50%;
  margin-left: 6px;
}

/* Adjustments for main chat area */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Make chat box fixed height for scrolling */
.chat-panel .chat-box {
  height: 400px; /* fixed height to prevent expanding */
  overflow-y: auto; /* scroll inside */
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  /* Remove flex: 1 to prevent growth */
}

/* Input bar pinned at bottom */
.chat-input {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}
.chat-input input[type="text"] {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
}
.chat-input button {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: #444;
  color: #fff;
  cursor: pointer;
}
.chat-input button:hover {
  background: #666;
}

/* Page setup */
body, html {
  height: 100%;
  margin: 0;
}