/* ===== Trạm Game Homepage Styles ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #010101;
    /* Default dark background 0a0a0a*/
    --color-surface: #141414;
    --color-surface-hover: #1f1f1f;
    --color-border: #2a2a2a;
    --color-text: #ffffff;
    --color-text-secondary: #a1a1a1;
    --color-text-muted: #666666;
    --color-primary: #DC2626;
    --color-primary-hover: #EF4444;
    --color-accent: #F97316;
    --card-width: clamp(250px, 14vw, 290px);
    --card-aspect-ratio: 2 / 3;
    --card-gap: 16px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

/* Launcher Mode - hide elements not needed in app */
body.launcher-mode .footer {
    display: none;
}

body.launcher-mode .view-all-link {
    display: none;
}

/* In launcher mode - show header but hide browser-specific elements */
body.launcher-mode .btn-get-launcher {
    display: none;
}

body.launcher-mode .header-nav {
    display: none;
}

body.launcher-mode .main-header {
    display: none;
}

body.launcher-mode .animated-bg-section {
    display: none;
}

body.launcher-mode .hero-section {
    display: none;
}

body.launcher-mode .vietnamese-hero-section {
    height: 600px;
    margin: 0;
}

/* Launcher mode - remove large side padding from categories */
body.launcher-mode .category-header {
    padding: 0 60px;
}

body.launcher-mode .games-scroll-container {
    padding: 0 60px;
}

body.launcher-mode .games-grid-container {
    padding: 0 60px;
}

body.launcher-mode .scroll-left {
    left: 10px;
}

body.launcher-mode .scroll-right {
    right: 10px;
}

body.launcher-mode .game-card-image-container {
    border-radius: 6px;
}

body.launcher-mode .game-card-glow {
    border-radius: 6px;
}

/* Launcher navigation tabs - only visible in launcher mode */
.launcher-nav {
    display: none;
}

body.launcher-mode .launcher-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.launcher-tab {
    padding: 8px 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.launcher-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.launcher-tab.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Header Navigation ===== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: transparent;
    z-index: 1000;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.main-header.scrolled {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
}

.header-logo {
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 32px;
    width: auto;
    transition: filter 0.3s ease;
}

/* Smart logo color detection classes */
.logo-img.logo-white {
    filter: brightness(0) invert(1);
}

.logo-img.logo-dark {
    filter: none;
}

/* Fallback: Make logo white when header is scrolled (dark background) */
.main-header.scrolled .logo-img:not(.logo-dark):not(.logo-white) {
    filter: brightness(0) invert(1);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.main-header.scrolled .nav-link {
    text-shadow: none;
}

.nav-link:hover {
    color: white;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.external-icon {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-get-launcher {
    padding: 8px 20px;
    background: #f5f5f5;
    color: #0a0a0a;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-get-launcher:hover {
    background: white;
    transform: scale(1.02);
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: rgba(255, 255, 255, 0.75);
}

.header-icon-btn:hover svg {
    fill: white;
}

/* Add padding to body for fixed header */
body:not(.launcher-mode) {
    padding-top: 0;
}

/* Make hero sections account for header */
body:not(.launcher-mode) .vietnamese-hero-section {
    margin-top: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== Skeleton Loading ===== */
.skeleton-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.skeleton-content {
    width: 100%;
    padding: 0;
}

.skeleton-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 99vh;
    min-height: 560px;
    position: relative;
    overflow: hidden;
}

.skeleton-hero-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-hero-overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
}

.skeleton-hero-title {
    width: 300px;
    height: 48px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 16px;
}

.skeleton-hero-desc {
    width: 500px;
    height: 20px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 24px;
}

.skeleton-hero-buttons {
    display: flex;
    gap: 16px;
}

.skeleton-btn {
    width: 140px;
    height: 48px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-category {
    padding: 30px 40px;
}

.skeleton-category-title {
    width: 200px;
    height: 28px;
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 20px;
}

.skeleton-cards-row {
    display: flex;
    gap: var(--card-gap);
    overflow: hidden;
}

.skeleton-game-card {
    width: var(--card-width);
    height: var(--card-height);
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    flex-shrink: 0;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* ===== Main Content ===== */
.main-content {
    min-height: 100vh;
}

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 92vh;
    min-height: 500px;
    overflow: hidden;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease-out;
}

.hero-slide.active .hero-bg {
    transform: scale(1);
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.95) 0%,
            rgba(0, 0, 0, 0.85) 30%,
            rgba(0, 0, 0, 0.5) 60%,
            rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}

/* Hero Video (plays on hover) */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.hero-video.playing {
    opacity: 1;
}

.hero-slide .hero-bg.video-active {
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.hero-content {
    position: absolute;
    bottom: 60px;
    left: 250px;
    right: 60px;
    z-index: 10;
}

/* ===== Hero Horizontal Layout (matching game-detail) ===== */
.hero-content-horizontal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.hero-logo-inline {
    max-width: 200px;
    max-height: 120px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.8));
    flex-shrink: 0;
}

.hero-title-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-title-text {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.hero-meta-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.hero-actions-row {
    display: flex;
    gap: 12px;
}

/* New Hero Buttons - Rounded style like game-detail */
.btn-hero-trailer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: white;
    color: black;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
}

.btn-hero-trailer:hover {
    background: #E0E0E0;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3),
        0 2px 10px rgba(255, 255, 255, 0.4);
}

.btn-hero-trailer .btn-icon {
    width: 18px;
    height: 18px;
}

.btn-hero-outline {
    padding: 12px 28px;
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Legacy hero styles (keep for backwards compatibility) */
.hero-logo {
    max-width: 280px;
    max-height: 100px;
    margin-bottom: 16px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.hero-desc {
    font-size: 16px;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin-bottom: 24px;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.btn-hero-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(220, 38, 38, 0.6);
}

.btn-hero-primary .btn-icon {
    width: 20px;
    height: 20px;
}

.btn-hero-secondary {
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* Hero Indicators */
.hero-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.indicator.active {
    width: 30px;
    border-radius: 5px;
    background: var(--color-primary);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Hero Navigation */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
    z-index: 20;
}

.hero-section:hover .hero-nav {
    opacity: 1;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-nav svg {
    width: 24px;
    height: 24px;
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

/* ===== Secondary Hero Banner ===== */
.secondary-hero-section {
    position: relative;
    width: 100%;
    height: 320px;
    margin: 30px 0;
    overflow: hidden;
}

.secondary-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.secondary-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            var(--color-bg) 0%,
            rgba(10, 10, 10, 0.6) 40%,
            rgba(10, 10, 10, 0.2) 70%,
            transparent 100%);
}

.secondary-hero-content {
    position: absolute;
    bottom: 40px;
    left: 100px;
    z-index: 10;
}

.secondary-hero-logo {
    max-width: 280px;
    max-height: 140px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8));
}

/* ===== Categories Section ===== */
.categories-section {
    padding: 0 0 40px;
}

.category-row {
    padding: 30px 0;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 450px;
    margin-bottom: 20px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.title-icon {
    font-size: 24px;
}

.view-all-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.view-all-link:hover {
    color: var(--color-primary);
}

/* Games Scroll Container - Pagination Style */
.games-scroll-container {
    position: relative;
    padding: 0 450px;
}

.games-row {
    display: flex;
    gap: var(--card-gap);
    padding: 10px 0 30px;
    transition: transform 0.4s ease;
}

/* ===== Games Grid Layout (2x5) ===== */
.games-grid-container {
    padding: 0 450px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: var(--card-gap);
    padding: 10px 0 30px;
}

.games-grid .game-card {
    flex: none;
    width: 100%;
    max-width: none;
}

/* ===== Game Card - Fixed 5 cards per view ===== */
.game-card {
    /* Calculate width: (100% - 4 gaps) / 5 cards */
    flex: 0 0 calc((100% - var(--card-gap) * 4) / 5);
    max-width: calc((100% - var(--card-gap) * 4) / 5);
    cursor: pointer;
    transition: transform var(--transition-medium);
}

.game-card:hover {
    transform: translateY(-10px);
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: all var(--transition-fast);
}

.games-scroll-container:hover .scroll-btn {
    opacity: 1;
}

.scroll-btn:hover {
    background: rgba(40, 40, 40, 0.95);
    border-color: var(--color-text-muted);
}

.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.scroll-btn svg {
    width: 20px;
    height: 20px;
}

.scroll-left {
    left: 400px;
}

.scroll-right {
    right: 400px;
}

.game-card-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: var(--card-aspect-ratio);
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-surface);
}

.game-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.game-card:hover .game-card-image {
    transform: scale(1.05);
}

/* Card Glow Effect */
.game-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
    z-index: -1;
    border-radius: 12px;
    filter: blur(20px);
    transform: scale(1.1) translateY(10px);
}

.game-card:hover .game-card-glow {
    opacity: 0.5;
}

/* Card Overlay - Hidden */
.game-card-overlay {
    display: none;
}

.game-card:hover .game-card-overlay {
    display: none;
}

/* Card Play Button - Hidden */
.game-card-play {
    display: none;
}

.game-card:hover .game-card-play {
    display: none;
}

.game-card-play svg {
    width: 24px;
    height: 24px;
    color: white;
    margin-left: 3px;
}

/* Card Badge */
.game-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--color-primary);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.game-card-badge.vietnamese {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.game-card-badge.new {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* Card Info */
.game-card-info {
    padding: 12px 0 0;
}

.game-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* ===== Vietnamese Hero Banner 2 ===== */
.vietnamese-hero-section {
    position: relative;
    width: 100%;
    height: 700px;
    margin: 30px 0;
    overflow: hidden;
}

.vietnamese-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease-out;
}

.vietnamese-hero-section:hover .vietnamese-hero-bg {
    transform: scale(1.02);
}

.vietnamese-hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.85) 20%,
            rgba(0, 0, 0, 0.4) 50%,
            transparent 100%);
}

.vietnamese-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.vietnamese-hero-logo {
    max-width: 450px;
    max-height: 150px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8));
}

.vietnamese-hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    font-weight: 400;
}

.btn-vietnamese-more {
    margin-top: 8px;
    padding: 10px 28px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-vietnamese-more:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

/* Thumbnails row at bottom */
.vietnamese-hero-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.vietnamese-thumbnail {
    width: 70px;
    height: 95px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    flex-shrink: 0;
}

.vietnamese-thumbnail:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.vietnamese-thumbnail.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
}

.vietnamese-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Launcher mode: Vietnamese hero indicator dots (instead of thumbnails) */
body.launcher-mode .vietnamese-hero-thumbnails {
    gap: 8px;
}

body.launcher-mode .vietnamese-thumbnail {
    display: none;
}

body.launcher-mode .vietnamese-indicator-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    padding: 0;
}

body.launcher-mode .vietnamese-indicator-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

body.launcher-mode .vietnamese-indicator-dot.active {
    width: 28px;
    border-radius: 5px;
    background: var(--color-primary);
}

/* Hide dots in browser mode */
.vietnamese-indicator-dot {
    display: none;
}

/* ===== Animated Background Section ===== */
.animated-bg-section {
    position: relative;
    width: 100%;
    height: 950px;
    overflow: hidden;
    margin: 30px 0;
}

.animated-bg-container {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 0;
    transform: rotate(18deg) translateZ(0);
    transform-origin: center center;
    animation: homeBgScroll 45s ease-in-out infinite alternate;
    filter: grayscale(0%);
    transition: filter 0.8s ease-out;
    will-change: transform, filter;
    backface-visibility: hidden;
}

.animated-bg-container.grayscale {
    filter: grayscale(100%);
}

@keyframes homeBgScroll {
    0% {
        transform: rotate(18deg) translate(0, 0) translateZ(0);
    }

    50% {
        transform: rotate(18deg) translate(-100px, -100px) translateZ(0);
    }

    100% {
        transform: rotate(18deg) translate(-200px, -200px) translateZ(0);
    }
}

.animated-bg-section .image-row {
    display: flex;
    gap: 15px;
    height: 250px;
    margin-bottom: 15px;
    will-change: transform;
}

.animated-bg-section .image-row.even {
    animation: homeRowSlideLeft 50s cubic-bezier(0.1, 0.6, 0.2, 1) infinite alternate;
}

.animated-bg-section .image-row.odd {
    animation: homeRowSlideRight 55s cubic-bezier(0.1, 0.6, 0.2, 1) infinite alternate;
}

@keyframes homeRowSlideLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-150px);
    }
}

@keyframes homeRowSlideRight {
    0% {
        transform: translateX(-100px);
    }

    100% {
        transform: translateX(50px);
    }
}

.animated-bg-section .bg-image {
    height: 100%;
    width: auto;
    object-fit: cover;
    opacity: 0.7;
    border-radius: 8px;
    flex-shrink: 0;
}

.animated-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
    /* Fix rendering bug - force GPU layer creation */
    transform: translateZ(0);
    will-change: opacity;
    backface-visibility: hidden;
}

/* Content Overlay */
.animated-bg-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 60px;
    gap: 80px;
}

.animated-bg-left {
    flex: 1;
}

.animated-bg-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    color: white;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    margin: 0;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease, transform 0.6s ease, color 0.6s ease;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-content .animated-bg-title {
    opacity: 0.7;
    transform: translateX(-20px);
    color: #cccccc;
}

.animated-bg-right {
    flex: 1;
    max-width: 450px;
}

.animated-bg-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s, color 0.6s ease;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-content .animated-bg-subtitle {
    opacity: 0.7;
    transform: translateX(20px);
    color: #cccccc;
}

.animated-bg-desc {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-content .animated-bg-desc {
    opacity: 0.5;
    transform: translateY(10px);
}

.btn-subscribe {
    display: inline-block;
    padding: 14px 32px;
    background: white;
    color: black;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast), opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-content .btn-subscribe {
    opacity: 0.6;
    transform: scale(0.95);
}

.btn-subscribe:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
}

/* Hide normal content when grayscale is active */
.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-content {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    pointer-events: none;
}

/* ===== Stats Content (Grayscale Mode) ===== */
.animated-bg-stats {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 60px;
    gap: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-stats {
    opacity: 1;
    pointer-events: auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-stats .stat-item {
    opacity: 1;
    transform: translateY(0);
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-stats .stat-item:nth-child(1) {
    transition-delay: 0.1s;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-stats .stat-item:nth-child(2) {
    transition-delay: 0.2s;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-stats .stat-item:nth-child(3) {
    transition-delay: 0.3s;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-stats .stat-item:nth-child(4) {
    transition-delay: 0.4s;
}

.stat-number {
    font-size: 72px;
    font-weight: 700;
    color: white;
    line-height: 1;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Discord Button Container */
.discord-button-container {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.animated-bg-container.grayscale~.animated-bg-overlay~.animated-bg-content~.animated-bg-stats~.discord-button-container {
    opacity: 1;
    pointer-events: auto;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.6);
}

.discord-icon {
    width: 24px;
    height: 24px;
}

.animated-bg-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 40px 60px;
    margin-top: 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.footer.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.footer-tagline {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content {
        left: 40px;
        right: 40px;
        bottom: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .category-header,
    .games-scroll-container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: 50vh;
        min-height: 350px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 30px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .category-title {
        font-size: 20px;
    }

    :root {
        --card-width: 140px;
        --card-height: 200px;
    }
}

/* ===== Phase 1 UI Enhancements ===== */

/* === 1. Glassmorphism Game Card Badges === */
.game-card-badge {
    padding: 6px 12px;
    background: rgba(220, 38, 38, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
}

.game-card-badge.vietnamese {
    background: rgba(22, 163, 74, 0.85);
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 2px 12px rgba(22, 163, 74, 0.3);
}

.game-card-badge.new {
    background: rgba(37, 99, 235, 0.85);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
}

/* === 2. Scroll Snap for Horizontal Rows === */
.games-row {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.games-row::-webkit-scrollbar {
    display: none;
}

.game-card {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* === 3. Edge Gradient Indicators (Shows More Content) === */
.games-scroll-container::before,
.games-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.games-scroll-container::before {
    left: 450px;
    background: linear-gradient(to right, var(--color-bg), transparent);
}

.games-scroll-container::after {
    right: 450px;
    background: linear-gradient(to left, var(--color-bg), transparent);
}

.games-scroll-container.has-scroll-left::before {
    opacity: 1;
}

.games-scroll-container.has-scroll-right::after {
    opacity: 1;
}

/* Launcher mode edge gradients */
body.launcher-mode .games-scroll-container::before {
    left: 60px;
}

body.launcher-mode .games-scroll-container::after {
    right: 60px;
}

/* === 4. Staggered Skeleton Loading Animation === */
.skeleton-game-card {
    animation: shimmer 1.5s infinite, skeletonPulse 2s ease-in-out infinite;
}

.skeleton-game-card:nth-child(1) {
    animation-delay: 0s;
}

.skeleton-game-card:nth-child(2) {
    animation-delay: 0.1s;
}

.skeleton-game-card:nth-child(3) {
    animation-delay: 0.2s;
}

.skeleton-game-card:nth-child(4) {
    animation-delay: 0.3s;
}

.skeleton-game-card:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes skeletonPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* === 5. Button Press Effects === */
.btn-hero-trailer:active,
.btn-hero-outline:active,
.btn-vietnamese-more:active,
.btn-subscribe:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
}

/* Ripple effect container */
.btn-hero-trailer,
.btn-hero-outline {
    position: relative;
    overflow: hidden;
}

.btn-hero-trailer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-hero-trailer:active::before {
    opacity: 1;
}

/* === 6. Scroll Arrow Bounce Animation === */
.scroll-btn svg {
    transition: transform 0.2s ease;
}

.scroll-left:not(:disabled):hover svg {
    animation: scrollArrowBounceLeft 0.6s ease-in-out infinite;
}

.scroll-right:not(:disabled):hover svg {
    animation: scrollArrowBounceRight 0.6s ease-in-out infinite;
}

@keyframes scrollArrowBounceLeft {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-4px);
    }
}

@keyframes scrollArrowBounceRight {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(4px);
    }
}

/* === 7. Enhanced Game Card Hover === */
.game-card {
    will-change: transform;
    contain: layout style;
}

.game-card-image-container {
    transition: box-shadow 0.3s ease;
}

.game-card:hover .game-card-image-container {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* === 8. View All Link Enhancement === */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    transition: all var(--transition-fast);
}

.view-all-link:hover {
    background: rgba(255, 255, 255, 0.05);
    gap: 10px;
    color: var(--color-text);
}

/* === 9. Category Count Badge === */
.category-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* === 10. Hero Progress Bar === */
.hero-progress {
    display: none;
    /* Hidden */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 25;
}

.hero-progress-bar {
    height: 100%;
    width: 0;
    background: var(--color-primary);
    animation: heroProgress 6s linear;
}

@keyframes heroProgress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* === 11. Enhanced Card Title on Hover (Info Reveal) === */
.game-card-info {
    position: relative;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.game-card:hover .game-card-info {
    opacity: 1;
}

.game-card-title {
    transition: color 0.2s ease;
}

.game-card:hover .game-card-title {
    color: #ffffff;
}

/* === 12. Improved Hero Indicators === */
.indicator {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator:not(.active):hover {
    width: 16px;
    background: rgba(255, 255, 255, 0.6);
}

/* === 13. Vietnamese Hero Enhancement === */
.vietnamese-hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 60%;
    background: radial-gradient(ellipse at bottom left,
            rgba(220, 38, 38, 0.15) 0%,
            transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.vietnamese-hero-thumbnails {
    transition: transform 0.3s ease;
}

.vietnamese-hero-section:hover .vietnamese-hero-thumbnails {
    transform: translateX(-50%) translateY(-5px);
}

/* === 14. Smooth Page Load Fade-in === */
.main-content {
    animation: pageLoadFadeIn 0.5s ease-out;
}

@keyframes pageLoadFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}