/* Main CSS for AI Coding Learning Platform - CodeRoyal */
/* Unified Theme System with Light and Dark Modes */

/* Light Theme (Default) */
:root {
    /* Background Colors - Light Theme */
    --bg-body: #f8f9fa;
    --bg-elevated: #ffffff;
    --bg-soft: #f1f3f5;
    --bg-header: #ffffff;
    --bg-footer: #f8f9fa;
    
    /* Text Colors - Light Theme (High Contrast) */
    --text-main: #1a1a1a;
    --text-muted: #6c757d;
    --text-light: #868e96;
    --text-inverse: #ffffff;
    --text-link: #6366f1;
    
    /* Primary / Accent Colors */
    --color-primary: #6366f1;
    --color-primary-soft: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-accent: #22d3ee;
    
    /* Status Colors */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    
    /* Border Colors - Light Theme */
    --border-subtle: #e9ecef;
    --border-medium: #dee2e6;
    --border-dark: #ced4da;
    
    /* Shadows - Light Theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    --gradient-success: linear-gradient(135deg, var(--color-success), #16a34a);
    --gradient-warning: linear-gradient(135deg, var(--color-warning), #d97706);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Legacy variables for compatibility */
    --bg-primary: var(--bg-elevated);
    --bg-secondary: var(--bg-body);
    --bg-tertiary: var(--bg-soft);
    --bg-card: var(--bg-elevated);
    --bg-input: var(--bg-elevated);
    
    --text-primary: var(--text-main);
    --text-secondary: var(--text-muted);
    
    --border-color: var(--border-subtle);
    --border-color-light: var(--border-subtle);
    --border-color-dark: var(--border-medium);
}

/* Dark Theme */
[data-theme="dark"],
body.dark-mode {
    /* Background Colors - Dark Theme */
    --bg-body: #0f172a;
    --bg-elevated: #1e293b;
    --bg-soft: #334155;
    --bg-header: #1e293b;
    --bg-footer: #0f172a;
    
    /* Text Colors - Dark Theme (High Contrast) */
    --text-main: #f1f5f9;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    --text-inverse: #0f172a;
    --text-link: #818cf8;
    
    /* Border Colors - Dark Theme */
    --border-subtle: #334155;
    --border-medium: #475569;
    --border-dark: #64748b;
    
    /* Shadows - Dark Theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
    background-color: var(--bg-body);
    direction: rtl;
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

/* Typography - Paragraphs */
p {
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Typography - Links */
a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

a:visited {
    color: var(--text-link);
}

header {
    background-color: var(--bg-header);
    color: var(--text-main);
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] header,
body.dark-mode header {
    background: linear-gradient(135deg, var(--bg-header) 0%, var(--bg-body) 100%);
}

header h1 {
    margin-bottom: 0.5rem;
}

header h1 a {
    color: var(--text-main);
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

header nav a {
    color: var(--text-main);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color var(--transition-normal);
}

header nav a:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 3rem 2rem 4rem;
}

footer {
    background-color: var(--bg-footer);
    color: var(--text-main);
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-subtle);
}

[data-theme="dark"] footer,
body.dark-mode footer {
    background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-footer) 100%);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero,
body.dark-mode .hero {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-soft) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, 20px) rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-mock {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.mock-code-editor {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.mock-editor-header {
    background: var(--bg-soft);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mock-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.mock-dot:nth-child(1) { background: #ef4444; }
.mock-dot:nth-child(2) { background: #f59e0b; }
.mock-dot:nth-child(3) { background: #22c55e; }

.mock-filename {
    margin-right: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.mock-code-content {
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    direction: ltr;
    text-align: left;
}

.mock-code-line {
    display: block;
    margin-bottom: 0.5rem;
}

.mock-keyword {
    color: #c678dd;
}

.mock-function {
    color: #61afef;
}

.mock-string {
    color: #98c379;
}

.mock-comment {
    color: #5c6370;
}

.language-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.languages-more {
    margin-top: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.3;
    font-weight: 700;
    animation: fadeInDown 0.8s ease-out;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .btn-primary,
body.dark-mode .btn-primary {
    color: #0f172a;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary:hover,
body.dark-mode .btn-secondary:hover {
    color: #0f172a;
}

.btn:hover {
    transform: translateY(-2px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    line-height: 1.3;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.8;
}

/* Languages Section */
.languages-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.language-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.language-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.language-card:hover::before {
    left: 100%;
}

.language-card:nth-child(1) { animation-delay: 0.1s; }
.language-card:nth-child(2) { animation-delay: 0.2s; }
.language-card:nth-child(3) { animation-delay: 0.3s; }
.language-card:nth-child(4) { animation-delay: 0.4s; }
.language-card:nth-child(5) { animation-delay: 0.5s; }
.language-card:nth-child(6) { animation-delay: 0.6s; }
.language-card:nth-child(7) { animation-delay: 0.7s; }
.language-card:nth-child(8) { animation-delay: 0.8s; }
.language-card:nth-child(n+9) { animation-delay: 0.9s; }

.language-card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.language-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition-normal);
}

.language-card:hover .language-icon {
    transform: scale(1.1) rotate(5deg);
}

.language-name {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.language-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    min-height: 3rem;
}

.language-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--text-inverse);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: all var(--transition-normal);
    margin-top: auto;
}

[data-theme="dark"] .language-link,
body.dark-mode .language-link {
    color: #0f172a;
}

.language-link:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.language-link i {
    transition: transform 0.3s ease;
}

.language-link:hover i {
    transform: translateX(-3px);
}

.languages-empty {
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.note-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.note-text code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Features Section */
.features-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Message */
.welcome-message {
    background: var(--gradient-success);
    color: var(--text-inverse);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    animation: slideDown 0.5s ease;
}

.welcome-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.welcome-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.welcome-content p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    main {
        padding: 0 1.5rem;
    }
    
    .header-container {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .hero {
        padding: 2.5rem 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .languages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .dashboard {
        padding: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .continue-learning-section {
        padding: 1rem;
    }
    
    .learning-paths-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 0.5rem;
        margin: 0.5rem auto;
    }
    
    .hero {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .language-card {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .dashboard {
        padding: 1rem;
    }
    
    .continue-learning-section {
        padding: 0.75rem;
    }
}

/* Form Styles */
.form-section {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.form-section h2 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-elevated);
    color: var(--text-main);
    transition: all var(--transition-normal);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: var(--bg-elevated);
}

.form-group input[type="text"]:hover,
.form-group input[type="email"]:hover,
.form-group input[type="password"]:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-dark);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.checkbox-label:hover,
.radio-label:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
}

.checkbox-label input[type="checkbox"]:checked + span,
.radio-label input[type="radio"]:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

.checkbox-label input[type="checkbox"]:checked ~ *,
.radio-label input[type="radio"]:checked ~ * {
    border-color: var(--color-primary);
}

.checkbox-label:has(input:checked),
.radio-label:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label span,
.radio-label span {
    flex: 1;
    color: var(--text-main);
}

button,
.btn-upgrade {
    background-color: var(--color-info);
    color: var(--text-inverse);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

button:hover,
.btn-upgrade:hover {
    background-color: var(--color-info);
    opacity: 0.9;
}

/* Messages */
.error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-danger);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-right-width: 3px;
}

.error strong,
.error p {
    color: var(--color-danger);
    font-weight: 600;
}

.success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--color-success);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-right-width: 3px;
}

.success strong,
.success p {
    color: var(--color-success);
    font-weight: 600;
}

.note {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--color-warning);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    border-right-width: 3px;
}

.note strong {
    color: var(--color-warning);
}

/* Dashboard */
.dashboard {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

.dashboard h2 {
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 2rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.dashboard-card:hover {
    transform: translateY(-2px) scale(1.01);
    border-color: var(--color-primary);
}

.dashboard-card h3 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.dashboard-card p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-success);
}

/* Welcome Box */
.welcome-box {
    margin-bottom: 2rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-box i {
    font-size: 2rem;
    flex-shrink: 0;
}

/* Info Box */
.info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--color-primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-box i {
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.info-box h3 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.info-box p {
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.info-box div {
    flex: 1;
}

/* Placement Test Styles */
.placement-question-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.question-title {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    font-size: 1.1rem;
}

.placement-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.placement-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 100%;
}

.placement-option:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(-4px);
}

.placement-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.placement-option:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-main);
    flex-shrink: 0;
}

.placement-option:has(input:checked) .option-letter {
    background: var(--color-primary);
    color: var(--text-inverse);
    border-color: var(--color-primary);
}

[data-theme="dark"] .placement-option:has(input:checked) .option-letter,
body.dark-mode .placement-option:has(input:checked) .option-letter {
    color: #0f172a;
}

.option-text {
    flex: 1;
    color: var(--text-main);
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: left;
}

/* Exercise Status Bar */
.exercise-status-bar {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: space-around;
}

.exercise-status-bar .status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.exercise-status-bar .status-item i {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.exercise-status-bar .status-label {
    font-weight: 600;
    color: var(--text-muted);
}

.exercise-status-bar .status-value {
    font-weight: 700;
    color: var(--text-main);
}

.submit-result {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.submit-result.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--color-success);
}

.submit-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-danger);
}

.submit-result h4 {
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-result.success h4 {
    color: var(--color-success);
}

.submit-result.error h4 {
    color: var(--color-danger);
}

.feedback-content {
    color: var(--text-main);
    line-height: 1.8;
}

/* AI Chat Status Grid */
.ai-chat-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ai-chat-status-grid .status-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-normal);
}

.ai-chat-status-grid .status-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.ai-chat-status-grid .status-card i {
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.ai-chat-status-grid .status-card div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ai-chat-status-grid .status-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ai-chat-status-grid .status-value {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Continue Learning Section */
.continue-learning-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

.continue-learning-section h3 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

.learning-paths-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.learning-path-card {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.learning-path-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.path-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.path-header-info h4 {
    color: var(--text-main);
    margin: 0;
    flex: 1;
    line-height: 1.3;
    font-weight: 700;
}

.language-badge {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

[data-theme="dark"] .language-badge,
body.dark-mode .language-badge {
    color: #0f172a;
}

.path-progress {
    margin: 1rem 0;
}

.progress-bar-small {
    width: 100%;
    height: 8px;
    background: var(--bg-soft);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-subtle);
}

.progress-fill-small {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

.progress-text-small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.next-task-info {
    margin: 1rem 0;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 6px;
    border-right: 3px solid var(--color-primary);
}

.next-task-info p {
    margin: 0;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.8;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: inline-block;
}

/* Start Learning Section */
.start-learning-section {
    margin: 2rem 0;
}

.start-learning-box {
    background: var(--bg-elevated);
    color: var(--text-main);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-subtle);
}

[data-theme="dark"] .start-learning-box,
body.dark-mode .start-learning-box {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-soft) 100%);
}

.start-learning-box i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.start-learning-box h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.start-learning-box p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Quick Actions */
.quick-actions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

.quick-actions h3 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-card {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.action-card:hover {
    background: var(--color-primary);
    color: var(--text-inverse);
    border-color: var(--color-primary);
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

[data-theme="dark"] .action-card:hover,
body.dark-mode .action-card:hover {
    color: #0f172a;
}

.action-card i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.action-card span {
    display: block;
    font-weight: 600;
}

/* Onboarding Progress */
.onboarding-progress {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.onboarding-step {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-soft);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
}

.onboarding-step.active {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
}

.onboarding-step.completed {
    border-color: var(--color-success);
    background: rgba(34, 197, 94, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    color: var(--text-muted);
}

.onboarding-step.active .step-number {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
}

.onboarding-step.completed .step-number {
    border-color: var(--color-success);
    background: var(--color-success);
    color: #0b1120;
}

.step-content h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin: 0;
}

/* Onboarding Card */
.onboarding-card {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.onboarding-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #0b1120;
}

.onboarding-card-content {
    flex: 1;
}

.onboarding-card-content h3 {
    color: var(--text-main);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.onboarding-card-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Today's Action Card */
.todays-action-card {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.todays-action-card h3 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.todays-action-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.todays-action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.todays-action-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pricing */
.pricing {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    background: var(--bg-card);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.pricing-card.featured {
    border-color: var(--color-info);
    border-width: 3px;
}

.pricing-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

.pricing-card ul {
    list-style: none;
    text-align: right;
    margin: 1.5rem 0;
}

.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Settings */
.settings {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

/* Exercise */
.exercise {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.status-section {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.status-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.status-item {
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: 4px;
}

.status-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.status-item span {
    color: var(--color-secondary);
    font-weight: bold;
}

.exercise-content {
    margin-top: 1.5rem;
}

.exercise-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hint-response,
.submit-result {
    background: var(--bg-soft);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid var(--border-subtle);
}

.submit-result.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--color-success);
    border-right-width: 3px;
}

.submit-result.success h4 {
    color: var(--color-success);
}

.submit-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-danger);
    border-right-width: 3px;
}

.submit-result.error h4 {
    color: var(--color-danger);
}

.submit-result h4 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.feedback-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.exercise-header h3 {
    color: var(--text-main);
    margin: 0;
    flex: 1;
    font-weight: 700;
    line-height: 1.3;
}

.exercise-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exercise-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.exercise-instructions {
    margin: 1.5rem 0;
}

.exercise-instructions h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.exercise-note {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-right: 3px solid var(--color-primary);
}

.exercise-note p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.exercise-note i {
    color: var(--color-primary);
    margin-left: 0.5rem;
}

.hint-response h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* AI Chat */
.ai-chat {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.chat-container {
    margin-top: 1.5rem;
}

.chat-message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.user-message {
    background: var(--color-info);
    color: var(--text-inverse);
    margin-right: 2rem;
}

.ai-message {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    margin-left: 2rem;
}

.chat-form {
    margin-top: 2rem;
}

/* Onboarding */
.onboarding {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* Placement Test */
.placement-test {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

/* Links */
a {
    color: var(--text-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

