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

:root {
    --primary: #22C55E;
    --background: #F8FAFC;
    --surface: #FFF;
    --text: #1E293B;
    --success: #10B981;
}

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

#game-container {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px;
    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;
}

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

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

.stat-label {
    font-size: 11px;
    color: #64748B;
    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 {
    padding: 24px;
}

.instruction {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding: 12px;
    background: #DCFCE7;
    border-radius: 12px;
}

.chain {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    min-height: 100px;
    padding: 12px;
    background: #F0FDF4;
    border-radius: 16px;
    border: 3px dashed #BBF7D0;
}

.chain-slot {
    width: 70px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 3px solid #E5E7EB;
    border-radius: 12px;
    font-size: 36px;
}

.chain-slot.filled {
    border-color: var(--primary);
}

.chain-slot.correct {
    border-color: var(--success);
    background: #D1FAE5;
}

.chain-slot.wrong {
    border-color: #EF4444;
    background: #FEE2E2;
}

.options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.option {
    padding: 12px 16px;
    font-size: 32px;
    background: var(--surface);
    border: 3px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.option.selected {
    opacity: 0.3;
    pointer-events: none;
}

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

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    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%;
}

.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: #64748B;
}

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

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