/* ==============================================================================
   WebLab STEM - Science Game Portal Stylesheet
   Theme: Cyberpunk Sci-Fi & STEM Gold / Physics Blue
   ============================================================================== */

:root {
  --game-primary: #f59e0b;
  --game-primary-glow: rgba(245, 158, 11, 0.25);
  --game-primary-hover: #d97706;
  --game-cyan: #06b6d4;
  --game-cyan-glow: rgba(6, 182, 212, 0.25);
  --game-bg-card: rgba(15, 23, 42, 0.85);
  --game-border: rgba(245, 158, 11, 0.22);
}

/* Hero Section */
.game-hero-section {
  padding: 3rem 1.5rem 2rem;
  background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 65%),
              radial-gradient(circle at 80% 40%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
              var(--bg-body, #0a0f1d);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.game-hero-container {
  max-width: 1200px;
  margin: 0 auto;
}

.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid var(--game-primary);
  border-radius: 9999px;
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 15px var(--game-primary-glow);
}

.game-hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.game-hero-title .game-gradient {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary, #94a3b8);
  max-width: 820px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

/* Quick Stats Bar */
.game-stats-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.game-stat-card {
  background: var(--game-bg-card);
  border: 1px solid var(--game-border);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  backdrop-filter: blur(8px);
}

.game-stat-card .stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fbbf24;
  font-family: monospace, sans-serif;
}

.game-stat-card .stat-lbl {
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Interactive Player Container */
.game-player-section {
  max-width: 1300px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.game-player-card {
  background: #090d16;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.15);
  position: relative;
  contain: paint;
  transform: translateZ(0);
}

.game-player-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.game-player-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fbbf24;
}

.game-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.game-player-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.game-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary, #f8fafc);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.game-action-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
  transform: translateY(-1px);
}

.game-action-btn.btn-fullscreen {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(56, 189, 248, 0.25));
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Game Frame Aspect Ratio & Responsiveness */
.game-frame-wrapper {
  position: relative;
  width: 100%;
  height: 720px;
  background: #000;
}

@media (max-width: 1024px) {
  .game-frame-wrapper {
    height: 580px;
  }
}

@media (max-width: 768px) {
  .game-frame-wrapper {
    height: 480px;
  }
}

@media (max-width: 480px) {
  .game-frame-wrapper {
    height: 400px;
  }
}

.game-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Fullscreen Mode override */
.game-player-card:fullscreen,
.game-player-card:-webkit-full-screen {
  border-radius: 0;
  width: 100vw;
  height: 100vh;
}

.game-player-card:fullscreen .game-frame-wrapper,
.game-player-card:-webkit-full-screen .game-frame-wrapper {
  height: calc(100vh - 48px);
}

/* Hotkey Bar under player */
.game-hotkeys-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: var(--text-secondary, #94a3b8);
  flex-wrap: wrap;
}

.game-hotkey-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.game-hotkey-key {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fbbf24;
  font-weight: 700;
  font-family: monospace;
  font-size: 0.75rem;
}

/* Mission & Features Grid */
.game-missions-section {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.game-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.game-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.game-section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary, #f8fafc);
}

.game-missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.game-mission-card {
  background: var(--game-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.game-mission-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.game-mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #38bdf8);
  opacity: 0;
  transition: opacity 0.25s;
}

.game-mission-card:hover::before {
  opacity: 1;
}

.game-mission-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.game-mission-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary, #f8fafc);
}

.game-mission-desc {
  font-size: 0.9rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.game-mission-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.game-mission-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary, #cbd5e1);
  font-weight: 500;
}

/* Materials & Handbook Section */
.game-materials-section {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.game-table-wrapper {
  overflow-x: auto;
  background: var(--game-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.game-materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.game-materials-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.9rem 1rem;
  color: #fbbf24;
  font-weight: 700;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  white-space: nowrap;
}

.game-materials-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary, #cbd5e1);
}

.game-materials-table tr:hover td {
  background: rgba(245, 158, 11, 0.05);
  color: var(--text-primary, #f8fafc);
}

.material-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
}

.mat-road { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.mat-steel { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.mat-cable { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.mat-hydraulic { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.mat-concrete { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Call to Action Banner */
.game-cta-banner {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 2.5rem 2rem;
  background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.18) 0%, rgba(15, 23, 42, 0.9) 70%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.game-cta-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary, #f8fafc);
}

.game-cta-desc {
  font-size: 1rem;
  color: var(--text-secondary, #94a3b8);
  max-width: 650px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.game-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  transition: all 0.2s ease;
}

.game-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
  color: #000;
}

/* Physics FAQ & AI Answer Extraction Section */
.game-faq-section {
  max-width: 1200px;
  margin: 0 auto 3.5rem;
  padding: 0 1.5rem;
}

.game-faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-faq-card {
  background: var(--game-bg-card, #0f172a);
  border: 1px solid var(--game-border, rgba(245, 158, 11, 0.2));
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.game-faq-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-1px);
}

.game-faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.game-faq-question i {
  font-size: 0.9rem;
  opacity: 0.85;
}

.game-faq-answer {
  font-size: 0.92rem;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.65;
  margin: 0;
}

