/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a1428;
    color: #ffd700;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: 60px;
}

.container {
    width: 100%;
    max-width: 28rem;
}

.game-card {
    background: #142040;
    border: 2px solid #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    text-align: center;
}

h1 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 2rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 1.5rem;
}

/* Screen management */
.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

/* Setup screen */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-align: left;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ffd700;
    font-size: 1rem;
    background: #0a1428;
    color: #ffd700;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

.form-group select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
}

.rules-box {
    background: #1a2a4a;
    border: 1px solid #ffd700;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.rules-box h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.rules-box ul {
    list-style: none;
    font-size: 0.875rem;
    color: #ffd700;
}

.rules-box li {
    margin-bottom: 0.25rem;
}

.example-box {
    background: #1a2a4a;
    border: 1px solid #ffd700;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.example-box h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 0.25rem;
}

.example-text {
    font-size: 0.75rem;
    color: #ffd700;
}

.example-text div {
    margin-bottom: 0.125rem;
}

/* Buttons */
.primary-button {
    width: 100%;
    background: #0a1428;
    color: #ffd700;
    border: 2px solid #ffd700;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.primary-button:hover {
    background: #ffd700;
    color: #0a1428;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.secondary-button {
    width: 100%;
    background: #0a1428;
    color: #ffd700;
    border: 2px solid #ffd700;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.secondary-button:hover {
    background: #ffd700;
    color: #0a1428;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Game screens */
.progress-text {
    font-size: 0.875rem;
    color: #ffd700;
    margin-bottom: 1.5rem;
}

.number-display {
    height: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.big-number {
    font-size: 5rem;
    font-weight: bold;
    color: #ffd700;
    line-height: 1;
    font-family: 'Courier New', monospace;
}

.instruction-text {
    font-size: 1.125rem;
    color: #ffd700;
    margin-bottom: 1.5rem;
}

.instruction-text.orange {
    color: #ffaa00;
    font-weight: 600;
}

/* Number buttons */
.number-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.number-btn {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    font-weight: bold;
    background: #0a1428;
    border: 2px solid #ffd700;
    cursor: pointer;
    transition: all 0.2s;
    color: #ffd700;
    font-family: 'Courier New', monospace;
}

.number-btn:hover {
    background: #ffd700;
    color: #0a1428;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.number-btn:active {
    background: #ffd700;
    color: #0a1428;
    transform: translateY(0);
}

.number-btn:focus {
    outline: none;
    box-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

/* Result screen */
.result-box {
    background: #1a2a4a;
    border: 1px solid #ffd700;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.final-score {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ffd700;
}

.sequence-box {
    background: #1a2a4a;
    border: 1px solid #ffd700;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sequence-box h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.sequence-display {
    font-size: 1.125rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    color: #ffd700;
}

/* Responsive design */
@media (max-width: 480px) {
    .game-card {
        padding: 1.5rem;
    }
    
    .big-number {
        font-size: 4rem;
    }
    
    .number-buttons {
        gap: 0.25rem;
    }
    
    .number-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}
