:root {
    --netflix-red: #E50914;
    --netflix-dark-red: #B20710;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --footer-bg: #141414;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 90px !important;
    }
}

/* Header */
.header {
    background: rgba(0,0,0,0.98);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    border-bottom: 3px solid var(--netflix-red);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4%;
    max-width: 1400px;
    margin: 0 auto;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(229,9,20,0.4));
    transition: transform 0.3s;
}

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

.site-name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.site-name-main {
    font-size: 24px;
    font-weight: 800;
    color: var(--netflix-red);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(229,9,20,0.3);
}

.site-name-sub {
    font-size: 11px;
    color: var(--text-gray);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #333;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
    font-size: 14px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--netflix-red);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-login {
    color: var(--text-white);
    border: 1px solid var(--text-gray);
    background: transparent;
}

.btn-login:hover {
    border-color: var(--netflix-red);
    color: var(--netflix-red);
}

.btn-register {
    background: var(--netflix-red);
    color: white;
    border: 1px solid var(--netflix-red);
}

.btn-register:hover {
    background: var(--netflix-dark-red);
}

/* Navigation */
.nav-bar {
    background: rgba(20,20,20,0.95);
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid #222;
}

.nav-bar::-webkit-scrollbar {
    display: none;
}

.nav-content {
    display: flex;
    padding: 0 4%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-item {
    color: var(--text-gray);
    text-decoration: none;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--text-white);
    border-bottom-color: var(--netflix-red);
}

.nav-badge {
    background: var(--netflix-red);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
}

/* Carousel */
.carousel-section {
    margin-top: 115px;
    padding: 15px 0;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-out;
    gap: 15px;
    align-items: center;
}

.carousel-slide {
    min-width: calc(100% - 80px);
    flex-shrink: 0;
    opacity: 0.6;
    transform: scale(0.95);
    transition: all 0.4s;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #1a1a1a;
    height: 160px;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    color: #333;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: var(--netflix-red);
    color: white;
}

.carousel-prev { left: 5px; }
.carousel-next { right: 5px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--netflix-red);
    width: 20px;
    border-radius: 4px;
}

/* Sections */
.section {
    max-width: 1400px;
    margin: 25px auto;
    padding: 0 4%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--netflix-red);
}

.view-all {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
    cursor: pointer;
}

.game-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-badge {
    position: absolute;
    top: 8px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.badge-hot { left: 8px; background: #ff4757; color: white; }
.badge-discount { right: 8px; background: var(--netflix-red); color: white; }

.game-info {
    padding: 10px;
}

.game-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-region {
    font-size: 11px;
    color: var(--text-gray);
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.app-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    cursor: pointer;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.app-card:active {
    transform: scale(0.95);
}

.app-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 8px;
    position: relative;
}

.app-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--netflix-red);
    color: white;
    font-size: 8px;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: bold;
}

.app-name {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
}

.app-price {
    color: var(--netflix-red);
    font-weight: bold;
    font-size: 13px;
}

.app-period {
    font-size: 10px;
    color: var(--text-gray);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    border-top: 3px solid var(--netflix-red);
    padding: 40px 4% 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--text-white);
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h3 i {
    color: var(--netflix-red);
}

.footer-section a {
    display: block;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section a:hover {
    color: var(--netflix-red);
    padding-left: 5px;
}

.footer-section a i {
    font-size: 12px;
    color: #555;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 18px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.social-links a:hover {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
    transform: translateY(-3px);
    padding-left: 0;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    color: var(--text-gray);
    font-size: 13px;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.payment-icon {
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mascot */
.mascot-float {
    position: fixed;
    bottom: 100px;
    right: 10px;
    width: 65px;
    height: auto;
    z-index: 100;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.98);
    border-top: 1px solid #333;
    padding: 8px 0;
    z-index: 9999;
    height: 70px;
}

.mobile-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    height: 100%;
}

.mobile-nav-item {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    padding: 5px;
    height: 100%;
    justify-content: center;
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--netflix-red);
}

.mobile-badge {
    position: absolute;
    top: 5px;
    background: var(--netflix-red);
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 8px;
}

/* Responsive */
@media (min-width: 769px) {
    body { padding-bottom: 0 !important; }
    
    .header-top { 
        height: 70px; 
        padding: 10px 4%;
    }

    .logo-img { height: 50px; }
    
    .site-name-main { font-size: 28px; }
    .site-name-sub { font-size: 12px; }

    .search-box { margin: 0 30px; }
    
    .btn { padding: 10px 25px; font-size: 15px; }
    
    .carousel-section { margin-top: 130px; }
    .carousel-container { padding: 0 50px; }
    .carousel-slide {
        min-width: calc(80% - 40px);
        height: 280px;
    }
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .app-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }

    .footer {
        padding: 60px 4% 30px;
        margin-top: 80px;
    }

    .mobile-nav { display: none; }
    .mascot-float { 
        width: 90px; 
        bottom: 30px; 
        right: 30px; 
    }
}

@media (max-width: 768px) {
    .btn { padding: 6px 12px; font-size: 12px; }
    
    .site-name { display: none; }
    .logo { gap: 0; }
    .search-box { margin: 0 10px; }
    
    .carousel-slide {
        height: 160px;
        min-width: calc(100% - 60px);
    }
    
    .app-grid { grid-template-columns: repeat(3, 1fr); }
    .app-icon-wrapper { width: 45px; height: 45px; font-size: 20px; }

    .footer {
        padding: 30px 4% 100px;
        margin-top: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .payment-methods { gap: 10px; }
    .payment-icon { padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 380px) {
    .carousel-slide { height: 140px; }
    .btn { padding: 5px 8px; font-size: 11px; }
    .app-grid { grid-template-columns: repeat(2, 1fr); }
    .logo-img { height: 40px; }
}