/* =============== Reset & Base Styles =============== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary: #58cc02;
    --primary-dark: #46a302;
    --primary-light: #89e219;
    --primary-bg: #d7ffb8;
    
    --success: #58cc02;
    --success-dark: #46a302;
    --success-bg: #d7ffb8;
    
    --danger: #ff4b4b;
    --danger-dark: #ea2b2b;
    --danger-bg: #ffd1d1;
    
    --warning: #ffc800;
    --warning-dark: #e6b400;
    
    --blue: #1cb0f6;
    --blue-dark: #0a94d6;
    --blue-bg: #ddf4ff;
    
    --purple: #ce82ff;
    --purple-dark: #b862e6;
    --purple-bg: #f3e5ff;
    
    --gray-50: #f7f7f7;
    --gray-100: #e5e5e5;
    --gray-200: #d0d0d0;
    --gray-300: #b0b0b0;
    --gray-400: #8e8e8e;
    --gray-500: #777777;
    --gray-600: #4b4b4b;
    --gray-700: #3c3c3c;
    --gray-800: #2b2b2b;
    --gray-900: #1f1f1f;
    
    --white: #ffffff;
    --black: #000000;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.15);
    
    /* Sizing */
    --header-height: 70px;
    --bottom-nav-height: 70px;
    --sidebar-width: 280px;
    
    /* Animation */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============== Landing Page =============== */
.landing-page {
    min-height: 100vh;
    background: var(--white);
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gray-100);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.logo-icon {
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    padding: 8rem 2rem 1rem;
    background: linear-gradient(to bottom, var(--white), var(--gray-50));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: #ee7a2e;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 700;
}

.hero-visual {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.language-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.language-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 3px solid var(--gray-100);
}

.language-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.language-card img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    border: 3px solid var(--gray-100);
}

.language-card span {
    font-weight: 700;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Languages Section */
.languages-section {
    padding: 4rem 2rem;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 3rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.language-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: 3px solid transparent;
}

.language-item:hover {
    background: var(--primary-bg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.language-item img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 3px solid var(--white);
}

.language-item h4 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.language-item p {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* Features Section */
.features-section {
    padding: 4rem 2rem;
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid var(--gray-100);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--primary-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    font-weight: 500;
    line-height: 1.6;
}

/* How It Works Section */
.how-section {
    padding: 4rem 2rem;
    background: var(--white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    color: var(--gray-900);
}

.step-card p {
    color: var(--gray-600);
    font-weight: 500;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 4rem 2rem;
    background: var(--primary-bg);
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--gray-900);
}

.cta-section p {
    color: var(--gray-700);
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Footer */
.landing-footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 2.5rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 600;
}

/* =============== Auth Screen =============== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--blue-bg) 100%);
}

.auth-container {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    position: relative;
    border: 3px solid var(--gray-100);
}

.auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-icon {
    margin: 0 auto 1rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.auth-header p {
    color: var(--gray-600);
    font-weight: 600;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-700);
}

.checkbox-label input {
    width: auto;
}

.link {
    color: var(--blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.link:hover {
    text-decoration: underline;
}

.auth-error {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 700;
    padding: 0.75rem;
    background: var(--danger-bg);
    border-radius: 12px;
    display: none;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-600);
    font-weight: 600;
}

.auth-footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 700;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* =============== Buttons =============== */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-success {
    padding: 0.875rem 1.75rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 0 var(--primary-dark);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--primary-dark);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    box-shadow: 0 4px 0 var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--gray-400);
}

.btn-secondary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--gray-400);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 3px solid var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-bg);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    box-shadow: 0 4px 0 var(--success-dark);
}

.btn-success:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--success-dark);
}

.btn-success:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--success-dark);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* =============== App Container =============== */
.app-container {
    min-height: 100vh;
    background: var(--gray-50);
}

/* =============== App Header =============== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 3px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--gray-100);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.language-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: var(--gray-100);
    border-radius: 24px;
    border: 2px solid var(--gray-200);
}

.language-display img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--white);
}

.language-display i {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.header-stats {
    display: flex;
    gap: 0.75rem;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--gray-100);
    border-radius: 24px;
    font-weight: 800;
    border: 2px solid var(--gray-200);
    font-size: 0.95rem;
}

.stat-badge i {
    font-size: 1rem;
}

.stat-badge.hearts {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

.stat-badge.gems {
    background: var(--blue-bg);
    color: var(--blue);
    border-color: var(--blue);
}

.user-menu-trigger {
    cursor: pointer;
}

.user-menu-trigger img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--gray-200);
    transition: var(--transition);
}

.user-menu-trigger:hover img {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* =============== Side Menu =============== */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-slow);
    z-index: 200;
    overflow-y: auto;
    border-right: 3px solid var(--gray-100);
}

.side-menu.active {
    left: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
    z-index: 150;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-header {
    padding: 2rem 1.5rem;
    background: #FFF;
    border-bottom: 3px solid var(--gray-100);
    text-align: center;
}

.menu-header img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

.menu-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    font-weight: 800;
    color: var(--gray-900);
}

.menu-header p {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 600;
}

.menu-nav {
    padding: 1rem 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
}

.menu-item:hover {
    background: var(--gray-50);
}

.menu-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.menu-item i {
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
}

.menu-item.logout {
    color: var(--danger);
}

.menu-divider {
    height: 2px;
    background: var(--gray-100);
    margin: 0.5rem 1rem;
}

/* =============== Main Content =============== */
.main-content {
    padding-top: var(--header-height);
    min-height: 100vh;
}

.page {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============== Language Selection Page =============== */
.language-selection-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: var(--primary-bg);
}

.onboarding-container {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: 3px solid var(--gray-100);
}

.onboarding-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 2px solid var(--gray-100);
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 700;
}

.onboarding-content h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.onboarding-content > p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.language-selection-section {
    margin-bottom: 2rem;
}

.language-selection-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--gray-900);
}

.language-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.language-option {
    padding: 1.125rem;
    border: 3px solid var(--gray-200);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.language-option:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
}

.language-option.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.1);
}

.language-option img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    border: 3px solid var(--white);
}

.language-option .lang-name {
    display: block;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.language-option .lang-native {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* =============== Course Selection Page =============== */
.course-selection-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: var(--primary-bg);
}

.course-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-option {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem;
    background: var(--white);
    border: 3px solid var(--gray-200);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.course-option:hover {
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: var(--shadow-lg);
}

.course-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.course-info {
    flex: 1;
}

.course-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    font-weight: 800;
    color: var(--gray-900);
}

.course-info p {
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* =============== Home Page =============== */
.home-page {
    padding: 2rem;
}

.home-container {
    max-width: 800px;
    margin: 0 auto;
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--gray-900);
}

.welcome-section p {
    color: var(--gray-600);
    font-weight: 600;
    font-size: 1.05rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 3px solid var(--gray-100);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 700;
}

.action-section {
    margin-bottom: 2rem;
    text-align: center;
}

.daily-goal {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-100);
}

.daily-goal h3 {
    margin-bottom: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.goal-bar {
    flex: 1;
    height: 16px;
    background: var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--gray-100);
}

.goal-fill {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

.goal-text {
    font-size: 0.95rem;
    color: var(--gray-700);
    white-space: nowrap;
    font-weight: 800;
}

/* =============== Learn Page =============== */
.learn-page {
    padding: 2rem;
}

.learn-container {
    max-width: 900px;
    margin: 0 auto;
}

.learn-container > h1 {
    margin-bottom: 2rem;
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--gray-900);
}

/* Level Selector Dropdown */
.level-selector-container {
    position: relative;
    margin-bottom: 2rem;
}

.level-selector-btn {
    width: 100%;
    background: var(--white);
    border: 3px solid var(--gray-200);
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.level-selector-btn:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.level-selector-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.1);
}

.level-selector-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
}

.level-selector-content > i {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.level-selector-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.level-selector-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    display: block;
    margin-bottom: 0.25rem;
}

.level-selector-desc {
    font-size: 0.95rem;
    color: var(--gray-600);
    display: block;
    font-weight: 600;
}

.level-selector-arrow {
    color: var(--gray-500);
    font-size: 1.5rem;
    transition: var(--transition);
}

.level-selector-btn.active .level-selector-arrow {
    transform: rotate(180deg);
}

/* Level Dropdown */
.level-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    border: 3px solid var(--gray-200);
}

.level-dropdown.active {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
}

.level-dropdown-list {
    padding: 0.75rem;
}

.level-dropdown-item {
    padding: 1.5rem;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.5rem;
    border: 3px solid transparent;
}

.level-dropdown-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
}

.level-dropdown-item.selected {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.level-dropdown-item-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: block;
}

.level-dropdown-item-desc {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: block;
    font-weight: 600;
}

.level-dropdown-item.selected .level-dropdown-item-title {
    color: var(--primary);
}

.stages-path {
    position: relative;
}

.stage-node {
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
     box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 3px solid var(--gray-200);
}

.stage-node.active {
    cursor: pointer;
    border-color: var(--primary);
}

.stage-node.active:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stage-node.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-50);
}

.stage-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
}

.stage-node.locked .stage-icon {
    background: var(--gray-200);
    color: var(--gray-500);
}

.stage-info {
    flex: 1;
}

.stage-info h3 {
    margin-bottom: 0.75rem;
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.path-connector {
    width: 3px;
    height: 2rem;
    background: var(--gray-300);
    margin: 0 auto;
}

/* =============== Stage Tasks Page =============== */
.stage-tasks-page {
    padding: 2rem;
}

.tasks-container {
    max-width: 800px;
    margin: 0 auto;
}

.tasks-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid var(--gray-200);
}

.back-btn:hover {
    transform: translateX(-4px);
    border-color: var(--primary);
}

.tasks-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.task-card {
    background: var(--white);
    padding: 2rem 1.75rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 3px solid var(--gray-200);
}

.task-card.available {
    cursor: pointer;
}

.task-card.available:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.task-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-50);
}

.task-card .task-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
}

.task-card.locked .task-icon {
    background: var(--gray-200);
    color: var(--gray-500);
}

.task-card h4 {
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.task-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* =============== Task Page =============== */
.task-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.5rem;
    background: var(--primary-bg);
    overflow-y: auto;
}

.task-container {
    background: var(--white);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 3px solid var(--gray-100);
    margin-top: 0;
}

.task-header {
    padding: 1.25rem 1.75rem;
    background: var(--white);
    border-bottom: 3px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .task-page .task-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        padding: 0.75rem 1rem;
    }
    
    .task-page .task-content {
        padding-top: 4rem;
        padding-bottom: 0.5rem;
    }
    
    .task-instruction {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .source-sentence {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
}

.exit-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    color: var(--gray-600);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.exit-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.task-progress {
    flex: 1;
}

.task-lives {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger);
    font-weight: 800;
    font-size: 1.05rem;
}

.task-content {
    padding: 1.5rem 1rem;
    min-height: auto;
}

.task-instruction {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.source-sentence {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.task-image {
    text-align: center;
    margin-bottom: 1rem;
}

.task-image img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 12px;
    border: 2px solid var(--gray-100);
}

.sentence-builder {
    margin-top: 1rem;
}

.target-area {
    min-height: 60px;
    padding: 0.75rem;
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.word-chip {
    padding: 0.6rem 1rem;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    font-size: 0.9rem;
}

.word-chip:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
}

.word-chip.used {
    opacity: 0.3;
    cursor: not-allowed;
}

.word-chip.selected {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.text-input textarea {
    width: 100%;
    min-height: 130px;
    padding: 1.25rem;
    border: 3px solid var(--gray-300);
    border-radius: 16px;
    font-size: 1.125rem;
    resize: none;
    transition: var(--transition);
    font-weight: 500;
}

.text-input textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.1);
}

.audio-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--blue);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    margin: 1rem auto;
    display: block;
    box-shadow: 0 4px 0 var(--blue-dark);
}

.audio-btn:hover {
    transform: scale(1.1);
}

.audio-btn:active {
    transform: scale(1.05);
    box-shadow: 0 2px 0 var(--blue-dark);
}

.task-actions {
    padding: 1rem 1rem;
    background: var(--gray-50);
    border-top: 2px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.task-feedback {
    padding: 1rem 1rem;
    margin: 0 1rem 1rem;
    border-radius: 12px;
}

.task-feedback.correct {
    background: var(--success-bg);
    color: var(--success-dark);
    border: 3px solid var(--success);
}

.task-feedback.incorrect {
    background: var(--danger-bg);
    color: var(--danger-dark);
    border: 3px solid var(--danger);
}

.feedback-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feedback-message {
    font-weight: 700;
    font-size: 1.05rem;
}

/* =============== Completion Modal =============== */
.completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    border: 3px solid var(--gray-100);
    box-shadow: var(--shadow-xl);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.75rem;
}

.score-display p {
    font-weight: 700;
    color: var(--gray-700);
    font-size: 1.05rem;
}

.reward-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.reward-item i {
    color: var(--primary);
    font-size: 1.75rem;
}

/* =============== Practice Page =============== */
.practice-page {
    padding: 2rem;
}

.practice-container {
    max-width: 800px;
    margin: 0 auto;
}

.practice-container h1 {
    margin-bottom: 0.5rem;
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--gray-900);
}

.practice-container > p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.practice-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.practice-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid var(--gray-100);
}

.practice-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.practice-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.practice-card h3 {
    margin-bottom: 0.75rem;
    font-weight: 800;
    color: var(--gray-900);
}

.practice-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* =============== Progress Page =============== */
.progress-page {
    padding: 2rem;
}

.progress-container {
    max-width: 1000px;
    margin: 0 auto;
}

.progress-container h1 {
    margin-bottom: 2rem;
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--gray-900);
}

/* Progress Stats Grid */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.progress-stats-grid .stat-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-100);
    transition: var(--transition);
}

.progress-stats-grid .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Progress Details Section */
.progress-details {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-100);
    margin-bottom: 1.5rem;
}

.progress-details h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

/* Recent Activity List */
.recent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: 16px;
    border: 2px solid var(--gray-100);
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    transform: translateX(4px);
}

.activity-icon {
    width: 44px;
    height: 44px;
    background: var(--success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
}

.activity-xp {
    color: var(--primary);
    font-weight: 800;
}

.activity-date {
    color: var(--gray-500);
}

/* Stage Progress List */
.stage-progress-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stage-progress-item {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 16px;
    border: 2px solid var(--gray-100);
    transition: var(--transition);
}

.stage-progress-item:hover {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stage-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stage-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--gray-900);
}

.stage-xp {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
}

.stage-progress-bar {
    height: 14px;
    background: var(--gray-200);
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 2px solid var(--gray-100);
}

.stage-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transition: width 0.3s ease;
}

.stage-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-percent {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-700);
}

/* Old styles for backward compatibility */
.progress-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.progress-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-100);
}

.progress-card h3 {
    margin-bottom: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border: 2px solid var(--gray-100);
}

.achievement-item i {
    font-size: 1.75rem;
    color: var(--primary);
}

.achievement-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 800;
    color: var(--gray-900);
}

.achievement-item p {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
}

/* =============== Profile Page =============== */
.profile-page {
    padding: 2rem;
}

.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-container h1 {
    margin-bottom: 2rem;
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--gray-900);
}

.profile-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-100);
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-header img {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    margin-bottom: 1.25rem;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.profile-form {
    max-width: 400px;
    margin: 0 auto;
}

/* =============== Settings Page =============== */
.settings-page {
    padding: 2rem;
}

.settings-container {
    max-width: 600px;
    margin: 0 auto;
}

.settings-container h1 {
    margin-bottom: 2rem;
    font-weight: 800;
    font-size: 2.25rem;
    color: var(--gray-900);
}

.settings-section {
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 3px solid var(--gray-100);
}

.settings-section h3 {
    margin-bottom: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 0;
    border-bottom: 2px solid var(--gray-100);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info span {
    display: block;
    font-weight: 700;
    color: var(--gray-900);
}

.setting-info small {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
    font-weight: 600;
}

.setting-control {
    padding: 0.625rem 1.125rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    background: var(--white);
    font-weight: 700;
}

/* =============== Toggle Switch =============== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    transition: var(--transition);
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* =============== Bottom Navigation =============== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--white);
    border-top: 3px solid var(--gray-100);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.625rem;
    transition: var(--transition);
    font-weight : 700;
}

.nav-item i {
    font-size: 1.5rem;
}

.nav-item.active {
    color: var(--primary);
}

/* =============== Task Card States =============== */
.task-card.completed {
    background: var(--success-bg);
    border: 3px solid var(--success);
    cursor: pointer;
}

.task-card.completed .task-icon {
    background: var(--success);
    color: var(--white);
}

.completed-badge {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--success-dark);
    font-weight: 800;
}

.task-icon.completed {
    background: var(--success) !important;
    color: var(--white) !important;
}

/* Task Card Row Layout */
.task-card-row {
    background: var(--white);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: var(--transition);
    cursor: not-allowed;
    opacity: 0.5;
    border: 3px solid var(--gray-200);
}

.task-card-row.available,
.task-card-row.completed {
    cursor: pointer;
    opacity: 1;
}

.task-card-row.available:hover,
.task-card-row.completed:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.task-card-row.completed {
    background: var(--success-bg);
    border: 3px solid var(--success);
}

.task-card-row.locked {
    background: var(--gray-50);
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.task-card-header .task-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.task-card-row.completed .task-icon {
    background: var(--success);
    color: var(--white);
}

.task-card-row.locked .task-icon {
    background: var(--gray-200);
    color: var(--gray-500);
}

.task-info {
    flex: 1;
}

.task-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
}

.task-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--gray-600);
    font-weight: 600;
}

.task-images {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    padding: 0.625rem 0;
}

.task-thumbnail {
    width: 18%;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 3px solid var(--gray-200);
    transition: var(--transition);
}

.task-card-row:hover .task-thumbnail {
    border-color: var(--primary);
}

.task-card-row.completed .task-thumbnail {
    border-color: var(--success);
}

.task-thumbnail-placeholder {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 1.75rem;
    flex-shrink: 0;
    border: 3px solid var(--gray-200);
}

/* Scrollbar for images */
.task-images::-webkit-scrollbar {
    height: 8px;
}

.task-images::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.task-images::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.task-images::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* =============== Responsive Design =============== */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: var(--bottom-nav-height);
    }
    
    .task-page .app-header {
        display: none;
    }
    
    .task-page .main-content {
        padding-top: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .header-center {
        display: none;
    }
    
    .header-stats {
        gap: 0.5rem;
    }
    
    .stat-badge span {
        display: none;
    }
    
    .stat-badge {
        padding: 0.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .language-showcase {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
        .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .progress-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .progress-details {
        padding: 1.5rem;
    }
    
    .activity-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .activity-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .stage-progress-item {
        padding: 1.25rem;
    }
    
    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .language-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .auth-container {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
     .task-container {
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
        margin-top: 0;
    }
    
    .task-page {
        padding: 0;
        align-items: stretch;
        padding-top: 0;
    }
    
    .task-card-row {
        padding: 1.25rem;
    }
    
    .task-thumbnail,
    .task-thumbnail-placeholder {
        width: calc((100% - 14px) / 5);
        height: auto;
    }
    
    .task-card-header .task-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .task-info h4 {
        font-size: 1.05rem;
    }
    
    .level-selector-btn {
        padding: 1.25rem;
    }
    
    .level-selector-content > i {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .level-selector-title {
        font-size: 1.05rem;
    }
    
    .level-selector-desc {
        font-size: 0.875rem;
    }
    
    .level-dropdown-item {
        padding: 1.125rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .language-item img {
        width: 56px;
        height: 56px;
    }
    
    .language-item h4 {
        font-size: 0.95rem;
    }
    
    .language-item p {
        font-size: 0.8rem;
    }
    
        .practice-options {
        grid-template-columns: 1fr;
    }
    
    .progress-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
    
    .side-menu {
        left: 0;
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        padding-bottom: 0;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .app-header {
        left: var(--sidebar-width);
    }
    
    .header-center {
        display: flex;
    }
    
    .header-stats span {
        display: inline;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .languages-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .language-options {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =============== Print Styles =============== */
@media print {
    .app-header,
    .side-menu,
    .bottom-nav,
    .menu-toggle,
    .user-menu-trigger {
        display: none;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .page {
        padding: 1rem;
    }
}

/* =============== Accessibility =============== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline-offset: 4px;
}

/* =============== Utility Classes =============== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* =============== Loading States =============== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============== Custom Scrollbar =============== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* =============== Selection =============== */
::selection {
    background: var(--primary);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary);
    color: var(--white);
}