:root {
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.5);
  --bg-dark: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.7);
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* Dynamic Background */
.background-animation {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 50%),
              radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 50%);
  animation: bg-shift 10s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.container {
  width: 90%;
  max-width: 600px;
  padding: 40px;
  text-align: center;
}

.host-container, .viewer-container {
  max-width: 1000px;
  padding: 30px;
}

header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

header h1 span {
  color: var(--primary);
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

/* Buttons */
.primary-btn, .secondary-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-btn {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.primary-btn:hover {
  background: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pulse-anim {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--primary-glow); }
  70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Dashboard Layout */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 15px;
}

.dashboard-header h2 {
  font-size: 1.8rem;
}

.dashboard-header h2 span { color: var(--primary); }

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.dot.offline { background: var(--danger); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.dot.online { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }

/* Video Wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin-bottom: 30px;
}

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

.overlay-controls {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

/* Info Panel */
.info-panel {
  text-align: left;
  background: rgba(0,0,0,0.2);
  padding: 20px;
  border-radius: 16px;
}

.info-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--text-muted);
}

.link-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.link-box input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
}

.viewer-count {
  font-weight: 600;
  color: var(--primary);
}

/* Footer */
.site-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: #818cf8;
}
