:root {
  --bg-color: #090514;
  --card-bg: rgba(20, 12, 38, 0.65);
  --card-border: rgba(168, 85, 247, 0.18);
  --text-primary: #f5edff;
  --text-secondary: #c084fc;
  --color-primary: #a855f7;
  --color-secondary: #581c87;
  --color-success: #10b981;
  --color-danger: #f43f5e;
  --color-warning: #f59e0b;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  background-image: radial-gradient(circle at 50% 50%, #150b2e 0%, #090514 100%);
}


/* Background Glow Elements */
.bg-blur {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
}

.bg-glow-1 {
  background: var(--color-primary);
  top: -100px;
  right: -100px;
}

.bg-glow-2 {
  background: var(--color-secondary);
  bottom: -150px;
  left: -150px;
}

/* Common Layouts */
.hidden {
  display: none !important;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(168, 85, 247, 0.01);
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 8px 32px 0 rgba(168, 85, 247, 0.08), 0 0 25px rgba(168, 85, 247, 0.04);
  border-color: rgba(168, 85, 247, 0.25);
}

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Login Container */
#login-container {
  width: 100%;
  max-width: 420px;
  margin: 20px;
}

.server-logo {
  font-size: 3rem;
  margin-bottom: 15px;
  display: inline-block;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.3));
}

.card-header {
  text-align: center;
  margin-bottom: 30px;
}

.card-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.input-group {
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600;
}

.input-group input {
  background: rgba(8, 11, 17, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.input-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

/* Buttons */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #04060a;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

.btn-success {
  background: linear-gradient(135deg, #00ff87, #60efff);
  color: #04060a;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 135, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ff0844, #ffb199);
  color: var(--text-primary);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 8, 68, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f9d976, #f39c12);
  color: #04060a;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(249, 217, 118, 0.4);
}

.btn-glow {
  position: relative;
}

.error-text {
  color: var(--color-danger);
  font-size: 0.9rem;
  margin-top: 15px;
  text-align: center;
}

/* Dashboard Section */
#dashboard-container {
  width: 100%;
  max-width: 1100px;
  margin: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.3));
}

.nav-brand h2 {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--color-primary), var(--text-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

#logout-btn {
  width: auto;
  padding: 8px 18px;
  font-size: 0.9rem;
}

/* Status badge */
.status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 11, 17, 0.6);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--card-border);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: var(--transition);
}

.status-badge.online .status-dot {
  background: var(--color-success);
  box-shadow: 0 0 10px var(--color-success);
  animation: pulse 2s infinite;
}

.status-badge.offline .status-dot {
  background: var(--color-danger);
  box-shadow: 0 0 10px var(--color-danger);
}

.status-text {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Grid Layout - Two Column Side-by-Side sticky Console layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 25px;
  align-items: start;
}

.dashboard-left {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.dashboard-right {
  position: sticky;
  top: 25px;
  height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-right {
    position: relative;
    top: 0;
    height: auto;
  }
}

.control-card {
  display: flex;
  flex-direction: column;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 25px;
}

.control-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.info-text {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 5px;
  min-height: 20px;
}

/* Resources panel */
.resource-group {
  margin-bottom: 20px;
}

.resource-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-bar {
  background: rgba(8, 11, 17, 0.8);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

.terraria-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 25px;
}

.stat-box {
  background: rgba(8, 11, 17, 0.4);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  text-align: center;
}

.stat-title {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Terminal logs panel */
.terminal-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .terminal-card {
    grid-column: span 1;
  }
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.terminal-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.terminal-body {
  background: rgba(8, 5, 17, 0.85);
  border-radius: 12px;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #f5edff;
  flex: 1;
  height: 100%;
  min-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid var(--card-border);
  margin-bottom: 15px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Custom scrollbar for console */
.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.4);
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

.terminal-input-group {
  display: flex;
  align-items: center;
  background: #020104;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  gap: 10px;
}

.terminal-input-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

.prompt {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.1rem;
}

.terminal-input-group input {
  background: transparent;
  border: none;
  flex: 1;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 10px 0;
}

.terminal-input-group input:focus {
  outline: none;
}

.terminal-input-group button {
  width: auto;
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 135, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(0, 255, 135, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 135, 0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mod Management Styling */
.upload-zone {
  border: 2px dashed rgba(0, 242, 254, 0.3);
  background: rgba(8, 11, 17, 0.4);
  border-radius: 14px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(0, 242, 254, 0.05);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.upload-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.2));
}

.upload-zone p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.upload-progress-container {
  width: 100%;
  margin-top: 10px;
  text-align: left;
}

#upload-status {
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-bottom: 5px;
  display: block;
}

.mods-list-container {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Scrollbar for mods container */
.mods-list-container::-webkit-scrollbar {
  width: 6px;
}
.mods-list-container::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.mods-list-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}
.mods-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.1);
}

.mods-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mods-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(8, 11, 17, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  transition: var(--transition);
}

.mods-list li:hover {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(8, 11, 17, 0.6);
}

.mod-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mod-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.mod-filename {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.no-mods {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 20px;
  background: transparent !important;
  border: none !important;
  justify-content: center !important;
}

/* Toggle Switch Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 24px;
  border: 1px solid var(--card-border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgba(0, 255, 135, 0.2);
  border-color: var(--color-success);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}

/* World Info Box Styling */
.world-info-box {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.world-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.world-meta span {
  color: var(--text-secondary);
}

.world-meta strong {
  font-weight: 600;
  color: var(--text-primary);
}

.world-status-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.world-status-badge.exists {
  background: rgba(0, 255, 135, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(0, 255, 135, 0.2);
}

.world-status-badge.missing {
  background: rgba(255, 8, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(255, 8, 68, 0.2);
}

.btn-delete {
  background: rgba(255, 8, 68, 0.05);
  color: var(--color-danger);
  border: 1px solid rgba(255, 8, 68, 0.2);
}

.btn-delete:hover {
  background: var(--color-danger);
  color: var(--text-primary);
  box-shadow: 0 5px 15px rgba(255, 8, 68, 0.4);
  transform: translateY(-2px);
}

/* Password Meta & Input Styling */
.password-info-box {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--card-border);
}

.password-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.password-meta span {
  color: var(--text-secondary);
  white-space: nowrap;
}

.password-input {
  background: rgba(8, 11, 17, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  flex: 1;
  transition: var(--transition);
}

.password-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn-save {
  width: auto;
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Player Management Styling */
.players-list-container, .banned-list-container {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 15px;
}

.players-list, .banned-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.players-list li, .banned-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(8, 11, 17, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  transition: var(--transition);
}

.players-list li:hover, .banned-list li:hover {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(8, 11, 17, 0.6);
}

.player-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.player-actions {
  display: flex;
  gap: 8px;
}

.btn-kick, .btn-ban, .btn-unban {
  width: auto;
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-kick {
  background: rgba(249, 217, 118, 0.1);
  color: var(--color-warning);
  border: 1px solid rgba(249, 217, 118, 0.2);
}

.btn-kick:hover {
  background: var(--color-warning);
  color: #04060a;
}

.btn-ban {
  background: rgba(255, 8, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(255, 8, 68, 0.2);
}

.btn-ban:hover {
  background: var(--color-danger);
  color: var(--text-primary);
  box-shadow: 0 3px 8px rgba(255, 8, 68, 0.3);
}

.btn-unban {
  background: rgba(0, 242, 254, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.btn-unban:hover {
  background: var(--color-primary);
  color: #04060a;
}

.banlist-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.banlist-section h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ban-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.ban-actions input {
  background: rgba(8, 11, 17, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  flex: 1;
}

.ban-actions input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.ban-actions button {
  width: auto;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.no-players, .no-banned {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 15px;
  background: transparent !important;
  border: none !important;
  justify-content: center !important;
}

/* World Creation Config Panel Styling */
.seed-input-container {
  display: flex;
  gap: 10px;
  width: 100%;
}

.seed-input-container input {
  flex: 1;
}

.btn-roll {
  width: auto;
  padding: 8px 14px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.selector-group {
  margin-bottom: 22px;
}

.selector-group label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
  display: block;
}

.button-selector {
  display: flex;
  gap: 8px;
  width: 100%;
}

.selector-btn {
  flex: 1;
  padding: 10px 14px;
  background: rgba(8, 11, 17, 0.6);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  text-align: center;
}

.selector-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.selector-btn.active {
  background: rgba(168, 85, 247, 0.15);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.btn-save-config {
  margin-top: 10px;
}

/* MOTD Welcome Message Styling */
.motd-info-box {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--card-border);
}

.motd-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.motd-meta span {
  color: var(--text-secondary);
  white-space: nowrap;
}

.motd-input {
  background: rgba(8, 11, 17, 0.8);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  flex: 1;
  transition: var(--transition);
}

.motd-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Cinema Services Styles */
.cinema-layout {
  width: 95%;
  max-width: 1400px;
  margin: 40px auto;
}

.cinema-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 25px;
  margin-top: 25px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cinema-grid {
    grid-template-columns: 1fr;
  }
  
  .cinema-layout {
    margin: 20px auto;
  }
}

.cinema-left, .cinema-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Video Player Card */
.player-card {
  padding: 20px;
}

.movie-title-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: #c084fc;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: #040208;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(168, 85, 247, 0.05);
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  outline: none;
  background: #000;
}

.player-instructions {
  margin-top: 15px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  padding-top: 12px;
}

/* Chat Component */
.chat-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chat-messages-body {
  height: 380px !important;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  background: rgba(8, 11, 17, 0.7) !important;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-family: var(--font-mono);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  scrollbar-width: thin;
  scrollbar-color: var(--color-secondary) rgba(0, 0, 0, 0.2);
}

.chat-messages-body::-webkit-scrollbar {
  width: 6px;
}

.chat-messages-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.chat-messages-body::-webkit-scrollbar-thumb {
  background-color: var(--color-secondary);
  border-radius: 3px;
}

.chat-message {
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-all;
  border-left: 2px solid rgba(168, 85, 247, 0.2);
  padding-left: 8px;
}

.chat-message.chat-me {
  border-left-color: #00ff87;
  background: rgba(0, 255, 135, 0.02);
}

.chat-time {
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: 0.75rem;
  margin-right: 5px;
}

.chat-user {
  color: var(--text-secondary);
  margin-right: 5px;
}

.chat-me .chat-user {
  color: #00ff87;
  text-shadow: 0 0 4px rgba(0, 255, 135, 0.3);
}

.chat-system-message {
  color: var(--color-warning);
  font-style: italic;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
  background: rgba(251, 191, 36, 0.05);
  border-radius: 6px;
  border: 1px dashed rgba(251, 191, 36, 0.15);
  margin: 5px 0;
}

/* Playlist and Upload adjustments */
.playlist-card {
  padding: 20px;
}

.movies-list-container {
  margin-top: 20px;
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(8, 11, 17, 0.4);
}

/* Services nav active button glow */
.services-nav button.active {
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
  border-color: rgba(168, 85, 247, 0.6);
}

.cinema-header-controls {
  display: flex;
  align-items: center;
}

/* Discord Style Layout Redesign */
body.discord-body-reset {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  overflow: hidden;
  background: #313338;
  font-family: 'Outfit', sans-serif;
  background-image: none;
}

body.discord-body-reset::before {
  display: none;
}

.discord-app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #313338;
  color: #dbdee1;
  flex: 1;
}

/* LEFT SIDEBAR: Channels */
.discord-channels-sidebar {
  width: 260px;
  min-width: 260px;
  background: #2b2d31;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.discord-sidebar-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  font-weight: 700;
  color: #ffffff;
  font-size: 1rem;
}

.discord-server-icon {
  font-size: 1.2rem;
}

.discord-channels-scroller {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discord-channel-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.discord-group-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: #949ba4;
  padding: 0 8px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.discord-channel-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #949ba4;
  transition: background 0.15s, color 0.15s;
  font-weight: 500;
}

.discord-channel-item:hover, .discord-channel-item.active {
  background: rgba(255,255,255,0.06);
  color: #dbdee1;
}

.discord-channel-item.active {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

.discord-hash {
  font-size: 1.1rem;
  color: #80848e;
  font-weight: 400;
}

.discord-movies-scroller {
  max-height: 400px;
  overflow-y: auto;
}

.discord-movies-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.discord-movie-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #949ba4;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.discord-movie-item:hover {
  background: rgba(255,255,255,0.04);
  color: #dbdee1;
}

.discord-movie-item.active {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
}

.discord-movie-item.active .discord-movie-title {
  color: #5865f2;
  font-weight: 600;
}

.discord-movie-click-area {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow: hidden;
}

.discord-movie-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-movie-icon {
  font-size: 0.95rem;
}

.discord-movie-delete-btn {
  background: transparent;
  border: none;
  color: #949ba4;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.discord-movie-delete-btn:hover {
  color: #f43f5e;
}

.discord-no-movies {
  padding: 8px;
  font-size: 0.8rem;
  color: #949ba4;
  font-style: italic;
}

.discord-user-panel {
  height: 52px;
  background: #232428;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.discord-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discord-avatar-container {
  position: relative;
  width: 32px;
  height: 32px;
}

.discord-avatar-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #5865f2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.discord-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #232428;
}

.discord-status-dot.online {
  background: #23a55a;
}

.discord-user-details {
  display: flex;
  flex-direction: column;
}

.discord-user-details h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f2f3f5;
  line-height: 1.2;
}

.discord-user-details span {
  font-size: 0.7rem;
  color: #b5bac1;
}

.discord-actions-container {
  display: flex;
  gap: 4px;
}

.discord-upload-icon-btn, .discord-logout-icon-btn {
  background: transparent;
  border: none;
  color: #b5bac1;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.discord-upload-icon-btn:hover, .discord-logout-icon-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #f2f3f5;
}

/* MIDDLE AREA: Video Stage */
.discord-center-stage {
  flex: 1;
  background: #313338;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.discord-stage-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  z-index: 10;
}

.discord-stream-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discord-live-badge {
  background: #f23f43;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.discord-stream-title {
  font-weight: 600;
  color: #f2f3f5;
  font-size: 0.95rem;
}

.discord-badge-btn {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
  border: 1px solid rgba(255,255,255,0.1);
}

.discord-badge-btn:hover {
  background: rgba(255,255,255,0.15);
}

.discord-stage-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.discord-video-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e1f22;
  border-radius: 8px;
  overflow: hidden;
  max-height: calc(100vh - 200px);
}

.discord-video-wrapper {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.discord-video-wrapper video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  outline: none;
}

.discord-drop-zone {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: calc(100% - 200px);
  border: 2px dashed rgba(88, 101, 242, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88, 101, 242, 0.05);
  color: #b5bac1;
  font-size: 1.1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, border-color 0.2s;
  z-index: 100;
}

.discord-drop-zone.dragover {
  opacity: 1;
  pointer-events: auto;
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
  color: #ffffff;
}

.discord-upload-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.discord-upload-progress-card {
  width: 320px;
  padding: 20px;
  background: #2b2d31;
  border: 1px solid rgba(255,255,255,0.06);
}

.discord-voice-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #2b2d31;
  border-radius: 8px;
  padding: 12px;
}

.discord-voice-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: #949ba4;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 6px;
}

.discord-voice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 6px;
}

.discord-voice-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 80px;
}

.discord-voice-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4e5058;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: border-color 0.15s;
}

.discord-voice-user:hover .discord-voice-avatar {
  border-color: #5865f2;
}

.discord-voice-avatar-letter {
  line-height: 1;
}

.discord-voice-speaking-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #2b2d31;
  background: #23a55a;
}

.discord-voice-username {
  font-size: 0.75rem;
  color: #dbdee1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* RIGHT SIDEBAR: Chat */
.discord-chat-sidebar {
  width: 320px;
  min-width: 320px;
  background: #313338;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
  .discord-chat-sidebar {
    width: 100%;
    min-width: 100%;
    height: 320px;
    border-left: none;
    border-top: 1px solid rgba(0,0,0,0.2);
  }
  
  .discord-app {
    flex-direction: column;
  }
  
  .discord-channels-sidebar {
    width: 100%;
    min-width: 100%;
    height: 250px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.2);
  }
}

.discord-chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  z-index: 10;
  gap: 6px;
}

.discord-chat-header h4 {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
}

.discord-chat-desc {
  font-size: 0.75rem;
  color: #949ba4;
  margin-left: 6px;
}

.discord-chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: #2b2d31 #313338;
}

.discord-message-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.discord-message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #5865f2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.discord-message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.discord-message-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.discord-message-author {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9rem;
}

.discord-message-timestamp {
  font-size: 0.7rem;
  color: #949ba4;
}

.discord-message-text {
  font-size: 0.9rem;
  color: #dbdee1;
  line-height: 1.4;
  word-break: break-word;
}

.discord-message-item.system {
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(88, 101, 242, 0.05);
  border-radius: 6px;
  border: 1px dashed rgba(88, 101, 242, 0.15);
}

.discord-system-text {
  font-size: 0.8rem;
  font-style: italic;
  color: #b5bac1;
  text-align: center;
}

.discord-chat-input-area {
  padding: 0 16px 20px 16px;
  background: #313338;
}

.discord-chat-input-area form {
  background: #383a40;
  border-radius: 8px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  height: 44px;
}

.discord-chat-input-area input {
  background: transparent;
  border: none;
  width: 100%;
  color: #dbdee1;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
}

.discord-chat-input-area input::placeholder {
  color: #6d737d;
}

/* Latency (Ping) indicators */
.discord-voice-latency {
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 700;
  margin-top: 2px;
  display: inline-block;
  background: rgba(0, 0, 0, 0.25);
  line-height: 1.2;
}
.discord-voice-latency.ping-good {
  color: #23a55a;
}
.discord-voice-latency.ping-warn {
  color: #f0b232;
}
.discord-voice-latency.ping-bad {
  color: #f23f43;
}






