:root {
    --light-yellow: #FFFF00;
    --gold: #FFD700;
    --orange: #FFA500;
    --dark-orange: #FF8C00;
    --tomato-red: #FF6347;
    --white: #FFFFFF;
    --black: #000000;
    --gray: #666666;
    --light-gray: #F5F5F5;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-yellow) 0%, var(--gold) 100%);
    color: var(--black);
    line-height: 1.6;
    padding-bottom: 80px;
}

.app-header {
    background: linear-gradient(135deg, var(--orange) 0%, var(--dark-orange) 100%);
    color: var(--white);
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.user-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--white);
    transition: width 0.3s ease;
    width: 0%;
}

.app-main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
    text-align: center;
}

.welcome-card h2 {
    color: var(--dark-orange);
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
    color: var(--white);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow);
}

.stat-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-card span {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.stat-card small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.quick-actions {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.quick-actions h3 {
    color: var(--dark-orange);
    margin-bottom: 1rem;
    text-align: center;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: linear-gradient(135deg, var(--orange) 0%, var(--tomato-red) 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

.action-btn i {
    font-size: 1.5rem;
}

.video-categories, .vocab-modes {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn, .mode-btn {
    background: var(--white);
    border: 2px solid var(--orange);
    color: var(--orange);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active, .mode-btn.active {
    background: var(--orange);
    color: var(--white);
}

.videos-grid, .recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card, .recipe-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.2s ease;
}

.video-card:hover, .recipe-card:hover {
    transform: translateY(-5px);
}

.video-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.video-info, .recipe-info {
    padding: 1.5rem;
}

.video-info h3, .recipe-info h3 {
    color: var(--dark-orange);
    margin-bottom: 0.5rem;
}

.video-duration, .recipe-difficulty {
    background: var(--gold);
    color: var(--black);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.watch-btn, .view-recipe-btn {
    background: var(--tomato-red);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.watch-btn:hover, .view-recipe-btn:hover {
    background: var(--dark-orange);
}

.recipe-controls {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 4px 20px var(--shadow);
}

.difficulty-selector, .servings-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.difficulty-selector label, .servings-control label {
    font-weight: bold;
    color: var(--dark-orange);
}

.difficulty-selector select, .servings-control input {
    padding: 0.5rem;
    border: 2px solid var(--orange);
    border-radius: 5px;
    font-size: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--orange);
    border-radius: 25px;
    font-size: 1rem;
}

.search-box button {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
}

.trouble-results {
    margin-bottom: 2rem;
}

.trouble-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.trouble-item h4 {
    color: var(--dark-orange);
    margin-bottom: 0.5rem;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.problem-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.problem-card:hover {
    transform: translateY(-2px);
}

.problem-card h4 {
    color: var(--dark-orange);
    margin-bottom: 0.5rem;
}

.vocab-content {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.vocab-list {
    display: grid;
    gap: 1rem;
}

.vocab-item {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--orange);
}

.vocab-term {
    font-weight: bold;
    color: var(--dark-orange);
    margin-bottom: 0.5rem;
}

.flashcard {
    background: var(--white);
    border: 3px solid var(--orange);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.flashcard:hover {
    transform: rotateY(5deg);
}

.flashcard.flipped {
    background: var(--gold);
}

.quiz-container {
    text-align: center;
}

.quiz-question {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--dark-orange);
}

.quiz-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-option {
    background: var(--light-gray);
    border: 2px solid var(--orange);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: var(--gold);
}

.quiz-option.correct {
    background: #90EE90;
    border-color: #008000;
}

.quiz-option.incorrect {
    background: #FFB6C1;
    border-color: #FF0000;
}

.quiz-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-orange);
    margin-bottom: 1rem;
}

.profile-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.profile-info h3 {
    color: var(--dark-orange);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.profile-progress {
    margin-top: 1rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.profile-btn {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.profile-btn:hover {
    background: var(--dark-orange);
}

.profile-btn.danger {
    background: var(--tomato-red);
}

.achievements {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.achievements h3 {
    color: var(--dark-orange);
    margin-bottom: 1rem;
    text-align: center;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.achievement-card {
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card.unlocked {
    background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
    color: var(--white);
    transform: scale(1.05);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.faq-section {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px var(--shadow);
}

.faq-section h2 {
    color: var(--dark-orange);
    margin-bottom: 2rem;
    text-align: center;
}

.faq-container {
    display: grid;
    gap: 1rem;
}

.faq-item {
    border: 2px solid var(--orange);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--gold);
    border: none;
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--orange);
    color: var(--white);
}

.faq-question[aria-expanded="true"] {
    background: var(--orange);
    color: var(--white);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    background: var(--white);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer:not([hidden]) {
    padding: 1rem;
    max-height: 200px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px var(--shadow);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray);
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item.active {
    color: var(--orange);
    background: rgba(255, 165, 0, 0.1);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

footer {
    background: var(--dark-orange);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .user-level {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .progress-bar {
        width: 150px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .videos-grid, .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    .recipe-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .app-main {
        padding: 0.5rem;
    }
    
    .welcome-card, .quick-actions, .vocab-content, .profile-card, .achievements, .faq-section {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .problems-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
