/* Basic Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #2b0410, #42081d, #081c42, #04091f, #1a0322);
    background-size: 400% 400%;
    animation: moveGradient 14s ease infinite;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

@keyframes moveGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Ambient Orbs (Moving Red & Blue Glows) */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -20%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.35) 0%, rgba(139, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: moveOrbRed 18s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 85vw;
    height: 85vw;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.35) 0%, rgba(0, 31, 63, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: moveOrbBlue 20s ease-in-out infinite alternate;
}

@keyframes moveOrbRed {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40vw, 30vh) scale(1.2);
    }
    100% {
        transform: translate(10vw, 50vh) scale(0.9);
    }
}

@keyframes moveOrbBlue {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-35vw, -30vh) scale(1.25);
    }
    100% {
        transform: translate(-10vw, -45vh) scale(0.95);
    }
}

/* Header Section */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 360px;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    padding-top: max(0px, env(safe-area-inset-top));
    z-index: 50;
}

@media (min-width: 768px) {
    .header-container {
        max-width: 680px;
    }
}

.logo-img {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
    display: block;
}

.section-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-align: center;
    font-size: 1.1rem;
    margin: 5px 0;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

.section-subtitle {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-align: center;
    font-size: 0.75rem;
    color: #eee;
    margin-bottom: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    font-weight: bold;
}

/* Main Content Positioning */
.main-container {
    width: 100%;
    position: absolute;
    top: 45%;
    left: 0;
    right: 0;
    z-index: 10;
}

.khoi-logo-bg {
    width: 100%;
}

@media (min-width: 1024px) {
    .khoi-logo-bg {
        background-color: rgba(0, 0, 0, 0.3);
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
}

/* Country Flag Grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .country-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .country-grid {
        gap: 2.5rem;
    }
}

.country-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.country-item img {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    width: 86px;
    height: 86px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .country-item img {
        width: 120px !important;
        height: 120px !important;
    }
}

@media (min-width: 1024px) {
    .country-item img {
        width: 144px !important;
        height: 144px !important;
    }
}

.country-item:hover img {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
    transform: scale(1.03);
}

.country-title {
    font-size: 16px;
    text-align: center;
    margin-top: 0.5rem;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

@media (min-width: 768px) {
    .country-title {
        font-size: 1.25rem;
    }
}

/* Banner Live Container */
.banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    gap: 20px;
}

@media (min-width: 768px) {
    .banner-container {
        width: 60%;
        gap: 100px;
    }
}

@media (min-width: 1280px) {
    .banner-container {
        width: 40%;
        margin-top: 0;
    }
}

.banner-container img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Footer Section */
.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.footer-link {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 1px;
}

@media (min-width: 768px) {
    .footer-link {
        font-size: 1rem;
        margin-top: 0;
    }

    .section-title {
        font-size: 2.2rem !important;
        margin-bottom: 5px !important;
    }

    .section-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 30px !important;
    }

    .main-container {
        top: 48% !important;
    }
}
