@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&display=swap');

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif', serif;
    background: #0a0a0a;
    color: #e0d5c0;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ========== HEADER / NAV ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(20, 10, 5, 0.95) 0%, rgba(20, 10, 5, 0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(20, 10, 5, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 65px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #c9b06b;
    position: relative;
    transition: all 0.3s ease;
}
.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    transition: width 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    text-decoration: none;
    color: #f5e6a3;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 80%;
}

.age-badge {
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.age-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: #c9b06b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* ========== HERO SECTION (BANNER) ========== */
.hero-demo {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-demo .hero-bg {
    position: relative;
    width: 100%;
}

.hero-demo .hero-bg img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-demo .hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, #0a0a0a 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-demo .hero-content {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.download-buttons a {
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.download-buttons a img {
    height: 45px;
    width: auto;
}

.download-buttons a:hover {
    transform: translateY(-3px);
    filter: brightness(1.2);
}

.btn-taingay {
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.btn-taingay img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6));
}

.btn-taingay:hover {
    animation-play-state: paused;
}

.btn-taingay:hover img {
    filter: brightness(1.3) drop-shadow(0 0 30px rgba(212, 175, 55, 0.8));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ========== DANH TƯỚNG SECTION ========== */
.danhtuong-demo {
    position: relative;
    z-index: 10;
    margin-top: -180px;
    pointer-events: none;
}

.danhtuong-demo img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

/* ========== ĐẶC SẮC GAME SECTION ========== */
.features-demo {
    position: relative;
    padding: 0 0 80px 0;
    margin-top: -100px;
    overflow: hidden;
    background: url('/frontend/images/home/dacsacbg.png') center top / cover no-repeat;
}

.features-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 2, 0.6);
    z-index: 0;
}

.features-demo .section-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 0;
}

.features-demo .section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.features-demo .section-title img {
    max-height: 50px;
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

/* Carousel container */
.carousel-demo {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track-wrapper {
    position: relative;
    overflow: hidden;
    border: 3px solid #8b6914;
    border-radius: 4px;
    box-shadow:
        inset 0 0 60px rgba(139, 105, 20, 0.15),
        0 0 40px rgba(0, 0, 0, 0.5);
    background: rgba(15, 8, 3, 0.9);
}

/* Corner decorations */
.carousel-track-wrapper::before,
.carousel-track-wrapper::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #d4af37;
    z-index: 5;
    pointer-events: none;
}

.carousel-track-wrapper::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.carousel-track-wrapper::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Carousel navigation buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.carousel-btn img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:hover img {
    filter: drop-shadow(0 2px 12px rgba(212, 175, 55, 0.5)) brightness(1.2);
}

.carousel-btn--prev {
    left: -80px;
}

.carousel-btn--next {
    right: -80px;
}

/* Carousel dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.carousel-dot {
    width: 14px;
    height: 14px;
    border: 2px solid #8b6914;
    transform: rotate(45deg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(139, 105, 20, 0.1);
}

.carousel-dot:hover,
.carousel-dot.active {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

/* ========== FOOTER ========== */
.footer-demo {
    background: linear-gradient(180deg, #0a0a0a, #050505);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 30px 20px;
    text-align: center;
}

.footer-demo .footer-company {
    font-size: 15px;
    font-weight: 700;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.footer-demo .footer-info {
    font-size: 12px;
    color: #8a7a65;
    margin-bottom: 5px;
    line-height: 1.6;
}

.footer-demo .footer-license {
    margin-bottom: 12px;
}

.footer-demo .footer-license a {
    font-size: 12px;
    color: #a09080;
    transition: color 0.3s ease;
}

.footer-demo .footer-license a:hover {
    color: #f5e6a3;
}

.footer-demo .footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-demo .footer-links a {
    font-size: 13px;
    color: #c9b06b;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}

.footer-demo .footer-links a:hover {
    color: #f5e6a3;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.footer-demo .footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.footer-demo .footer-links a:hover::after {
    width: 100%;
}

.footer-demo .footer-divider {
    color: #5a5040;
    font-size: 13px;
}

.footer-demo .footer-copyright {
    font-size: 12px;
    color: #5a5040;
    letter-spacing: 1px;
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== PARTICLES ========== */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #d4af37;
    border-radius: 50%;
    opacity: 0;
    animation: floatUp 6s ease-in infinite;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0;
    }
    100% {
        opacity: 0;
        transform: translateY(-400px) scale(1);
    }
}

/* ========== RESPONSIVE ========== */
@media only screen and (max-width: 1024px) {
    .header-inner {
        height: 55px;
    }

    .logo img {
        height: 40px;
    }

    .nav-menu li a {
        font-size: 12px;
        padding: 8px 12px;
    }

    .danhtuong-demo {
        margin-top: -120px;
    }

    .features-demo {
        margin-top: -60px;
    }

    .carousel-btn--prev {
        left: -60px;
    }

    .carousel-btn--next {
        right: -60px;
    }

    .carousel-btn img {
        height: 50px;
    }
}

@media only screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(20, 10, 5, 0.98);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 0;
        transition: right 0.4s ease;
        border-left: 1px solid rgba(212, 175, 55, 0.2);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu li a {
        font-size: 16px;
        padding: 15px 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    }

    .age-badge {
        display: none;
    }

    .hero-demo .hero-content {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        padding: 20px 20px 25px;
        background: linear-gradient(to bottom, rgba(10, 10, 10, 0.7) 0%, #0a0a0a 100%);
        margin-top: -30px;
    }

    .download-buttons a img {
        height: 36px;
    }

    .btn-taingay img {
        height: 42px;
    }

    .danhtuong-demo {
        margin-top: -80px;
    }

    .features-demo {
        margin-top: -40px;
        padding-bottom: 50px;
    }

    .features-demo .section-inner {
        padding-top: 50px;
    }

    .carousel-btn--prev {
        left: 5px;
    }

    .carousel-btn--next {
        right: 5px;
    }

    .carousel-btn img {
        height: 40px;
    }

    .footer-demo .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media only screen and (max-width: 480px) {
    .hero-demo .hero-bg img{
        margin-top: 45px;
    }
    .header-inner {
        height: 50px;
        padding: 0 15px;
    }

    .logo img {
        height: 35px;
    }

    .hero-demo .hero-content {
        padding: 15px 15px 20px;
        margin-top: -20px;
    }

    .download-buttons {
        gap: 8px;
    }

    .download-buttons a img {
        height: 30px;
    }

    .btn-taingay img {
        height: 36px;
    }

    .danhtuong-demo {
        margin-top: -50px;
    }

    .features-demo {
        margin-top: -25px;
        padding-bottom: 40px;
    }

    .features-demo .section-inner {
        padding-top: 30px;
    }

    .carousel-btn img {
        height: 32px;
    }
}
