/* Typography and Basics */
h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.highlight-text {
    color: var(--primary-color);
}

.emoji {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}

/* Header Layout */
.header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--primary-color);
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-badge .dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Main Content */
.main-content {
    padding: 2rem 0 4rem;
}

/* Sections */
.deals-section {
    margin-top: 4rem;
}

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

.badge {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
    vertical-align: middle;
}

/* Scroll Container & Buttons */
.scroll-container {
    position: relative;
    display: flex;
    align-items: center;
}

.scroll-btn {
    position: absolute;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(20, 20, 22, 0.9);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-card);
}

.scroll-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-main);
}

.scroll-btn.left { left: -20px; }
.scroll-btn.right { right: -20px; }

/* Horizontal Scroll for Grids */
.horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}

.horizontal-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Global Loader */
.global-loader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-main);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-card);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    z-index: 50;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: var(--shadow-card);
    padding: 0.5rem;
}

.search-dropdown::-webkit-scrollbar {
    width: 8px;
}
.search-dropdown::-webkit-scrollbar-track {
    background: var(--bg-card);
}
.search-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 1;
}

.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-glow);
    transition: transform 0.3s ease;
}

.hero-banner:hover {
    transform: translateY(-5px);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.banner-arrow:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.banner-arrow.left { left: 10px; }
.banner-arrow.right { right: 10px; }

.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-out;
    transform: scale(1.05);
}

.hero-banner-info {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 2;
    transition: transform 0.2s ease-out;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-dropdown-item:hover {
    background: var(--bg-card-hover);
}

.search-dropdown-item img {
    width: 60px;
    height: 34px;
    object-fit: cover;
    border-radius: 4px;
}

.search-dropdown-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-dropdown-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.search-dropdown-price {
    font-size: 0.8rem;
    color: var(--primary-color);
}

/* Grid Layouts for specific sections */
#new-deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    overflow-x: visible; /* Override horizontal scroll for this specific grid if we want it wrapped, but screenshot shows horizontal scroll for almost all. Let's keep it horizontal for 'new deals' or make it wrap */
}
#new-deals-grid.horizontal-scroll {
    display: flex;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    .hero { flex-direction: column; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .filters-dropdowns { overflow-x: auto; padding-bottom: 8px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Hide on mobile for now */
    .header-actions .icon-btn:not(:first-child) { display: none; }
    h1 { font-size: 2rem; }
    .footer { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

/* Pulse Animation */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
    100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.2); }
}

.discount-badge.pulse {
    animation: pulse-glow 2s infinite;
}

/* Track Price Bell Icon */
.track-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: var(--transition-fast);
}

.track-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.track-btn.tracked {
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary-color);
}

.track-btn.tracked svg {
    fill: var(--primary-color);
}

/* Card Hover Video Mock */
.card-hover-video-container {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

.card:hover .card-hover-video-container.active {
    opacity: 1;
}

/* Fade in for images */
.card-img {
    transition: opacity 0.5s ease;
}
.card-img.loading {
    opacity: 0;
}

/* LANDING PAGE CSS */
.landing-hero {
    position: relative;
    min-height: 800px;
    background-color: var(--bg-dark);
    margin-top: -80px; /* Offset for sticky header */
    padding-top: 140px; /* Offset for sticky header */
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.landing-hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex: 1;
}

.landing-hero-content {
    max-width: 600px;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.landing-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.highlight-green {
    color: var(--primary-color);
}

.landing-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.landing-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.landing-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.landing-feature div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.landing-feature strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.landing-feature span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.landing-stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Video Fullscreen Background */
.landing-hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.landing-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: opacity 1s ease-in-out, filter 1s ease-in-out;
    opacity: 0;
    pointer-events: none;
    filter: blur(0px);
}

.landing-video.active {
    opacity: 1;
    z-index: 1;
}

/* Green Smoke Transition */
.green-smoke-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.8) 0%, rgba(5, 150, 105, 0.4) 40%, transparent 80%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 3;
    pointer-events: none;
    mix-blend-mode: screen;
    transform: scale(1.5);
}

.transition-active .green-smoke-overlay {
    opacity: 1;
    animation: smoke-pulse 1s ease-in-out;
}

.transition-active .landing-video.active {
    filter: blur(15px);
}

@keyframes smoke-pulse {
    0% { transform: scale(1.0); opacity: 0; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(2.0); opacity: 0; }
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(9, 9, 11, 0.85) 0%,
        rgba(9, 9, 11, 0.55) 40%,
        rgba(9, 9, 11, 0.2) 70%,
        rgba(9, 9, 11, 0.05) 100%
    );
    z-index: 1;
}

/* Floating Cards overlay */
.floating-cards-container {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    pointer-events: none; /* Don't block clicks */
}

.floating-card {
    background: rgba(9, 9, 11, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    backdrop-filter: blur(12px);
    width: 280px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-1 { animation-delay: 0s; margin-left: -40px; }
.floating-card.card-2 { animation-delay: -2s; margin-left: 40px; }
.floating-card.card-3 { animation-delay: -4s; margin-left: -10px; }

.game-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-light);
}

.game-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-price .discount {
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
}

.game-price .price {
    font-weight: 600;
    color: white;
}

@media (max-width: 1024px) {
    .landing-hero-container {
        flex-direction: column;
    }
    .video-overlay {
        background: linear-gradient(0deg, rgba(9,9,11,0.9) 0%, rgba(9,9,11,0.7) 50%, rgba(9,9,11,0.3) 100%);
    }
    .floating-cards-container {
        display: none; /* Hide on smaller screens to keep it clean */
    }
}

/* Enhanced CTA Glow and Size */
.landing-hero .btn-primary {
    padding: 1.2rem 2.5rem;
    font-size: 1.15rem;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    animation: pulseGlow 4s infinite alternate;
}
.landing-hero .btn-primary:hover {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.8);
    transform: translateY(-3px);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 0 35px rgba(16, 185, 129, 0.6); }
}

/* Bottom Bar */
.landing-bottom-bar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
}

.landing-stores {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stores-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.store-logos {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.store-logos span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: opacity 0.2s ease;
}

.store-logos span:hover {
    color: white;
}

.more-stores {
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem !important;
}

.landing-notify-card {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 480px;
    z-index: 50;
    background: rgba(9, 9, 11, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transform-origin: bottom right;
}

.notify-icon {
    background: rgba(16, 185, 129, 0.1);
    padding: 12px;
    border-radius: var(--radius-md);
}

.notify-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.notify-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.notify-btn {
    background: transparent;
    border-color: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.notify-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
