/* Updated style.css */

/* Import Dogica font */
@font-face {
  font-family: 'Dogica';
  src: url('dogica.ttf') format('truetype');
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  font-family: 'Dogica', Arial, sans-serif;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  font-size: 13px;
}

/* Popup Notification */
.popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(17,17,17,0.95);
  border: 1px solid #fff;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 2000;
}
.popup.show {
  opacity: 1;
}
/* Custom style for invalid credentials popup */
.popup.invalid {
  border: 2px solid red;
  color: red;
}

/* Confirm Popup */
.confirm-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #111;
  border: 1px solid #fff;
  padding: 20px;
  border-radius: 8px;
  z-index: 3000;
  display: none;
}
.confirm-popup.show {
  display: block;
}
.confirm-popup button {
  margin: 5px;
  padding: 6px 10px;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #222;
  color: #fff;
  cursor: pointer;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.modal-overlay.show {
  display: flex;
}
.modal-content {
  background: #111;
  border: 1px solid #fff;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
}
.modal-content textarea {
  width: 100%;
  height: 100px;
  background: #222;
  border: 1px solid #fff;
  color: #fff;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  resize: vertical;
}
.modal-content button {
  background: #333;
  color: #fff;
  border: 1px solid #fff;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Containers */
.auth-container, .profile-container, .admin-container {
  max-width: 400px;
  margin: 60px auto;
  padding: 20px;
  border: 1px solid #fff;
  border-radius: 8px;
}

/* Custom Inputs & Buttons (black & white theme) */
input[type="text"],
input[type="password"],
textarea {
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  padding: 6px;
  border-radius: 4px;
  margin-bottom: 10px;
}
button, 
#send-btn,
.custom-file-upload {
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* File Preview Container (for chat and pfp) */
.file-preview-container {
  display: flex;
  overflow-x: auto;
  margin-bottom: 8px;
}
.file-preview-container img {
  max-width: 100px;
  max-height: 100px;
  margin-right: 8px;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: transparent;
  position: relative;
  z-index: 100;
}
.dropbtn {
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
}
.dropbtn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 6px;
}
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #222;
  min-width: 100px;
  box-shadow: 0 0 8px #fff;
  z-index: 1;
  border-radius: 8px;
}
.dropdown-content a {
  color: #fff;
  padding: 6px 10px;
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
}
.dropdown-content a:hover {
  background: #333;
}
.dropdown-content.show {
  display: block;
}

/* Admin Panel Button (positioned between Members and Username dropdown in index.html) */
#admin-panel-btn {
  display: inline-block;
}

/* Members Sidebar (Discord-style) */
#members-list {
  position: fixed;
  top: 60px;
  right: 0;
  width: 200px;
  max-width: 80%;
  background: rgba(0,0,0,0.9);
  border: 1px solid #fff;
  border-radius: 8px 0 0 8px;
  padding: 10px;
  font-size: 13px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 100;
}
#members-list.show {
  transform: translateX(0);
}
#members-list h3 {
  margin-bottom: 6px;
  text-align: center;
}
#members-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#members-ul li {
  margin: 4px 0;
}

/* Smaller Members Button */
#members-toggle-btn {
  font-size: 12px;
  padding: 2px 4px;
  border: 1px solid #fff;
  background: #111;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  max-width: 60px;
}

/* Splash Screens */
.splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#loading-intro p {
  font-size: 1.2rem;
  margin: 0;
}

/* Room Selection Cards (Main Page) - made bigger, wider, and no overflow */
#room-selection {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.room-card {
  background: #111;
  border: 1px solid #fff;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  width: 220px;  /* increased width */
  height: 180px; /* fixed height */
  overflow: hidden; /* prevent content spill */
  transition: transform 0.3s;
  cursor: pointer;
}
.room-card:hover {
  transform: scale(1.05);
}
.room-logo {
  font-size: 48px;
  margin-bottom: 10px;
  overflow: hidden;
}
.room-label {
  font-size: 18px;
  margin-bottom: 8px;
  overflow: hidden;
}

/* Admin Chatroom Cards (in admin.html) */
.chatroom-card {
  background: transparent;
  border: 1px solid #fff;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  margin-bottom: 10px;
  color: #fff;
}

/* Chat Interface */
#chat-interface {
  padding: 15px;
  position: relative;
  border-radius: 8px;
}
header h1 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 8px;
}
#chat-messages {
  height: calc(100vh - 220px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #fff;
  background: rgba(0,0,0,0.7);
  margin-bottom: 10px;
  border-radius: 8px;
}
.message {
  margin: 4px 0;
  font-size: 12px;
  word-wrap: break-word;
  white-space: normal;
  background: rgba(255,255,255,0.1);
  padding: 4px;
  border-radius: 8px;
  position: relative;
}
.message-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.message-pfp {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.message-sender {
  font-weight: bold;
  font-size: 13px;
}
.rank-label {
  color: red;
  font-size: 11px;
}
.rich-tag {
  color: yellow;
  font-size: 10px;
  font-weight: bold;
  margin-right: 4px;
  animation: shine 2s infinite alternate;
}
@keyframes shine {
  from {
    text-shadow: 0 0 5px yellow;
  }
  to {
    text-shadow: 0 0 20px yellow;
  }
}
.message-time {
  margin-left: auto;
  font-size: 10px;
  color: #ccc;
}
.message-content {
  padding-left: 30px;
}
.edited-label {
  font-size: 10px;
  color: #aaa;
  margin-left: 4px;
}

/* Message Options Menu */
.message-options {
  display: none;
  cursor: pointer;
  font-size: 16px;
}
.message-menu {
  position: absolute;
  background: #000;
  border: 1px solid #fff;
  border-radius: 4px;
  padding: 5px;
  font-size: 12px;
  z-index: 50;
}
.message-menu div {
  padding: 4px 8px;
  cursor: pointer;
}
.message-menu div:hover {
  background: #333;
}

/* Chat Controls */
#chat-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
#chat-controls label.custom-file-upload {
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 13px;
  margin: 8px 0;
}
#chat-controls input[type="text"] {
  flex: 1;
  padding: 6px;
  font-size: 13px;
  border-radius: 8px;
}
#chat-controls button.send-btn {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  max-width: 80px;
}

/* Background & VHS Glitch Effect */
:root {
  --bg-url: url('bg1.gif');
}
body {
  background-image: var(--bg-url);
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bg-url);
  background-size: cover;
  filter: contrast(1.2) saturate(1.5) hue-rotate(10deg) brightness(1.1);
  opacity: 0.3;
  pointer-events: none;
  animation: glitch 3s infinite;
}
@keyframes glitch {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0, 0); }
}

/* Snowfall Canvas */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
  }
  #chat-messages {
    height: calc(100vh - 180px);
  }
  #members-list {
    width: 100px;
    top: 50px;
    right: 5px;
  }
}
