/* Hoell Format Theme - LordStream */

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* CSS Variables */
:root {
  /* Deep backgrounds */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;

  /* Gradient colors (nx-gradient) */
  --gradient-start: #6366f1;    /* Indigo */
  --gradient-mid: #8b5cf6;      /* Purple */
  --gradient-end: #a855f7;      /* Violet */

  /* Accent colors */
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;

  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Status colors */
  --live-red: #ef4444;
  --success-green: #22c55e;
  --warning-yellow: #eab308;

  /* Glass effect */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 12px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body.hoell-dark {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Gradient background effect */
body.hoell-dark::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50vh;
  background: radial-gradient(
    ellipse at top,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

/* Container */
.app-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 1024px) {
  .app-container {
    padding: 2rem;
  }
}

/* Glass Effects */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.glass-gradient {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.05)
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

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

.header-logo img {
  height: 40px;
  width: auto;
}

.header-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Live indicator */
.live-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 9999px;
  color: var(--live-red);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--live-red);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Viewer count */
.viewer-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.875rem;
}

.viewer-count-icon {
  font-size: 1.1em;
}

.viewer-count-number {
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Main Content Grid */
.main-content {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr 380px;
  }
}

@media (min-width: 1440px) {
  .main-content {
    grid-template-columns: 1fr 420px;
  }
}

/* Player Section */
.player-section {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
}

/* Video container with aspect ratio */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-container.vertical {
  aspect-ratio: 9/16;
  max-width: 400px;
  margin: 0 auto;
}

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

/* Player overlay */
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  pointer-events: none;
}

.player-overlay > * {
  pointer-events: auto;
}

/* Top bar */
.player-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* Stream Toggle Buttons */
.stream-toggle {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.toggle-btn.active {
  color: var(--text-primary);
  background: var(--gradient-start);
}

/* Loading state */
.loading-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Loading spinner */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--gradient-start);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Offline message */
.offline-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 3rem;
  text-align: center;
}

.offline-icon {
  width: 80px;
  height: 80px;
  background: var(--glass-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.offline-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.offline-subtitle {
  color: var(--text-secondary);
  max-width: 300px;
}

/* Chat Section */
.chat-section {
  display: flex;
  flex-direction: column;
  height: 600px;
  max-height: 80vh;
}

@media (min-width: 1024px) {
  .chat-section {
    height: auto;
    max-height: none;
    min-height: 500px;
    align-self: stretch;
  }
}

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

.chat-header h2 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Platform badges */
.platform-badges {
  display: flex;
  gap: 0.5rem;
}

.platform-badge {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.platform-badge.active {
  opacity: 1;
}

/* Chat embed container */
.chat-embed {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.chat-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.slide-up {
  animation: slideUp 0.4s ease-out;
}

/* Glow effect for live elements */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--live-red),
                0 0 10px var(--live-red),
                0 0 15px var(--live-red);
  }
  50% {
    box-shadow: 0 0 10px var(--live-red),
                0 0 20px var(--live-red),
                0 0 30px var(--live-red);
  }
}

.glow-live {
  animation: glow 2s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .header-status {
    width: 100%;
    justify-content: center;
  }

  .player-top-bar {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}
