/* Reset & base */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'segoe UI', Tahoma, Geneva, verdana, sans-serif;
    overflow: hidden;
}

/* Game wrapper */
#game-wrapper {
    position: relative;
}

/* The canvas */
#gameCanvas {
    display: block;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 200, 255, 0.25), 0 8px 32px rgba(0,0,0,0.5);
}

/* Overlay screens */
.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    border-radius: 12px;

    /* frosted glass feel */
    background: rgba(10, 15, 40, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.overlay h1{
    font-size: clamp(2rem, 6vw, 3.2rem);
    color: #fff;
    text-shadow: 0 2px 12px rgba(255, 220, 0, 0.5);
    letter-spacing: 1px;
}

.overlay .subtitle {
    color: #aac8ff;
    font-size: 1rem;
    font-style: italic;
    margin-top: -8px;
}

.overlay .hint {
    color: #6a9fd8;
    font-size: 0.85rem;
    margin-top: 4px;
}

#finalScore, #bestScore {
    color: #e0e0ff;
    font-size: 1.15rem;
    font-weight: 600;
}

#bestScore {
    color: #ffd700;
    font-size: 1rem;
}

/* Button */
button {
    margin-top: 6px;
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    background: linear-gradient(135deg,#ffe066, #ffc200);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: transform 0.12s, box-shadow 0.12s;
    box-shadow: 0 4px 16px rgba(255, 200, 0, 0.35);
}

button:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(255, 200, 0, 0.5);
}

button:active {
    transform: scale(0.97);
}

/* Hidden helper */
.hidden {
    display: none !important;
}

/* Responsive: shrink canvas on small screens */
@media (max-width: 420px) {
    #game-wrapper {
        width: 100vw;
    }
}

/* ── Start menu card ─────────────────────────────── */
.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 88%;
}

.bird-preview {
  font-size: 3.5rem;
  animation: bob 1.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-10px); }
}

.instructions {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 20px;
  width: 100%;
  text-align: center;
}

.instruction-row {
  color: #c8e0ff;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

kbd {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.85rem;
  color: #fff;
}

/* ── Difficulty selector ─────────────────────────── */
.difficulty-select {
  width: 100%;
  text-align: center;
}

.difficulty-select p {
  color: #aac8ff;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.diff-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.diff-btn {
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: none;
  margin: 0;
}

.diff-btn.active {
  background: linear-gradient(135deg, #ffe066, #ffc200);
  color: #1a1a2e;
  border-color: transparent;
}

.diff-btn.active:hover {
  box-shadow: none;
  transform: scale(1.05);
}

.diff-btn:hover {
  transform: scale(1.05);
  box-shadow: none;
}