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

:root {
    --primary: #F59E0B;
    --background: #0F172A;
    --surface: #1E293B;
    --text: #F8FAFC;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(180deg, #0F172A 0%, #1E3A8A 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#game-container {
    width: 100%;
    max-width: 450px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

#game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--background);
}

.game-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.stats {
    display: flex;
    gap: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 11px;
    color: #94A3B8;
    text-transform: uppercase;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--surface);
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
}

#game-area {
    position: relative;
}

.start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.start-screen h2 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 12px;
}

.start-screen p {
    color: #94A3B8;
    margin-bottom: 24px;
}

.start-screen.hidden {
    display: none;
}

.play-area {
    height: 400px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #1E3A8A 0%, #3B82F6 100%);
}

.play-area.hidden {
    display: none;
}

.star {
    position: absolute;
    font-size: 40px;
    cursor: pointer;
    animation: fall linear forwards;
    user-select: none;
}

.star:hover {
    transform: scale(1.2);
}

.star.caught {
    animation: caught 0.3s forwards;
}

@keyframes fall {
    from {
        top: -50px;
    }

    to {
        top: 420px;
    }
}

@keyframes caught {
    to {
        transform: scale(0);
        opacity: 0;
    }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    color: var(--text);
}

.stars {
    font-size: 48px;
    margin-bottom: 16px;
}

.result-stats {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.result-label {
    font-size: 14px;
    color: #94A3B8;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #F97316 100%);
    color: white;
}

.btn-secondary {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #475569;
    background: var(--background);
    color: var(--text);
}