/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 6rem 0 4rem;
    margin-bottom: 3rem;
    position: relative;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.375rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-decoration {
    width: 100px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 0 auto;
    border-radius: 2px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Language Selection */
.language-selection {
    flex: 1;
    margin-bottom: 3rem;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.language-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-light), 0 2px 4px var(--shadow-light);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.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:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px var(--shadow-medium), 0 10px 20px var(--shadow-light);
    border-color: var(--accent-primary);
}

.language-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.language-card:hover::before {
    left: 100%;
}

.card-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--gradient-accent);
    border-radius: 50%;
    opacity: 0.1;
    transition: all 0.4s ease;
}

.language-card:hover .card-decoration {
    transform: scale(1.5);
    opacity: 0.2;
}

.language-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 2rem;
    box-shadow: 0 12px 24px var(--shadow-medium);
    transition: all 0.4s ease;
}

.language-card:hover .language-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 20px 40px var(--shadow-heavy);
}

.language-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.language-subtitle {
    font-size: 1.125rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.language-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .hero-section {
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .language-card {
        padding: 2.5rem 1.5rem;
    }
    
    .language-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.25rem;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .languages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .language-card {
        padding: 2rem 1rem;
    }
    
    .language-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .language-title {
        font-size: 1.5rem;
    }
}