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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 90%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 600px;
}

.screen {
    display: none;
    padding: 40px;
    text-align: center;
    min-height: 600px;
}

.screen.active {
    display: block;
}

/* Niqqud Toggle */
.niqqud-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

#game-screen .niqqud-toggle {
    position: relative;
    top: auto;
    right: auto;
    text-align: right;
    margin-bottom: 10px;
}

.niqqud-toggle label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #4a5568;
    font-weight: bold;
}

.niqqud-toggle input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Triangle Animation */
.triangle-animation {
    position: relative;
    width: 100%;
    height: 80px;
    margin: 20px 0;
    overflow: hidden;
}

.triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid #48bb78;
    animation: bounceTriangle 2s infinite ease-in-out;
}

.triangle1 {
    left: 20%;
    animation-delay: 0s;
}

.triangle2 {
    left: 50%;
    animation-delay: 0.5s;
}

.triangle3 {
    left: 80%;
    animation-delay: 1s;
}

@keyframes bounceTriangle {
    0%, 100% {
        top: 60px;
        transform: scale(1) rotate(0deg);
    }
    25% {
        top: 10px;
        transform: scale(1.2) rotate(90deg);
    }
    50% {
        top: 5px;
        transform: scale(1.3) rotate(180deg);
    }
    75% {
        top: 10px;
        transform: scale(1.2) rotate(270deg);
    }
}

/* Main Menu */
h1 {
    color: #4a5568;
    margin-bottom: 30px;
    margin-top: 20px;
    font-size: 2.5em;
    font-weight: bold;
}

h2 {
    color: #4a5568;
    margin-bottom: 30px;
    font-size: 2em;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.menu-button {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.menu-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Category Selection */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-btn {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.category-btn:hover {
    border-color: #48bb78;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-btn.selected {
    border-color: #48bb78;
    background: #f7fafc;
}

.category-icon {
    font-size: 3em;
}

.category-btn span:last-child {
    font-weight: bold;
    color: #4a5568;
}

/* Game Screen */
.progress-container {
    margin-bottom: 40px;
}

.progress-path {
    position: relative;
    height: 60px;
    background: linear-gradient(to right, #e2e8f0 0%, #48bb78 100%);
    border-radius: 30px;
    margin-bottom: 10px;
    overflow: hidden;
}

.character {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    transition: left 0.5s ease;
    left: 5%;
}

.hill {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
}

.progress-text {
    color: #4a5568;
    font-weight: bold;
}

.question-container {
    background: #f7fafc;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
}

#hebrew-word {
    font-size: 3em;
    color: #2d3748;
    margin-bottom: 30px;
    font-family: 'Arial Unicode MS', sans-serif;
    direction: rtl;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.option-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn:hover {
    border-color: #48bb78;
    transform: translateY(-2px);
}

.option-btn.correct {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

.option-btn.incorrect {
    background: #f56565;
    color: white;
    border-color: #f56565;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.game-controls {
    margin-top: 20px;
}

.control-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.control-btn:hover {
    background: #cbd5e0;
}

/* Results Screen */
.results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.score-display {
    font-size: 4em;
    font-weight: bold;
    color: #48bb78;
}

.score-message {
    font-size: 1.5em;
    color: #4a5568;
    font-weight: bold;
}

.results-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* About Screen */
#about-screen p {
    color: #4a5568;
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cheat Sheet */
.cheat-sheet-content {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 30px;
}

.download-section {
    margin-bottom: 20px;
}

.vocabulary-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.vocab-category {
    background: #f7fafc;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #48bb78;
}

.vocab-category h4 {
    color: #48bb78;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.vocab-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.hebrew-text {
    font-family: 'Arial Unicode MS', sans-serif;
    direction: rtl;
    font-weight: bold;
}

.english-text {
    color: #666;
}

/* Copyright */
.copyright {
    position: fixed;
    bottom: 10px;
    right: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8em;
}

/* Responsive Design */
@media (max-width: 768px) {
    #game-container {
        width: 95%;
        margin: 10px;
    }
    
    .screen {
        padding: 20px;
    }
    
    .niqqud-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        margin-bottom: 0;
    }
    
    .triangle-animation {
        height: 60px;
        margin: 10px 0;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #hebrew-word {
        font-size: 2em;
    }
    
    .options-container {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .results-buttons {
        width: 100%;
    }
    
    .menu-button {
        width: 100%;
    }
}
