* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light theme - default */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --accent-primary: #0891b2;
    --accent-secondary: #16a34a;
    --accent-tertiary: #0284c7;
    --hover-bg: #f0f9ff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    /* Dark theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
    --accent-primary: #06b6d4;
    --accent-secondary: #22c55e;
    --accent-tertiary: #3b82f6;
    --hover-bg: #1e3a8a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.wrapper {
    max-width: 900px;
    width: 100%;
}

.content {
    text-align: center;
}

.banner-section {
    margin-bottom: 50px;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
}

header {
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0;
    transition: color 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px 18px;
    font-family: inherit;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.toggle-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.toggle-text {
    font-size: 0.9rem;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.sun-icon,
.light-mode-text {
    opacity: 1;
}

.moon-icon,
.dark-mode-text {
    opacity: 0;
    position: absolute;
}

body.dark-mode .sun-icon,
body.dark-mode .light-mode-text {
    opacity: 0;
    position: absolute;
}

body.dark-mode .moon-icon,
body.dark-mode .dark-mode-text {
    opacity: 1;
    position: relative;
}

.intro-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 35px 30px;
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.how-it-works {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 35px 30px;
    margin-bottom: 45px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.how-it-works h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.how-it-works ul {
    list-style: none;
    padding: 0;
}

.how-it-works li {
    padding: 12px 0;
    padding-left: 35px;
    position: relative;
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: color 0.3s ease;
}

.how-it-works li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.language-selection {
    margin-bottom: 45px;
}

.language-selection h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.lang-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    font-size: inherit;
    border-radius: 8px;
}

.lang-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transition: left 0.3s ease;
    z-index: 0;
    border-radius: 6px;
}

.lang-card:hover::before,
.lang-card.active::before {
    left: 0;
}

.lang-card:hover,
.lang-card.active {
    color: #ffffff;
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.lang-card.active {
    border-color: var(--accent-secondary);
}

.lang-card.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    color: #ffffff;
    z-index: 1;
    font-weight: 700;
}

.lang-name {
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.action-section {
    margin-top: 50px;
}

.start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 22px 50px;
    background: var(--accent-primary);
    color: #ffffff;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 280px;
    cursor: pointer;
    font-family: inherit;
}

.start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-secondary);
    transition: left 0.3s ease;
    z-index: 0;
    border-radius: 6px;
}

.start-button:hover::before {
    left: 0;
}

.start-button:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.start-button span {
    position: relative;
    z-index: 1;
}

.button-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.start-button:hover .button-arrow {
    transform: translateX(5px);
}

/* Fade transition for text changes */
.fade-out {
    opacity: 0 !important;
}

.fade-in {
    opacity: 1 !important;
}

@media (max-width: 600px) {
    body {
        padding: 30px 15px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .theme-toggle {
        padding: 8px 14px;
        top: 15px;
        right: 15px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .toggle-text {
        font-size: 0.85rem;
    }

    .intro-section,
    .how-it-works {
        padding: 30px 20px;
    }

    .intro-text {
        font-size: 1.1rem;
    }

    .how-it-works h2 {
        font-size: 1.3rem;
    }

    .how-it-works li {
        font-size: 1.05rem;
        padding-left: 30px;
    }

    .language-selection h2 {
        font-size: 1.2rem;
    }

    .language-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .lang-card {
        padding: 30px 20px;
        min-height: 100px;
    }

    .lang-name {
        font-size: 1.3rem;
    }

    .start-button {
        padding: 20px 40px;
        font-size: 1.2rem;
        min-width: 240px;
    }
}
