/* ==============================================================
# Script: css/styles.css
# Purpose: Stylesheet for 3D Solar & Lunar Eclipse Simulator
# Author: Praful Kumar
# Created On: 23/11/2026
# ============================================================== */

:root {
  --bg-dark: #070b14;
  --bg-panel: rgba(15, 23, 42, 0.75);
  --border-panel: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-gold: #fbbf24;
  --accent-cyan: #38bdf8;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
  --glass-blur: blur(16px);
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  user-select: none;
}

#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

/* Header HUD */
.header-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

.brand-title span {
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--accent-gold);
  text-transform: uppercase;
}

/* Mode Switcher Tabs */
.mode-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-btn.active {
  background: var(--accent-indigo);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.mode-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* Header Controls Right */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-panel);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.control-btn.active-toggle {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Telemetry HUD (Left) */
.telemetry-card {
  position: absolute;
  top: 90px;
  left: 16px;
  width: 310px;
  z-index: 10;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.telemetry-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
}

.telemetry-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

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

.metric-value {
  font-weight: 600;
  font-family: monospace;
}

/* Obscuration Bar */
.obscuration-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obscuration-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.obscuration-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #f43f5e);
  transition: width 0.1s linear;
}

/* Phenomena Banner */
.phenomena-box {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--accent-gold);
}

/* Timeline Floating Player (Bottom Center) */
.timeline-panel {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(650px, 92vw);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
  cursor: pointer;
  border: 2px solid var(--accent-gold);
  transition: transform 0.1s;
}

.timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.timeline-time {
  font-size: 0.8rem;
  font-family: monospace;
  font-weight: 600;
  min-width: 65px;
  text-align: right;
  color: var(--text-main);
}

.timeline-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-btn-group {
  display: flex;
  gap: 8px;
}

.view-select {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-panel);
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

/* Footer Component */
.app-footer {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 6px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 95%;
  text-align: center;
}

.footer-author {
  color: var(--text-main);
  font-weight: 500;
}

.footer-author a, .footer-links a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-author a:hover, .footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links .dot {
  color: rgba(255, 255, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-hud {
    padding: 8px 12px;
  }
  .telemetry-card {
    top: auto;
    bottom: 155px;
    width: calc(100% - 32px);
    max-height: 120px;
    overflow-y: auto;
  }
  .timeline-panel {
    bottom: 60px;
  }
}
