:root {
    --primary-color: rgba(51, 190, 255, 1);
    --secondary-color: #2c3e50;
    --accent-color: #f1c40f;
    --bg-dark: #1c1c1c; /* Sáng hơn ~10% so với #121212 */
    --bg-card: #282828; /* Sáng hơn tương ứng */
    --text-light: #e0e0e0;
    --text-dim: #b0b0b0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place behind content */
    pointer-events: none; /* Let clicks pass through to content */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)); /* Lightened overlay to 50% */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-light);
    line-height: 1.6;
}

header {
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: white;
    position: relative;
}

.logo-container img {
    height: 100px; /* Balanced middle ground */
    width: 100px;
    border-radius: 22px; 
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color);
    position: absolute;
    top: -12px; 
    transition: transform 0.3s ease;
    background: var(--bg-dark);
    z-index: 1001;
}

.logo-container span {
    margin-left: 115px; /* Balanced offset for 100px icon */
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 1.2px;
}

.logo-container:hover img {
    transform: scale(1.1);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Language Selector */
.lang-selector {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.lang-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(51, 190, 255, 0.2);
    transition: all 0.3s ease;
}

.lang-selected:hover {
    border-color: var(--primary-color);
    background: rgba(51, 190, 255, 0.1);
}

.lang-selected img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.lang-selected span {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
}

.chevron-down {
    border: solid var(--text-dim);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.lang-selector.active .chevron-down {
    transform: rotate(-135deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(51, 190, 255, 0.3);
    border-radius: 8px;
    list-style: none;
    padding: 8px 0;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 2000;
}

.lang-selector.active .lang-dropdown {
    display: block;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown li {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-dropdown li img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.lang-dropdown li:hover {
    background: rgba(51, 190, 255, 0.1);
    color: var(--primary-color);
}

.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('/images/banner.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.1rem;
    max-width: 900px;
    margin-bottom: 2rem;
    font-weight: 600;
    background: rgba(10, 25, 41, 0.85); /* Darker and more opaque for background contrast */
    padding: 25px 35px;
    border-radius: 12px;
    border: 1px solid rgba(0, 200, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    text-align: left;
}

.hero-sentence {
    display: block;
    margin-bottom: 12px;
}

.hero-sentence:last-child {
    margin-bottom: 0;
}

.slogan-img {
    max-width: 80%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(0, 200, 255, 0.6));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
        filter: drop-shadow(0 0 15px rgba(0, 200, 255, 0.4));
    }
    50% {
        transform: translateY(-10px);
        filter: drop-shadow(0 0 30px rgba(0, 200, 255, 0.8));
    }
    100% {
        transform: translateY(0px);
        filter: drop-shadow(0 0 15px rgba(0, 200, 255, 0.4));
    }
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.download-buttons a {
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 0;
    flex-shrink: 0;
}

.download-buttons a:hover {
    transform: translateY(-3px);
    filter: brightness(1.2);
    box-shadow: 0 5px 15px rgba(51, 190, 255, 0.3);
}

.download-buttons a img {
    height: 52px;
    width: auto;
    display: block;
}

main {
    padding: 4rem 12.5%; /* side margins reduced to 12.5% each side = 75% content width */
    max-width: 100%; 
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.4); /* Subtle transparent background for the main area */
}

section {
    margin-bottom: 4rem;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

.fqa-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.fqa-item a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.fqa-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.fqa-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

.fqa-item h4 {
    color: var(--primary-color);
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
    border: 2px solid rgba(51, 190, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Swiper Custom Styles */
.features-swiper {
    padding-bottom: 80px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: relative;
    max-width: 100%; 
    margin: 0 auto;
}

.swiper-slide {
    height: auto !important;
    padding: 10px; 
}

.feature-img {
    width: 100%; /* Reset to 100% to fix overlap */
    height: auto;
    border-radius: 12px;
    border: 2px solid rgba(51, 190, 255, 0.2);
    transition: all 0.3s ease;
    display: block;
    cursor: pointer;
}

.swiper-slide:hover .feature-img {
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(51, 190, 255, 0.4);
    transform: scale(1.05); 
}

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
    background: rgba(30, 77, 111, 0.8);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    top: auto !important;
    bottom: 5px !important;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: 900 !important;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: var(--primary-color);
    color: white !important;
}

.swiper-button-prev {
    left: calc(50% - 120px) !important;
}

.swiper-button-next {
    right: calc(50% - 120px) !important;
}

.swiper-pagination {
    bottom: 15px !important;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .features-swiper {
        padding-bottom: 70px !important;
    }
    
    .swiper-button-next, .swiper-button-prev {
        width: 35px !important;
        height: 35px !important;
        bottom: 0 !important;
    }
    
    .swiper-button-prev {
        left: calc(50% - 70px) !important;
    }

    .swiper-button-next {
        right: calc(50% - 70px) !important;
    }

    .swiper-pagination {
        bottom: 10px !important;
    }
}

.policy-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
}

/* Policy Tabs Styling */
.policy-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(51, 190, 255, 0.2);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(51, 190, 255, 0.1);
}

.tab-btn.active {
    color: white;
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(51, 190, 255, 0.4);
}

.policy-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.policy-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    background: #0a0a0a;
    padding: 3rem 5%;
    text-align: center;
    color: var(--text-dim);
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: white;
}

.brand-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.brand-link:hover {
    color: white;
    text-shadow: 0 0 8px var(--primary-color), 0 0 15px var(--primary-color);
    transform: translateY(-1px);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: white;
    color: var(--primary-color);
}

#back-to-top i {
    border: solid currentColor;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 5px;
    transform: rotate(-135deg);
    margin-top: 5px;
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 5%; /* Reduced padding */
        height: auto;
        min-height: auto;
        flex-direction: column; /* Reverted to column stack */
        justify-content: center;
        align-items: center;
        gap: 8px; /* Tightened gap between logo and nav */
    }

    .logo-container {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }

    .logo-container img {
        height: 70px; /* Slightly smaller to save space */
        width: 70px;
        position: relative;
        top: 0;
        border-radius: 15px;
    }

    .logo-container span {
        margin-left: 12px;
        font-size: 1.2rem;
        white-space: nowrap;
    }

    nav ul {
        gap: 15px;
        margin-bottom: 5px;
    }

    nav a {
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}
