:root {
    --primary-color: #4de6ff;
    --secondary-color: #4433ff;
    --success-color: #4dff4d;
    --error-color: #ff4d4d;
}

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

body {
    margin: 0;
    padding: 10px;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    min-height: 100vh;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

.header {
    text-align: center;
    margin-bottom: 15px;
}

.title {
    color: var(--primary-color);
    font-size: 2em;
    text-shadow: 0 0 10px rgba(77, 230, 255, 0.3);
    margin-bottom: 10px;
}

.score-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.score {
    font-size: 1.1em;
    color: var(--primary-color);
}

.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 20%;
    transition: width 0.3s ease;
}

.question-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    display: none;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.question-card.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.word-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.word {
    font-size: 2.2em;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(77, 230, 255, 0.5);
}

.sound-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 1.3em;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sound-btn:hover {
    background: var(--primary-color);
    color: white;
}

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

.option {
    background: var(--secondary-color);
    border: none;
    padding: 12px;
    border-radius: 10px;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.option.correct {
    background: var(--success-color);
}

.option.incorrect {
    background: var(--error-color);
}

.feedback {
    text-align: center;
    font-size: 1.3em;
    margin-top: 15px;
    min-height: 30px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.feedback.correct {
    color: var(--success-color);
}

.feedback.incorrect {
    color: var(--error-color);
}

.result-screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s;
}

.result-screen.show {
    display: block;
}

.achievement {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.achievement-badge {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.achievement-title {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 8px;
}

.youtube-link {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 10px;
    margin-top: 15px;
    transition: all 0.2s ease;
}

.youtube-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Landscape Mode Optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding: 5px;
    }

    .container {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 15px;
        align-items: start;
        max-width: none;
    }

    .header {
        margin-bottom: 0;
    }

    .title {
        font-size: 1.5em;
    }

    .question-card {
        margin: 0;
        height: calc(100vh - 20px);
        display: grid;
        grid-template-rows: auto 1fr auto;
    }

    .word-container {
        margin-bottom: 10px;
    }

    .word {
        font-size: 1.8em;
    }

    .options {
        grid-template-columns: repeat(2, 1fr);
        align-content: center;
    }

    .option {
        padding: 8px;
        font-size: 1em;
    }

    .feedback {
        font-size: 1.1em;
        margin-top: 10px;
        min-height: 25px;
    }

    .result-screen {
        grid-column: 1 / -1;
    }

    .achievement {
        max-width: 500px;
        margin: 10px auto;
    }
}

/* Small height adjustments */
@media (max-height: 400px) and (orientation: landscape) {
    .container {
        grid-template-columns: 250px 1fr;
    }

    .title {
        font-size: 1.3em;
    }

    .word {
        font-size: 1.5em;
    }

    .option {
        padding: 6px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confetti {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    position: absolute;
    animation: confetti 1s ease-out forwards;
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(720deg); }
}