:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --text-dark: #2C3E50;
    --text-light: #F7F9F9;
    --bg-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    --radius: 20px;
}

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

body {
    font-family: 'Cairo', 'Nunito', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Screens */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    transition: opacity 0.5s ease;
}

.hide {
    display: none !important;
}

.active {
    display: flex;
}

/* Welcome Screen */
#welcome-screen {
    justify-content: center;
}

.welcome-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    width: 100%;
    border: 3px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

.mascot-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    animation: floating 3s ease-in-out infinite;
    drop-shadow: 0 10px 10px rgba(0,0,0,0.1);
}

.welcome-card h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.welcome-card p {
    font-family: 'Nunito', sans-serif;
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.2rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: all 0.3s;
    text-align: center;
}

input[type="text"]:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.2);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bounce-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.bounce-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(255, 107, 107, 0.5);
}

.bounce-btn:active {
    transform: translateY(2px);
}

/* Lesson Screen */
.lesson-header {
    background: var(--card-bg);
    width: 100%;
    max-width: 900px;
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.lesson-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.icon-btn {
    background: var(--secondary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.icon-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background: #3eb5ad;
}

.icon-btn.playing {
    animation: pulse 1s infinite alternate;
}

/* Sections */
.lesson-content {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-bottom: 3rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.section-title h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Flashcards */
.vocab-card {
    background: var(--card-bg);
    border-radius: calc(var(--radius) - 5px);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid transparent;
}

.vocab-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
}

.vocab-card.greetings-theme { border-bottom-color: var(--primary); }
.vocab-card.intro-theme { border-bottom-color: var(--secondary); }
.vocab-card.family-theme { border-bottom-color: #f39c12; }
.vocab-card.questions-theme { border-bottom-color: #9b59b6; }

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.ar-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.en-text {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 600;
}

.play-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 35px;
    height: 35px;
    background: #f1f2f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a4b0be;
    transition: all 0.3s;
}

.vocab-card:hover .play-indicator {
    background: var(--accent);
    color: #d35400;
    transform: scale(1.1);
}

.vocab-card.playing .play-indicator {
    background: var(--primary);
    color: white;
    animation: bounce 1s infinite alternate;
}

/* Animations */
@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7); }
    100% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(78, 205, 196, 0); }
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.outline-btn {
    background: transparent;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
}

.outline-btn:hover {
    background: var(--text-dark);
    color: white;
}

@media (max-width: 600px) {
    .section-title {
        flex-direction: column;
        text-align: center;
    }
    .welcome-card { padding: 2rem 1.5rem; }
    .mascot-img { width: 140px; height: 140px; }
}
