/* WaveCast - Ocean Theme Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-base: #050d18;
  --bg-elevated: #0a1628;
  --bg-overlay: #0f2040;
  --bg-hover: #162a50;
  --accent: #00d4ff;
  --accent-hover: #00eeff;
  --accent-dim: #0099bb;
  --accent-glow: rgba(0, 212, 255, 0.3);
  --accent2: #00ffa3;
  --accent2-glow: rgba(0, 255, 163, 0.2);
  --live-red: #ff3b3b;
  --live-glow: rgba(255, 59, 59, 0.4);
  --text-primary: #e8f4f8;
  --text-secondary: #7fb3c8;
  --text-muted: #3a6278;
  --border: rgba(0, 212, 255, 0.1);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.6);
  --glow-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 50px;
  --font: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: all 0.15s ease;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: 
    radial-gradient(ellipse at 15% 40%, rgba(0,80,200,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(0,212,255,0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 55% 85%, rgba(0,180,150,0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

* { position: relative; z-index: 1; }

::selection {
  background: var(--accent);
  color: var(--bg-base);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Animations */
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--live-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

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

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 20px var(--accent-glow); }
  50% { box-shadow: 0 4px 32px rgba(0,212,255,0.5); }
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  height: 56px;
  background: rgba(5, 13, 24, 0.92);
  backdrop-filter: blur(16px);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.logo span:first-child {
  color: #e8f4f8;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.logo span:last-child {
  color: #00d4ff;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.logo-wave { color: #e8f4f8; font-weight: 700; font-size: 22px; letter-spacing: -0.5px; }
.logo-cast { color: #00d4ff; font-weight: 700; font-size: 22px; letter-spacing: -0.5px; }
.logo-live { 
  background: #ff3b3b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 1px;
  animation: livePulse 2s infinite;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim)) !important;
  color: #050d18 !important;
  text-shadow: none !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent)) !important;
  transform: scale(1.01);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
  color: #050d18 !important;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.btn-ghost {
  background: transparent !important;
  border: 2px solid #00d4ff;
  color: #00d4ff;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

/* Hero Section */
.hero {
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0,100,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(0,212,255,0.08) 0%, transparent 50%),
    linear-gradient(180deg, #050d18 0%, #0a1f3d 60%, #050d18 100%);
  padding: 100px 2rem 6rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 120px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath fill='%23050d18' fill-opacity='1' d='M0,64L48,69.3C96,75,192,85,288,80C384,75,480,53,576,48C672,43,768,53,864,58.7C960,64,1056,64,1152,58.7C1248,53,1344,43,1392,37.3L1440,32L1440,120L1392,120C1344,120,1248,120,1152,120C1056,120,960,120,864,120C768,120,672,120,576,120C480,120,384,120,288,120C192,120,96,120,48,120L0,120Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  pointer-events: none;
}

.hero h1 {
  font-size: 52px;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: white;
  position: relative;
}

.hero p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  line-height: 1.7;
}

.hero .btn {
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
  position: relative;
  margin: 0 0.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* Section Headers */
.section-header {
  padding: 2rem 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* Stream Grid */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 1rem 2rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .stream-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .stream-grid {
    grid-template-columns: 1fr;
  }
}

/* Stream Card */
.stream-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: 1px solid var(--border);
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
}

.stream-card:nth-child(1) { animation-delay: 0.05s; }
.stream-card:nth-child(2) { animation-delay: 0.1s; }
.stream-card:nth-child(3) { animation-delay: 0.15s; }
.stream-card:nth-child(4) { animation-delay: 0.2s; }
.stream-card:nth-child(5) { animation-delay: 0.25s; }
.stream-card:nth-child(6) { animation-delay: 0.3s; }

.stream-card:hover {
  transform: translateY(-6px);
  border: 1px solid rgba(0,212,255,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.25);
  transition: all 0.2s ease;
}

.stream-card {
  transition: all 0.2s ease;
}

.stream-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0a1628, #0f2040);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stream-thumbnail::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.stream-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--live-red);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: livePulse 2s infinite;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.live-badge { animation: livePulse 2s infinite; }

.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.viewer-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  backdrop-filter: blur(4px);
}

.viewer-count::before {
  content: '👁';
  font-size: 0.9rem;
}

.streamer-avatar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stream-info {
  padding: 10px 12px 14px;
}

.stream-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.streamer-name {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 0.5rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.streamer-name:hover {
  color: var(--accent);
}

.category-tag {
  display: inline-block;
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  border: 1px solid rgba(0,212,255,0.2);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer */
footer {
  background: var(--bg-elevated);
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer .logo {
  margin-bottom: 1rem;
  display: inline-block;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  color: var(--text-primary);
  font-size: 24px;
  margin-bottom: 8px;
}

.empty-state .btn-primary {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 32px;
  background: linear-gradient(135deg, #00d4ff, #0099bb);
  color: #050d18;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
}

/* Watch Page Layout */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}

.video-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-section {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  height: calc(100vh - 56px - 2rem);
}

@media (max-width: 1024px) {
  .watch-layout {
    grid-template-columns: 1fr;
  }
  
  .chat-section {
    height: 300px;
  }
}

/* Video Player */
.video-player {
  background: #000;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.video-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.stream-header {
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stream-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.streamer-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: white;
}

.streamer-info h1 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.streamer-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.stream-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.viewer-count-pill {
  background: var(--bg-overlay);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.follow-btn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.follow-btn:hover {
  background: var(--accent);
  color: #050d18 !important;
}

.stream-description {
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

/* Chat */
.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-overlay);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header .viewer-badge {
  background: var(--bg-hover);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--text-secondary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-elevated);
}

.chat-message {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.chat-message:hover {
  background: var(--bg-hover);
}

.chat-username {
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Chat username colors */
.chat-username:nth-child(4n+1) { color: var(--accent); }
.chat-username:nth-child(4n+2) { color: var(--accent2); }
.chat-username:nth-child(4n+3) { color: #10b981; }
.chat-username:nth-child(4n+4) { color: #8b5cf6; }

.chat-username::after {
  content: ':';
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.chat-text {
  color: var(--text-primary);
  font-size: 14px;
  word-wrap: break-word;
  line-height: 1.5;
}

.chat-input {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  background: var(--bg-overlay);
}

.chat-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.15s ease;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-input button {
  background: var(--accent);
  color: #050d18 !important;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}

.chat-input button:hover {
  background: var(--accent-hover);
  color: #050d18 !important;
}

.chat-guest-label {
  text-align: center;
  padding: 0.5rem;
  color: var(--text-muted);
  font-size: 12px;
}

.chat-guest-label a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* Dashboard */
.dashboard-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
}

.video-preview-container {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
}

.video-preview-container.live {
  border: 2px solid var(--live-red);
  box-shadow: 0 0 20px var(--live-glow);
}

.webcam-preview {
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.webcam-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.overlay-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px);
}

.overlay-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.overlay-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
}

.overlay-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.panel {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-overlay);
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.settings-grid {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.viewer-stats-list {
  padding: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.viewer-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg-overlay);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.viewer-stat-item:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateX(2px);
}

.viewer-stat-item:last-child {
  margin-bottom: 0;
}

.viewer-stat-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.viewer-stat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
}

.viewer-stat-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.viewer-stat-metrics {
  text-align: right;
  font-size: 12px;
  color: var(--text-secondary);
}

.viewer-stat-metric {
  margin-bottom: 0.25rem;
}

.viewer-stat-metric span {
  color: var(--accent);
  font-weight: 700;
}

.stream-controls {
  background: var(--bg-elevated);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.15s ease;
  font-weight: 500;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23adadb8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.stream-key-display {
  background: var(--bg-overlay);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
}

.stream-key-display .key {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.stream-key-display button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.stream-key-display button:hover {
  background: var(--bg-hover);
}

.go-live-btn {
  width: 100%;
  padding: 1rem;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim)) !important;
  color: #050d18 !important;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px var(--accent-glow);
  animation: glowPulse 2s infinite;
}

.go-live-btn:hover {
  transform: scale(1.01);
  filter: brightness(1.1);
}

.go-live-btn:active {
  transform: scale(0.99);
}

.end-stream-btn {
  width: 100%;
  padding: 1rem;
  height: 48px;
  background: var(--live-red);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.end-stream-btn:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 20px var(--live-glow);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
}

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

.status-dot.live {
  background: var(--live-red);
  animation: livePulse 2s infinite;
}

.viewer-count-display {
  background: var(--bg-overlay);
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.viewer-count-display .count {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.viewer-count-display .label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.mini-chat {
  background: var(--bg-overlay);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.mini-chat p {
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  font-size: 13px;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-base);
  position: relative;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  background: var(--bg-elevated);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  font-size: 14px;
  position: relative;
}

.tab.active {
  color: var(--text-primary);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.tab:hover {
  color: var(--text-primary);
}

.login-form {
  display: none;
}

.login-form.active {
  display: block;
}

.login-form button {
  width: 100%;
  margin-top: 1rem;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim)) !important;
  color: #050d18 !important;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.login-form button:hover {
  transform: scale(1.01);
  filter: brightness(1.1);
}

.forgot-password {
  text-align: center;
  margin-top: 1rem;
}

.forgot-password a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover {
  color: var(--accent);
}

.error-message {
  background: rgba(235, 4, 0, 0.1);
  color: var(--live-red);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 14px;
  display: none;
  border: 1px solid rgba(235, 4, 0, 0.2);
}

.error-message.show {
  display: block;
}

/* Admin Panel */
.admin-container {
  display: flex;
  padding: 2rem;
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}

.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-size: 14px;
}

.admin-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.admin-nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.admin-main {
  flex: 1;
  min-width: 0;
}

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-search,
.admin-filter {
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.admin-search:focus,
.admin-filter:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-table-container {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  background: var(--bg-overlay);
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
}

.admin-table tr:nth-child(even) {
  background: var(--bg-base);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover {
  background: var(--bg-hover);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  color: white;
}

.role-badge {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.user {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.role-badge.moderator {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.role-badge.admin {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
}

.status-badge {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-badge.banned {
  background: rgba(235, 4, 0, 0.1);
  color: var(--live-red);
}

.status-badge.offline {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.action-btn {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: 0.25rem;
}

.action-btn.ban {
  background: rgba(235, 4, 0, 0.1);
  color: var(--live-red);
}

.action-btn.ban:hover {
  background: var(--live-red);
  color: white;
}

.action-btn.unban {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.action-btn.unban:hover {
  background: #10b981;
  color: white;
}

.action-btn.role {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent);
}

.action-btn.role:hover {
  background: var(--accent);
  color: var(--bg-base);
}

.action-btn.delete {
  background: rgba(235, 4, 0, 0.1);
  color: var(--live-red);
}

.action-btn.delete:hover {
  background: var(--live-red);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-body textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
  }
  
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .admin-nav-btn {
    white-space: nowrap;
  }
  
  .admin-table-container {
    overflow-x: auto;
  }
  
  .admin-table {
    min-width: 600px;
  }
}

/* Settings Page */
.settings-container {
  display: flex;
  padding: 2rem;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);
}

.settings-sidebar {
  width: 200px;
  flex-shrink: 0;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-nav-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-size: 14px;
}

.settings-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.settings-main {
  flex: 1;
  min-width: 0;
}

.settings-tab {
  display: none;
}

.settings-tab.active {
  display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .watch-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .chat-section {
    height: 300px;
  }
  
  .dashboard-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  .hero {
    height: auto;
    padding: 4rem 1rem;
  }
  
  .hero h1 {
    font-size: 32px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  .stream-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  
  nav {
    padding: 0 1rem;
  }
  
  .nav-links {
    display: none;
  }
  
  .logo {
    font-size: 18px;
  }
  
  /* Hamburger menu button */
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
  }
  
  .mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.15s ease;
  }
  
  /* Mobile menu drawer */
  .mobile-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-elevated);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    padding: 2rem;
  }
  
  .mobile-menu.open {
    transform: translateX(0);
  }
  
  .mobile-menu a {
    display: block;
    padding: 1rem 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
  }
  
  .mobile-menu a:hover {
    color: var(--accent);
  }
  
  /* Improved touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .stream-card {
    min-height: 200px;
  }
  
  /* Mobile chat improvements */
  .chat-messages {
    font-size: 14px;
  }
  
  .chat-input input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Mobile dashboard improvements */
  .video-preview-container {
    aspect-ratio: 16/9;
  }
  
  .stream-controls {
    padding: 1.5rem;
  }
  
  .form-group input,
  .form-group select {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Mobile admin panel */
  .admin-container {
    flex-direction: column;
    padding: 1rem;
  }
  
  .admin-sidebar {
    width: 100%;
  }
  
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .admin-nav-btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }
  
  .admin-table-container {
    overflow-x: auto;
  }
  
  .admin-table {
    min-width: 600px;
  }
  
  /* Mobile settings */
  .settings-container {
    flex-direction: column;
    padding: 1rem;
  }
  
  .settings-sidebar {
    width: 100%;
  }
  
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }
  
  .settings-nav-btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }
}

/* Desktop only - hide mobile elements */
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
  
  .mobile-menu {
    display: none;
  }
}

/* Emote Picker */
.emote-picker-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
}

.emote-picker-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.emote-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.5rem;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.emote-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.emote-item:hover {
  background: var(--bg-hover);
}

.chat-emote {
  image-rendering: pixelated;
}

.settings-header {
  margin-bottom: 2rem;
}

.settings-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.settings-content {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  max-width: 500px;
}

.settings-content .form-group {
  margin-bottom: 1.5rem;
}

.settings-content input:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .settings-container {
    flex-direction: column;
  }
  
  .settings-sidebar {
    width: 100%;
  }
  
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .settings-nav-btn {
    white-space: nowrap;
  }
  
  .settings-content {
    max-width: 100%;
  }
}
