/* ============================================
   THE LAST PAIDEIA - Dark Cinematic Theme
   Greek / South Indian / Lunar Aesthetic
   ============================================ */

/* CSS Variables */
:root {
  /* Colors - Obsidian & Gold */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-elevated: #0f0f0f;
  
  --text-primary: #e8e6e3;
  --text-secondary: #9a9590;
  --text-muted: #5a5652;
  
  --accent-gold: #c9a227;
  --accent-gold-dim: #8b7019;
  --accent-gold-glow: rgba(201, 162, 39, 0.15);
  --accent-bronze: #cd7f32;
  
  --border-subtle: rgba(201, 162, 39, 0.1);
  --border-active: rgba(201, 162, 39, 0.3);
  
  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Texture Overlay - Lunar Surface Feel */
.texture-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Ambient Glow Effect */
.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  background: radial-gradient(
    ellipse at center,
    var(--accent-gold-glow) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ============================================
   GATE PAGE (Password Entry)
   ============================================ */

.gate-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
}

.gate-content {
  text-align: center;
  max-width: 480px;
  width: 100%;
  animation: fadeIn 1s ease forwards;
}

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

.gate-header {
  margin-bottom: var(--space-xl);
}

.title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

.subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 300;
  font-style: italic;
  color: var(--accent-gold);
  letter-spacing: 0.2em;
}

/* Auth Form */
.auth-section {
  margin-top: var(--space-lg);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-align: center;
  transition: all var(--transition-base);
}

.input-group input::placeholder {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

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

.input-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width var(--transition-base);
}

.input-group input:focus ~ .input-border {
  width: 100%;
}

.enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: transparent;
  border: 1px solid var(--accent-gold-dim);
  color: var(--accent-gold);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
  align-self: center;
}

.enter-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
  box-shadow: 0 0 40px var(--accent-gold-glow);
}

.enter-btn:active {
  transform: scale(0.98);
}

.btn-icon {
  transition: transform var(--transition-fast);
}

.enter-btn:hover .btn-icon {
  transform: translateX(4px);
}

.error-message {
  margin-top: var(--space-md);
  color: #e74c3c;
  font-size: 0.875rem;
  min-height: 1.5em;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.error-message.visible {
  opacity: 1;
}

.access-info {
  margin-top: var(--space-xl);
  text-align: center;
}

.access-text {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.contact-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.email-input {
  width: 180px;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  transition: all var(--transition-base);
}

.email-input::placeholder {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.email-input:focus {
  outline: none;
  border-color: var(--accent-gold-dim);
}

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
}

.send-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn svg {
  width: 14px;
  height: 14px;
}

/* Loading State */
.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.loading-ring {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* Footer */
.gate-footer {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
}

.decorative-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-gold-dim),
    transparent
  );
}

/* ============================================
   PLAYER PAGE
   ============================================ */

.player-page {
  background: var(--bg-primary);
}

.player-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
}

.player-header {
  text-align: center;
  padding: var(--space-lg) 0;
  animation: fadeIn 0.8s ease forwards;
}

.player-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.player-title sup {
  font-size: 0.4em;
  vertical-align: super;
  margin-left: 2px;
  opacity: 0.6;
}

.player-subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 300;
  font-style: italic;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
}

/* Video Tabs */
.video-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.video-tab {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.5vw, 0.875rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.video-tab:hover {
  border-color: var(--accent-gold-dim);
  color: var(--text-secondary);
}

.video-tab.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

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

/* Video Wrapper */
.video-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeIn 1s ease 0.3s forwards;
  opacity: 0;
}

.video-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    ellipse at center,
    var(--accent-gold-glow) 0%,
    transparent 60%
  );
  pointer-events: none;
  opacity: 0.6;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.video-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-secondary);
  z-index: 10;
}

.video-loading.hidden {
  display: none;
}

#video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Custom Video Controls Styling */
video::-webkit-media-controls-panel {
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-fullscreen-button {
  filter: sepia(1) hue-rotate(10deg) saturate(0.8);
}

/* Error State */
.video-error {
  text-align: center;
  padding: var(--space-xl);
}

.error-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.retry-btn {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: 1px solid var(--accent-gold-dim);
  color: var(--accent-gold);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
}

.retry-btn:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* Player Footer */
.player-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
}

.player-contact {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.player-contact a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.player-contact a:hover {
  color: var(--accent-gold-dim);
}

.disclaimer {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.6;
  max-width: 400px;
  text-align: center;
  line-height: 1.5;
}

.about-btn {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
}

.about-btn:hover {
  border-color: var(--accent-gold-dim);
  color: var(--accent-gold-dim);
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: var(--space-xl);
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: modalFadeIn 0.3s ease;
}

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

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: var(--space-xs);
  transition: color var(--transition-fast);
}

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

.modal-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: var(--space-lg);
  border-radius: 50%;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

.modal-title sup {
  font-size: 0.5em;
  vertical-align: super;
  margin-left: 2px;
  opacity: 0.7;
}

.modal-statement {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.modal-contact a {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-gold-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.modal-contact a:hover {
  color: var(--accent-gold);
}

.exit-btn {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  :root {
    --space-xl: 2rem;
    --space-2xl: 4rem;
  }
  
  .gate-content {
    padding: var(--space-md);
  }
  
  .video-container {
    border: none;
  }
  
  .player-container {
    padding: var(--space-md);
  }
  
  .video-wrapper {
    margin: 0 calc(-1 * var(--space-md));
  }
}

@media (max-width: 480px) {
  .title {
    letter-spacing: 0.05em;
  }
  
  .subtitle {
    letter-spacing: 0.1em;
  }
  
  .enter-btn {
    width: 100%;
    padding: var(--space-md);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--accent-gold);
  color: var(--bg-primary);
}


