/* star/infinite_stairs/css/style.css */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f1f2f6;
    font-family: 'Black Han Sans', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 500px;
    /* Portrait mobile feel */
    max-height: 900px;
    background: #2f3542;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#hud {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

#timer-container {
    width: 80%;
    height: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 3px solid #fff;
    overflow: hidden;
    margin-bottom: 20px;
}

#timer-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ff4757, #ff6b81);
    transition: width 0.1s linear;
}

#score-display {
    color: #fff;
    font-size: 80px;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

/* CARDS */
#overlay,
#game-over {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none !important;
}

.start-card,
.over-card {
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    border: 8px solid #ffa502;
    width: 70%;
}

.title {
    color: #ff4757;
    font-size: 42px;
    margin: 0;
}

.subtitle {
    color: #747d8c;
    margin: 0;
    font-size: 14px;
    letter-spacing: 2px;
}

.visual {
    font-size: 80px;
    margin: 30px 0;
}

#start-btn,
button {
    background: #ffa502;
    color: #fff;
    border: none;
    padding: 15px 50px;
    font-size: 24px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #e67e22;
    transition: 0.1s;
    font-family: inherit;
}

#start-btn:active,
button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #e67e22;
}

.controls-guide {
    margin-top: 30px;
    font-size: 16px;
    color: #2f3542;
    background: #f1f2f6;
    padding: 15px;
    border-radius: 15px;
}

#final-score {
    font-size: 60px;
    color: #ff4757;
    margin: 20px 0;
}