
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #10b981;
  --accent-hover: #059669;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.game-wrap {
  width: min(100%, 940px);
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
  transition: transform 0.3s ease;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(to right, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.hint {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.ui {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  padding: 12px 24px;
  border-radius: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.score-box {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.score-box strong {
  color: #60a5fa;
  font-size: 1.4rem;
  margin-left: 6px;
}

.btn-container {
  display: flex;
  gap: 12px;
}

button {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
}

#startBtn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

#startBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

#startBtn:active {
  transform: translateY(1px);
}

#jumpBtn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

#jumpBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

#jumpBtn:active {
  transform: translateY(1px);
}

canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 300;
  background: #bae6fd;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }
  
  .game-wrap {
    padding: 16px;
    border-radius: 20px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .hint {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }

  .ui {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .score-box {
    text-align: center;
  }

  .btn-container {
    width: 100%;
  }

  button {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
  }
}