* {
    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;
    padding: 20px;
}

.app-container {
    max-width: 700px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.back-button:hover {
    background-color: #764ba2;
    transform: translateY(-2px);
}

#question-counter {
    text-align: center;
    font-size: 1.1em;
    color: #666;
    margin-bottom: 15px;
}

#question {
    text-align: center;
    font-size: 1.5em;
    color: #333;
    margin-bottom: 25px;
}

#figure-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

#grid-svg {
    border: 2px solid #667eea;
    border-radius: 5px;
    background-color: white;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.option-button {
    padding: 20px;
    font-size: 1.2em;
    border: 3px solid #667eea;
    background-color: white;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.option-button:hover {
    background-color: #667eea;
    color: white;
    transform: scale(1.05);
}

.option-button.correct {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
}

.option-button.incorrect {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
}

.option-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

#feedback {
    text-align: center;
    font-size: 1.2em;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

#feedback.correct {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #4caf50;
    display: block;
}

#feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f44336;
    display: block;
}

#next-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

#next-btn:hover {
    background-color: #764ba2;
    transform: translateY(-2px);
}

#score-container {
    text-align: center;
}

#score-container h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

#score-message {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 30px;
}

#restart-btn {
    padding: 15px 40px;
    font-size: 1.2em;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

#restart-btn:hover {
    background-color: #764ba2;
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .app-container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    #grid-svg {
        width: 100%;
        max-width: 350px;
        height: auto;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .option-button {
        font-size: 1em;
    }
}
