@import url('https://fonts.googleapis.com/css?family=Khula&display=swap');

* {
    box-sizing: border-box;
}

body {
    color: #fff;
    font-family: 'Khula', sans-serif;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    text-align: center;
}

a {
    color: #fff;
    text-decoration: none;
}

a:hover {
    color: #16D9E3;
}

.start {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.5rem;
}

.start:hover {
    color: #16D9E3;
}

h1 {
    line-height: 1.4;
    font-size: 4rem;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    transition: margin 0.5s ease-out;
    background: linear-gradient(90deg, #29323C 0%, #485563 100%);
}

.screen.up {
    margin-top: -100vh;
}

.time-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
}

.time-list li {
    margin: 10px;
}

.time-btn {
    background-color: transparent;
    border: 2px solid #C0C0C0;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    padding: .5rem 1rem;
    font-size: 1.5rem;
}

.time-btn:hover {
    border: 2px solid #16D9E3;
    color: #16D9E3;
}

.difficulty-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    max-width: 800px;
}

.difficulty-list li {
    margin: 10px;
}

.difficulty-btn {
    background-color: transparent;
    border: 2px solid #C0C0C0;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    min-width: 180px;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    border: 2px solid #16D9E3;
    background-color: rgba(22, 217, 227, 0.1);
    transform: translateY(-2px);
}

.difficulty-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #16D9E3;
}

.difficulty-desc {
    font-size: 0.9rem;
    color: #C0C0C0;
}

.hide {
    opacity: 0;
    pointer-events: none;
}

.primary {
    color: #16D9E3;
}

.board {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: min(500px, 90vmin);
    height: min(500px, 90vmin);
    background: linear-gradient(118.38deg, #29323C -4.6%, #485563 200.44%);
    box-shadow: -8px -8px 20px #2A333D, 10px 7px 20px #475462;
    border-radius: 30px;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    animation: circleSpawn 0.2s ease-out;
}

@keyframes circleSpawn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.score-popup {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
    pointer-events: none;
    z-index: 20;
    animation: scoreFloat 0.8s ease-out forwards;
}

@keyframes scoreFloat {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-40px); }
}

.countdown {
    font-size: 5rem;
    font-weight: bold;
    color: #16D9E3;
    z-index: 10;
    animation: countdownPulse 0.7s ease-in-out;
}

@keyframes countdownPulse {
    0% { transform: scale(1.5); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.combo-display {
    font-size: 2rem;
    font-weight: bold;
    color: #16D9E3;
    min-height: 2.5rem;
    margin-top: 10px;
    letter-spacing: 0.05em;
}

.restart-btn {
    background-color: transparent;
    border: 2px solid #16D9E3;
    color: #16D9E3;
    cursor: pointer;
    font-family: inherit;
    padding: 0.75rem 2rem;
    font-size: 1.5rem;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background-color: #16D9E3;
    color: #29323C;
    transform: scale(1.05);
}

@media (max-width: 540px) {
    h1 {
        font-size: 2.5rem;
    }

    .difficulty-list {
        flex-direction: column;
        align-items: center;
    }

    .difficulty-btn {
        min-width: 140px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .restart-btn {
        font-size: 1.2rem;
        padding: 0.5rem 1.5rem;
    }

    .combo-display {
        font-size: 1.5rem;
    }
}
