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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.game-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.game-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    font-size: 1.1rem;
    font-weight: 500;
}

.game-main {
    padding: 30px;
}

/* Tutorial Styles */
.tutorial {
    display: none;
}

.tutorial.active {
    display: block;
}

.tutorial-content h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.tutorial-step {
    background: #f8f9fa;
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border-left: 4px solid #4facfe;
}

.tutorial-step h3 {
    color: #495057;
    margin-bottom: 10px;
}

.example-sequence {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.cell {
    width: 50px;
    height: 50px;
    background: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.cell.missing {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.hint {
    font-style: italic;
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
}

/* Game Section */
.game-section {
    display: none;
}

.game-section.active {
    display: block;
}

.sequence-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sequence {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-section, .hint-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-section label {
    font-weight: 500;
    color: #495057;
}

#answer-input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

#answer-input:focus {
    outline: none;
    border-color: #4facfe;
}

.hint-display {
    min-height: 40px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
}

.feedback {
    text-align: center;
}

.message {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    min-height: 30px;
}

.message.correct {
    color: #28a745;
}

.message.incorrect {
    color: #dc3545;
}

.pattern-info {
    color: #6c757d;
    font-style: italic;
}

/* Game Over */
.game-over {
    display: none;
    text-align: center;
}

.game-over.active {
    display: block;
}

.game-over-content h2 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls {
        grid-template-columns: 1fr;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .sequence {
        gap: 8px;
    }
    
    .cell {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        margin: 10px;
    }
    
    .game-main {
        padding: 15px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .cell {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}