:root {
    --itf-slate: #243747;
    --itf-orange: #f15f22;
    --itf-light-grey: #E6E6E6;
    --gradient-start: #f15f22;
    --gradient-end: #d7352a;
    --container-padding: 3rem;
    --card-gap: 2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--itf-slate);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

html {
    position: fixed;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.container {
    background: white;
    padding: var(--container-padding);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin: 1rem;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    width: 85%;
    max-width: 700px;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
}

.youtube-icon {
    font-size: 5.5rem;
    color: #FF0000;
    flex: 0 0 auto;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-icon i {
    transition: transform 0.3s ease;
}

.youtube-icon i:hover {
    transform: scale(1.1);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

.logo {
    max-height: 100px;
    width: auto;
}

.header-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    max-width: 400px;
}

.header-text {
    color: var(--itf-slate);
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 600;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.language-options {
    display: flex;
    justify-content: center;
    gap: var(--card-gap);
    flex-wrap: nowrap;
}

.language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--itf-light-grey);
    transition: all 0.2s ease;
    min-width: 200px;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    touch-action: manipulation;
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fi {
    font-size: 4rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 120px !important;
    height: 90px !important;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.2s ease;
}

.language-card:hover .fi {
    transform: scale(1.05);
}

.language-btn {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px;
}

.language-card:hover .language-btn {
    box-shadow: 0 5px 15px rgba(241, 95, 34, 0.3);
}

/* Tablet Breakpoint */
@media (max-width: 768px) {
    :root {
        --container-padding: 2rem;
        --card-gap: 1.5rem;
    }

    .container {
        margin: 1rem;
    }

    .header-text {
        font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    }
    
    .youtube-icon {
        font-size: 5rem;
    }
    
    .logo {
        max-height: 90px;
    }
    
    .language-options {
        flex-direction: column;
        align-items: stretch;
    }

    .language-card {
        width: 100%;
        max-width: none;
        padding: 1.25rem;
    }

    .fi {
        font-size: 3.5rem;
        width: 100px !important;
        height: 75px !important;
    }
}

/* Mobile Breakpoint */
@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
        --card-gap: 0.75rem;
    }

    .container {
        margin: 0;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .header {
        margin-bottom: 1.5rem;
        flex-shrink: 0;
    }
    
    .youtube-icon {
        font-size: 4.5rem;
    }
    
    .logo {
        max-height: 80px;
    }
    
    .language-options {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--card-gap);
        width: 100%;
        flex: 0 0 auto;
    }

    .language-card {
        padding: 0.75rem;
        gap: 0.75rem;
        margin: 0;
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .fi {
        width: 80px !important;
        height: 60px !important;
    }

    .language-btn {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* Ensure proper display on very small screens */
@media (max-width: 320px) {
    :root {
        --container-padding: 0.75rem;
        --card-gap: 0.5rem;
    }

    .header {
        margin-bottom: 1rem;
    }
    
    .youtube-icon {
        font-size: 4rem;
    }
    
    .logo {
        max-height: 70px;
    }
    
    .language-card {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .fi {
        width: 70px !important;
        height: 52.5px !important;
    }

    .language-btn {
        padding: 0.625rem;
        font-size: 0.95rem;
    }
}

.flags-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.flag-button {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
    padding: 1rem;
}

.flag-button:hover {
    transform: translateY(-5px);
}

.flag {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flag-button span {
    color: var(--itf-slate);
    font-size: 1.2rem;
    font-weight: 500;
}

.us-flag {
    background: linear-gradient(180deg, 
        #B31942 calc(100%/13), white calc(100%/13),
        #B31942 calc(2*100%/13), white calc(2*100%/13),
        #B31942 calc(3*100%/13), white calc(3*100%/13),
        #B31942 calc(4*100%/13), white calc(4*100%/13),
        #B31942 calc(5*100%/13), white calc(5*100%/13),
        #B31942 calc(6*100%/13), white calc(6*100%/13),
        #B31942 calc(7*100%/13)
    );
    background-color: white;
    position: relative;
}

.us-flag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 53.85%;
    background: #0A3161;
}

.russian-flag {
    background: linear-gradient(180deg, 
        #FFFFFF 33.33%,
        #0039A6 33.33% 66.66%,
        #D52B1E 66.66%
    );
}

.uzbek-flag {
    background: linear-gradient(180deg, 
        #0099B5 33.33%,
        #FFFFFF 33.33% 66.66%,
        #1EB53A 66.66%
    );
    position: relative;
}

.uzbek-flag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 33.33%;
    height: 100%;
    background: linear-gradient(180deg, 
        #CE1126 50%,
        #FFFFFF 50%
    );
} 