/* ===========================
   Google Fonts Import
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ===========================
   CSS Variables
   =========================== */
:root {
  /* Elegant Dark Theme - Matching portfolio */
  --bg-primary: #1B1725;
  --bg-secondary: #0d0a10;
  --bg-card: rgba(27, 23, 37, 0.9);
  --text-primary: #F5F2B8;
  --text-secondary: #d4c5a0;
  --accent-primary: #8B7355;
  --accent-secondary: #F5F2B8;
  --accent-gradient: linear-gradient(135deg, #8B7355 0%, #F5F2B8 100%);
  --shadow: rgba(13, 10, 16, 0.8);
  --border: rgba(139, 115, 85, 0.3);
  --success: #4ade80;
  --warning: #fbbf24;
  --error: #f87171;

  /* Typography */
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Space Grotesk', sans-serif;
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ===========================
   Animated Background
   =========================== */
.background-blobs {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, var(--accent-primary) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--accent-secondary) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, var(--accent-primary) 0%, transparent 50%);
  opacity: 0.06;
  z-index: -1;
  animation: blob-rotate 40s linear infinite;
}

@keyframes blob-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================
   Main Container
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* ===========================
   Maintenance Info Section
   =========================== */
.maintenance-info {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out;
}

.icon-wrapper {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.wrench-icon {
  width: 80px;
  height: 80px;
  color: var(--accent-primary);
  animation: rotate-wrench 4s ease-in-out infinite;
}

@keyframes rotate-wrench {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.maintenance-info h1 {
  font-size: 3rem;
  font-family: var(--font-accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.info-box {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 32px var(--shadow);
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.info-box p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.expected-time {
  color: var(--warning);
  font-weight: 600;
}

.contact-info {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.contact-info p {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.email-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-accent);
  transition: color 0.3s ease;
}

.email-link:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* ===========================
   Game Section
   =========================== */
.game-section {
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out 1s both;
}

.game-container {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px var(--shadow);
}

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

.game-header h2 {
  font-size: 2rem;
  font-family: var(--font-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

.game-header p {
  color: var(--text-secondary);
}

/* Game Info Display */
.game-info {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(139, 115, 85, 0.1);
  border-radius: 12px;
}

.score-display,
.highscore-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.game-info .label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.game-info .value {
  font-size: 2rem;
  font-family: var(--font-accent);
  font-weight: 700;
  color: var(--accent-primary);
}

/* Canvas */
#gameCanvas {
  display: block;
  margin: 0 auto 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  height: auto;
}

/* Game Controls */
.game-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.game-btn {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-accent);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-btn:hover:not(:disabled) {
  background: rgba(139, 115, 85, 0.2);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.game-btn:active:not(:disabled) {
  transform: translateY(0);
}

.game-btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

.game-btn.primary:hover:not(:disabled) {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.game-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Game Instructions */
.game-instructions {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  text-align: center;
}

.game-instructions h3 {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
}

.controls-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

kbd {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  margin: 0 0.25rem;
  font-family: var(--font-accent);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.control-item span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.mobile-only {
  display: none;
}

/* ===========================
   Status Updates Section
   =========================== */
.status-updates {
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out 1.2s both;
}

.status-updates h3 {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--accent-primary);
}

.timeline {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border: 2px solid var(--bg-primary);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item.upcoming .timeline-dot {
  background: transparent;
  border-color: var(--border);
}

.timeline-content {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

.timeline-content .time {
  font-family: var(--font-accent);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.timeline-content p {
  margin-top: 0.25rem;
  color: var(--text-secondary);
}

.timeline-item.upcoming .timeline-content {
  opacity: 0.6;
}

/* ===========================
   Footer
   =========================== */
footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
  .maintenance-info h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .info-box {
    padding: 1.5rem;
  }

  .game-container {
    padding: 1.5rem;
  }

  .game-header h2 {
    font-size: 1.5rem;
  }

  .game-info {
    gap: 2rem;
  }

  .game-info .value {
    font-size: 1.5rem;
  }

  #gameCanvas {
    width: 100%;
    height: auto;
  }

  .game-controls {
    flex-direction: column;
  }

  .game-btn {
    width: 100%;
  }

  .controls-grid {
    gap: 1rem;
  }

  .mobile-only {
    display: flex;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem 0.5rem;
  }

  .maintenance-info h1 {
    font-size: 1.75rem;
  }

  .icon-wrapper {
    margin-bottom: 1rem;
  }

  .wrench-icon {
    width: 60px;
    height: 60px;
  }

  .info-box {
    padding: 1rem;
  }

  .game-container {
    padding: 1rem;
  }

  .game-info {
    flex-direction: column;
    gap: 1rem;
  }
}
