/* ============================================
   PLATFORM GAME — Mario-style UI
   ============================================ */

/* Start Screen */
.start-screen {
    background: linear-gradient(160deg, #1a1038 0%, #0f2a60 55%, #1a3a1a 100%);
    color: #e8e8ed;
    width: 90%;
    max-width: 520px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 22px;
    padding: 2.5rem 2rem;
    border: 3px solid #e03030;
    box-shadow:
        0 0 0 1px rgba(224,48,48,0.2),
        0 0 50px rgba(224,48,48,0.25),
        0 8px 40px rgba(0,0,0,0.6);
    text-align: center;
    z-index: 10;
}

/* Decorative icons above title */
.start-screen::before {
    content: '🍄  🌟  🪙';
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    letter-spacing: 0.4rem;
}

.main-title {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f5c518;
    text-shadow:
        3px 3px 0 #c8960c,
        0 0 24px rgba(245, 197, 24, 0.45);
    margin-bottom: 0.4rem;
}

.instructions {
    font-size: 0.92rem;
    margin: 0.4rem 0;
    line-height: 1.7;
    color: #a8b8d0;
}

.instructions strong {
    color: #f5c518;
}

/* Feature badges row */
.game-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin: 1rem 0 0.5rem;
}

.feature-badge {
    background: rgba(245, 197, 24, 0.12);
    border: 1px solid rgba(245, 197, 24, 0.35);
    color: #f5c518;
    padding: 0.22rem 0.75rem;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 600;
}

/* Start button */
.start-game-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.8rem;
    background: linear-gradient(135deg, #e03030, #ff5c5c);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 5px 0 #9e1818, 0 8px 20px rgba(224, 48, 48, 0.45);
    -webkit-user-select: none;
    user-select: none;
}

.start-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #9e1818, 0 12px 28px rgba(224, 48, 48, 0.5);
}

.start-game-btn:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #9e1818, 0 4px 10px rgba(224, 48, 48, 0.4);
}

.btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.4rem;
}

/* Checkpoint / Win / Death Screen */
.checkpoint-screen {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 380px;
    text-align: center;
    background: linear-gradient(160deg, #1a1038, #0f2a60);
    color: #e8e8ed;
    border-radius: 22px;
    padding: 2rem 1.5rem;
    display: none;
    border: 3px solid #f5c518;
    box-shadow:
        0 0 0 1px rgba(245,197,24,0.2),
        0 0 40px rgba(245, 197, 24, 0.3),
        0 8px 40px rgba(0,0,0,0.6);
    z-index: 100;
}

.checkpoint-screen h2 {
    font-size: 1.9rem;
    font-weight: 900;
    color: #f5c518;
    text-shadow: 2px 2px 0 #c8960c;
    margin-bottom: 0.5rem;
}

.checkpoint-screen p {
    color: #a8b8d0;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Canvas */
#canvas {
    display: none;
}

/* Mobile controls */
#mobile-controls {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.control-btn {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #e03030, #ff5c5c);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 0 #9e1818, 0 4px 14px rgba(0,0,0,0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.control-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #9e1818, 0 2px 6px rgba(0,0,0,0.3);
}

/* Responsive */
@media (min-width: 768px) {
    .start-screen {
        width: 56%;
        max-width: 520px;
    }

    #mobile-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.9rem;
    }

    .start-screen {
        padding: 1.8rem 1.2rem;
    }

    .start-screen::before {
        font-size: 1.4rem;
    }

    .start-game-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .control-btn {
        padding: 12px 15px;
        font-size: 12px;
    }
}
