/* Global reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --primary-light: #6BA3E5;
    --primary-dark: #357ABD;
    --secondary-color: #7B68EE;
    --accent-color: #FF6B6B;
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-primary: #2D3748;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Accessibility and SEO utility classes */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Performance optimizations */
.game-iframe {
    will-change: transform;
    contain: strict;
}

.feature-card {
    will-change: transform, opacity;
}

/* Optimize animations for performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Ensure game containers are not affected by any transforms */
.hero-content,
.game-container,
.game-wrapper,
.game-iframe {
    transform: none !important;
    will-change: auto !important;
}

/* Header navigation */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(74, 144, 226, 0.15);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Main content area */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.5rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.game-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}


/* Game container */
.game-container {
    margin-bottom: 3rem;
    animation: fadeInUp 0.3s ease-out 0.2s both;
}

.game-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    /* Remove transform and transition that might affect coordinates */
}

.game-iframe {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border: none;
    border-radius: 8px;
    background: white;
    display: block;
    /* Ensure iframe is not affected by external CSS transforms */
}

/* Features section */
.features {
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-weight: 300;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.8s both;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Page loading animation removed */

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main {
        padding: 1rem;
    }

    .hero-content {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .game-controls {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        justify-content: center;
    }

    .game-iframe {
        height: 60vh;
        min-height: 400px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-iframe {
        height: 50vh;
        min-height: 350px;
    }

    .game-wrapper {
        padding: 1rem;
    }

    .hero-content {
        padding: 1.2rem;
        margin: 0 0.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }
}

/* Fullscreen mode styles */
.game-wrapper:fullscreen {
    background: white;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-wrapper:fullscreen .game-iframe {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
}

/* Game Guide Section Styles */
.game-guide,
.tips-section,
.benefits-section,
.faq-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card,
.tip-card,
.benefit-card,
.faq-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-card:hover,
.tip-card:hover,
.benefit-card:hover,
.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.step-card h3,
.tip-card h3,
.benefit-card h3,
.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.step-card p,
.tip-card p,
.benefit-card p,
.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.tips-grid,
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.faq-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Responsive for new sections */
@media (max-width: 768px) {
    .game-guide,
    .tips-section,
    .benefits-section,
    .faq-section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .guide-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tips-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .faq-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .step-card,
    .tip-card,
    .benefit-card,
    .faq-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .step-card,
    .tip-card,
    .benefit-card,
    .faq-item {
        padding: 1.2rem;
    }
}

/* Blog Page Styles */
.blog-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.blog-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    font-style: italic;
}

.blog-section {
    margin-bottom: 3rem;
}

.blog-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.blog-section h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    font-weight: 500;
}

.blog-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.blog-section ul {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.blog-section li {
    margin-bottom: 0.5rem;
}

.blog-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.related-content {
    margin-top: 2rem;
}

.related-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.related-content ul {
    list-style-type: none;
    margin-left: 0;
}

.related-content li {
    margin-bottom: 0.5rem;
}

.related-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Blog Responsive */
@media (max-width: 768px) {
    .blog-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-section h2 {
        font-size: 1.5rem;
    }

    .blog-section h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .blog-content {
        margin: 0.5rem;
        padding: 1rem;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-section h2 {
        font-size: 1.4rem;
    }
}

/* ===== NEW STYLES FOR GAME HUB ===== */

/* Navigation Icons */
.nav-icon {
    font-size: 1.2rem;
    margin-right: 0.3rem;
}

/* Home Hero Section */
.home-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.home-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.home-hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.home-hero-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

/* Compact Hero Version */
.home-hero-compact {
    padding: 2rem 2rem 2.5rem;
}

.home-hero-compact .home-hero-title {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

.home-hero-compact .home-hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.home-hero-compact .hero-stats {
    gap: 1.5rem;
}

.home-hero-compact .stat-item {
    padding: 0.8rem 1.5rem;
}

.home-hero-compact .stat-number {
    font-size: 1.6rem;
}

.home-hero-compact .stat-label {
    font-size: 0.8rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.3rem;
    font-weight: 300;
}

/* Games Section */
.games-section {
    padding: 2rem 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.games-section .section-title {
    margin-bottom: 1.5rem;
}

/* Category Filters */
.game-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.category-icon {
    font-size: 1.2rem;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Game Card Link Wrapper */
.game-card-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

/* Game Card */
.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card-link:hover .game-card {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-card-header {
    position: relative;
    overflow: hidden;
}

.game-thumbnail {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-icon {
    font-size: 5rem;
    transition: var(--transition);
}

.game-card-link:hover .game-icon {
    transform: scale(1.1);
}

/* Game Thumbnail Image */
.game-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-thumbnail-image {
    padding: 0;
}

.game-card-link:hover .game-thumbnail-img {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.game-card-link:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    pointer-events: none;
}

.play-icon {
    font-size: 1.2rem;
}

.game-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-badge.coming-soon {
    background: linear-gradient(135deg, #a0a0a0, #808080);
}

.game-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.game-description {
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

.game-category,
.game-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.meta-icon {
    font-size: 0.9rem;
}

.game-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.65rem;
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Placeholder Cards */
.game-card-placeholder {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.game-card-placeholder .game-card {
    cursor: default;
}

.placeholder-thumbnail {
    background: linear-gradient(135deg, #a0a0a0 0%, #808080 100%);
}

/* Features Section on Home */
.features-section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Back Navigation Button */
.back-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
}

/* Portrait Game Container (for vertical games like Fruit Merge) */
.game-container-portrait {
    max-width: 450px;
    margin: 0 auto 3rem;
}

.game-wrapper-portrait {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    aspect-ratio: 375 / 667;
}

/* Limit max height on larger screens */
@media (min-width: 769px) {
    .game-wrapper-portrait {
        max-height: 70vh;
        width: auto;
    }
}

.game-wrapper-portrait .game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: white;
    display: block;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

/* Footer Links */
.footer-links {
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive for Game Hub */
@media (max-width: 768px) {
    .home-hero {
        padding: 3rem 1rem 2rem;
    }

    .home-hero-title {
        font-size: 2.2rem;
    }

    .home-hero-description {
        font-size: 1.1rem;
    }

    .home-hero-compact {
        padding: 1.5rem 1rem 2rem;
    }

    .home-hero-compact .home-hero-title {
        font-size: 1.5rem;
    }

    .home-hero-compact .home-hero-description {
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-item {
        padding: 1rem 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .home-hero-compact .stat-item {
        padding: 0.7rem 1.2rem;
    }

    .home-hero-compact .stat-number {
        font-size: 1.4rem;
    }

    .games-section {
        padding: 1rem;
    }

    .game-categories {
        gap: 0.5rem;
        margin: 1.5rem 0 2rem;
    }

    .category-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-section {
        padding: 2rem 1rem;
    }

    .back-nav {
        padding: 1rem 1rem 0;
    }

    .game-container-portrait {
        max-width: 100%;
        padding: 0 1rem;
    }

    .game-wrapper-portrait {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .home-hero-title {
        font-size: 1.8rem;
    }

    .home-hero-description {
        font-size: 1rem;
    }

    .home-hero-compact {
        padding: 1.5rem 0.5rem 1.5rem;
    }

    .home-hero-compact .home-hero-title {
        font-size: 1.3rem;
    }

    .home-hero-compact .home-hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-item {
        padding: 0.8rem 1.2rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .home-hero-compact .hero-stats {
        gap: 0.8rem;
    }

    .home-hero-compact .stat-item {
        padding: 0.6rem 1rem;
    }

    .home-hero-compact .stat-number {
        font-size: 1.3rem;
    }

    .home-hero-compact .stat-label {
        font-size: 0.75rem;
    }

    .category-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .game-thumbnail {
        height: 200px;
    }

    .game-icon {
        font-size: 4rem;
    }
    
    .game-card-body {
        padding: 0.9rem;
    }
    
    .game-title {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .game-description {
        font-size: 0.8rem;
    }

    .game-container-portrait {
        max-width: 100%;
    }

    .game-wrapper-portrait {
        width: 100%;
    }
}
