:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --card-bg: #FFFFFF;
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-effect: rgba(255, 255, 255, 0.8);
    --accent: #0071E3;
    --accent-hover: #0077ED;
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Global overflow handling */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Prevent flex items from causing overflow */
* {
    min-width: 0;
}

/* Ensure hero images respect viewport */
.hero-image-showcase,
.hero-image {
    max-width: 100%;
    overflow: hidden;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

html {
    overflow-x: hidden;
}

body {
    width: 100%;
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Opening Loader Animation */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.page-loader.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    font-family: var(--font-main);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #1D1D1F 0%, #434353 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

p {
    letter-spacing: -0.01em;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bg-light {
    background-color: var(--bg-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 980px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--text-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #000000;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.08);
    transform: scale(1.02);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
}

.btn-outline:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Download Button */
.btn-download {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 14px 32px;
    border-radius: 980px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform var(--transition-fast), background var(--transition-fast);
    animation: btnBounce 4s ease-in-out infinite;
}

.btn-download::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transform: translateY(100%);
    animation: glowMove 2s infinite;
    pointer-events: none;
}

.btn-download:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(255,255,255,0.3);
}

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

@keyframes glowMove {
    to { transform: translateY(-100%); }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: padding var(--transition-fast), background var(--transition-fast);
    padding: 24px 0;
}

.header.scrolled {
    padding: 16px 0;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.logo-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.logo-text .bold {
    font-weight: 800;
}

.desktop-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.6;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
    flex-direction: column;
    gap: 20px;
    transform: translateY(-10px);
    opacity: 0;
    transition: var(--transition-fast);
    pointer-events: none;
}

.mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
    display: flex;
}

.mobile-link {
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
    opacity: 0.8;
}

/* Sections */
.section {
    padding: 120px 0;
}

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

.section-title {
    font-size: 3rem;
    letter-spacing: -0.04em;
}

.section-subtitle {
    font-size: 1.2rem;
    margin-top: 8px;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-weight: 500;
    font-size: 1rem;
}

.view-all:hover {
    color: var(--accent-hover);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 140px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at top, #ffffff 0%, var(--bg-secondary) 100%);
}

.hero-container {
    max-width: 900px;
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
}

.hero-title {
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 24px;

    /* Glass Like Looping Shine */
    background: linear-gradient(
    110deg,
    #1D1D1F 30%,
    rgba(150, 150, 150, 0.4) 45%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(150, 150, 150, 0.4) 55%,
    #1D1D1F 70%
  );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shineLoop 3s linear infinite;
}

@keyframes shineLoop {
    to {
        background-position: -200% center;
    }
}

.mobile-break {
    display: none;
}

.hero-tagline {
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hero-image-showcase {
    width: 100%;
    max-width: 1000px;
    padding: 0 24px;
    perspective: 1000px;
}

.hero-image {
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
    transform: rotateX(5deg) scale(0.95);
    transition: transform var(--transition-smooth);
}

.hero-image-showcase.active .hero-image {
    transform: rotateX(0deg) scale(1);
}

/* Latest Games - Full Portrait Style */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.game-card {
    position: relative;
    height: 480px;

    /* Full portrait mode */
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    /* Text sits cleanly at bottom */
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), opacity 0.4s ease;
    box-shadow: var(--shadow-md);
    background: #000;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card:hover .card-image img {
    transform: scale(1.08);
}

/* Gradient Overlay for Text Contrast */
.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.game-card:hover::after {
    opacity: 0.85;
}

.rating {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 14px;
    border-radius: 980px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.rating i {
    color: #f5a623;
}

.card-content {
    padding: 32px;
    position: relative;
    z-index: 2;
    color: #fff;
}

.genre {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.card-content h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #fff;
}

.card-content p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 980px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-fast);
}

.game-card:hover .btn-text {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

/* Reviews Section */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.review-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
    border: 1px solid rgba(0,0,0,0.03);
}

.review-card:hover {
    transform: translateY(-4px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.score {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.6rem;
    color: white;
    background: var(--text-primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.user-score {
    background: var(--accent);
    box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

.review-meta h4 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.review-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    font-style: normal;
    color: var(--text-primary);
}

/* Stats Section */
.stats {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-card {
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* News Section */
.news-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.news-featured {
    background-color: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.news-featured:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.news-img-wrapper {
    position: relative;
    height: 380px;
    overflow: hidden;
}

.news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-featured:hover .news-img-wrapper img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 24px;
    left: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    padding: 6px 16px;
    border-radius: 980px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 1;
}

.news-content {
    padding: 40px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-featured h3 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.news-featured p {
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-card-small {
    display: flex;
    gap: 24px;
    background-color: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border: 1px solid rgba(0,0,0,0.02);
}

.news-card-small:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.news-card-small img {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    object-fit: cover;
}

.small-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.small-content .category-tag {
    position: static;
    display: inline-block;
    align-self: flex-start;
    background-color: var(--bg-secondary);
    margin-bottom: 12px;
    font-size: 0.75rem;
}

.small-content h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

/* Footer */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 100px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 80px;
}

.brand-desc {
    font-size: 1rem;
    max-width: 340px;
    margin: 24px 0;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.social-links a:hover {
    background-color: var(--text-primary);
    color: white;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links a {
    font-size: 1rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-newsletter p {
    font-size: 0.95rem;
    margin: 16px 0 24px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: 980px;
    color: var(--text-primary);
    font-family: var(--font-main);
    outline: none;
    font-size: 1rem;
}

.newsletter-form input:focus {
    border-color: var(--accent);
    background-color: var(--bg-primary);
}

.newsletter-form button {
    background-color: var(--text-primary);
    border: none;
    padding: 0 28px;
    border-radius: 980px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.newsletter-form button:hover {
    background-color: #000000;
    transform: scale(1.02);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.legal-links {
    display: flex;
    gap: 32px;
}

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

/* Highly Polished Apple-like Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-scale {
    transform: scale(0.95) translateY(30px);
}

.fade-scale.active {
    transform: scale(1) translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hero-title {
        font-size: 45vw;

        /* Absolute full width scale */
        line-height: 0.75;
        letter-spacing: -0.05em;
    }

    .mobile-break {
        display: block;
    }
}

@media (max-width: 480px) {
    .games-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .news-card-small {
        flex-direction: column;
    }

    .news-card-small img {
        width: 100%;
        height: 220px;
    }
}
