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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

:root {
    /* ColorHunt Palette - Strictly these colors only */
    --primary-color: #FA9884;      /* Warm Coral - CTA buttons, links, highlights */
    --secondary-color: #E74646;     /* Bold Red - headings, body text, primary UI */
    --accent-color: #FFE5CA;       /* Light Apricot - secondary sections, cards */
    --success-color: #FA9884;      /* Warm Coral - success states */
    --warning-color: #E74646;      /* Bold Red - warning states */
    --error-color: #E74646;        /* Bold Red - error states */
    
    /* Background Colors */
    --bg-primary: #FFF3E2;         /* Soft Peach Cream - main background, nav/header */
    --bg-secondary: #FFE5CA;       /* Light Apricot - secondary sections */
    --bg-dark: #E74646;            /* Bold Red - dark backgrounds */
    --border-color: #FA9884;       /* Warm Coral - borders */
    
    /* Text Colors */
    --text-primary: #E74646;       /* Bold Red - primary text on light backgrounds */
    --text-secondary: #E74646;     /* Bold Red - secondary text on light backgrounds */
    --text-inverse: #FFFFFF;      /* White - text on dark backgrounds */
    
    /* Shadow Variables - using palette colors for warm shadows */
    --shadow-sm: 0 1px 3px 0 rgba(231, 70, 70, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(231, 70, 70, 0.15), 0 2px 4px -1px rgba(250, 152, 132, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(231, 70, 70, 0.2), 0 4px 6px -2px rgba(250, 152, 132, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
    min-height: 100vh;
    padding-top: 83px;
    margin: 0;
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="%23FA9884" opacity="0.8"/></svg>'), auto;
}

/* Custom selection color */
::selection {
    background: var(--primary-color);
    color: var(--text-inverse);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--text-inverse);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(250, 152, 132, 0.2);
}

/* Custom animations and aesthetic enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Apply animations to key elements */
.hero-title {
    animation: fadeInUp 0.8s ease-out;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.feature-card {
    animation: fadeInUp 0.6s ease-out;
}

.feature-card:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    will-change: transform;
    transform: translateZ(0);
    /* Additional performance optimizations */
    contain: layout style paint;
    backface-visibility: hidden;
    /* Prevent layout shift */
    height: 80px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: #333333;
    z-index: 1001;
}

.navbar {
    background: linear-gradient(90deg, #E74646 0%, #FA9884 100%);
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid #E74646;
    height: 76px;
    margin-top: 4px;
    position: relative;
    width: 100%;
    padding: 0;
    overflow: visible;
    /* Ensure complete coverage */
    background-clip: border-box;
    background-origin: border-box;
    /* Prevent layout shift */
    min-height: 76px;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: #E74646;
    z-index: 1001;
}

/* Ensure header covers full width with no gaps */
.header,
.header::before,
.navbar,
.navbar::after {
    box-sizing: border-box;
}

/* Force header to cover entire viewport width */
.header {
    min-width: 100vw;
    width: 100vw;
    left: 0;
    right: 0;
}

.navbar {
    min-width: 100vw;
    width: 100vw;
    left: 0;
    right: 0;
}

/* Additional safety measures */
.header::before,
.navbar::after {
    min-width: 100vw;
    width: 100vw;
    left: 0;
    right: 0;
}

/* iPad Air specific viewport handling */
@media (width: 820px) {
    .header,
    .header::before,
    .navbar,
    .navbar::after {
        width: 820px;
        min-width: 820px;
        max-width: 820px;
    }
    
    .nav-container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }
}

/* Ensure no horizontal scrollbars */
html {
    overflow-x: hidden;
}

/* Mobile-specific viewport handling */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    /* Prevent mobile header from causing horizontal scroll */
    .header,
    .navbar,
    .nav-container {
        overflow: hidden;
        max-width: 100vw;
    }
}

/* ========================================
   CSS CLEANUP COMPLETE
   ========================================
   - Removed duplicate media queries
   - Consolidated mobile breakpoints
   - Eliminated conflicting CSS rules
   - Organized responsive design rules
   - Improved maintainability
   ======================================== */

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    width: 100%;
    /* Performance optimization */
    contain: layout;
    position: relative;
    /* Prevent layout shift */
    min-height: 76px;
}

/* Ensure perfect distribution for tablet sizes */
@media (min-width: 768px) and (max-width: 1024px) {
    .nav-container {
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-menu {
        flex: 1;
        justify-content: center;
        margin: 0 2rem;
    }
    
    .nav-auth {
        flex-shrink: 0;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo a {
    text-decoration: none;
    color: inherit;
}

.nav-logo img {
    height: 60px;
    width: 180px;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    /* Performance optimization */
    will-change: color;
}

.nav-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 0 10px rgba(250, 152, 132, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-auth {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #e88575;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #d13d3d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login {
    background: var(--primary-color);
    color: #FFFFFF;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-login:hover {
    background: #e88575;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-register {
    background: var(--secondary-color);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-register:hover {
    background: #d13d3d;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-game {
    background: var(--accent-color);
    color: #FFFFFF;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-game:hover {
    background: #d97706;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #FA9884 0%, #E74646 100%);
    color: var(--text-inverse);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: -83px;
    /* Prevent layout shift */
    min-height: 600px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-image-container {
    position: relative;
    z-index: 3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
    /* Prevent layout shift */
    min-height: 600px;
}

/* When hero container has only one column (no image) */
.hero-container:has(.hero-content:only-child),
.hero-container:has(.hero-content:first-child:last-child) {
    grid-template-columns: 1fr;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 1;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
    font-weight: 500;
}

.hero-content {
    text-align: left;
}

/* Center content when no image */
.hero-container:has(.hero-content:only-child) .hero-content,
.hero-container:has(.hero-content:first-child:last-child) .hero-content {
    text-align: center;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    /* Ensure proper image sizing */
    object-fit: cover;
    object-position: center;
}

/* Responsive image sizing */
@media (max-width: 480px) {
    .hero-image {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .hero-image {
        max-width: 380px;
    }
}

@media (max-width: 1024px) {
    .hero-image {
        max-width: 500px;
    }
}

.hero-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Center buttons when no image */
.hero-container:has(.hero-content:only-child) .hero-buttons,
.hero-container:has(.hero-content:first-child:last-child) .hero-buttons {
    justify-content: center;
}

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0.6;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    /* Prevent layout shift */
    min-height: 400px;
}

.feature-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    /* Prevent layout shift */
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(250, 152, 132, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

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

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

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How to Start Section */
.how-to-start {
    padding: 5rem 0;
}

.steps-container {
    max-width: 800px;
    margin: 0 auto;
    /* Prevent layout shift */
    min-height: 600px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    /* Prevent layout shift */
    min-height: 120px;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}





/* Register Section */
.register-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #FFE5CA 0%, #FFF3E2 100%);
    position: relative;
    overflow: hidden;
}

.register-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="register-pattern" width="25" height="25" patternUnits="userSpaceOnUse"><circle cx="12.5" cy="12.5" r="1" fill="%23FA9884" opacity="0.08"/></pattern></defs><rect width="100" height="100" fill="url(%23register-pattern)"/></svg>');
    opacity: 0.6;
}

.register-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    /* Prevent layout shift */
    min-height: 600px;
}

.register-content {
    max-width: 600px;
}

.register-description {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.register-steps-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.register-steps {
    margin-bottom: 2rem;
}

.register-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    /* Prevent layout shift */
    min-height: 120px;
}

.step-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    background: var(--primary-color);
    color: var(--text-inverse);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.step-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

.register-step .step-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.register-step .step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.register-cta {
    text-align: center;
}

.register-note {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.register-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.register-note a:hover {
    text-decoration: underline;
}

.hero-image {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* Login Section */
.login-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    /* Prevent layout shift */
    min-height: 600px;
}

.login-content {
    max-width: 600px;
}

.login-description {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.login-steps-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.login-steps {
    margin-bottom: 2rem;
}

.login-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    /* Prevent layout shift */
    min-height: 120px;
}

.login-step .step-content h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.login-step .step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.login-benefits {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.login-benefits h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.login-benefits ul {
    list-style: none;
    padding-left: 0;
}

.login-benefits li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.login-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.login-cta {
    text-align: center;
}

.login-note {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.login-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-note a:hover {
    text-decoration: underline;
}

.hero-image-login {
    display: flex;
    justify-content: center;
    /* Prevent layout shift */
    min-height: 383px;
    align-items: center;
}

.hero-image-login img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* Games Slider Section */
.games-slider-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
    position: relative;
    overflow: hidden;
}

/* Mobile-first responsive design for games slider */
@media (max-width: 768px) {
    .games-slider-section {
        padding: 3rem 0;
    }
    
    .games-slider-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .main-interface {
        margin-bottom: 2rem;
        width: 100%;
    }
    
    .main-game-image {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: var(--radius);
    }
    
    .thumbnails-container {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
        min-width: 100%;
        padding-bottom: 1rem;
    }
}

/* Image optimization and lazy loading */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Prevent layout shift */
    object-fit: cover;
    object-position: center;
}

/* Prevent layout shift for specific images */
.nav-logo img {
    width: 180px;
    height: 60px;
    flex-shrink: 0;
}

.hero-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    min-height: 600px;
    /* Prevent layout shift */
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
}

.hero-image-container {
    /* Reserve space to prevent layout shift */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Registration and login images */
.hero-image img,
.hero-image-login img {
    width: 382px;
    height: 383px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
    min-height: 100px;
}

/* Responsive image container */
.hero-image-container,
.hero-image-login {
    overflow: hidden;
    border-radius: var(--radius);
}

/* Ensure proper image scaling */
.hero-image img,
.hero-image-login img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

.games-slider-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23FA9884" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.games-slider-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 3rem;
}

/* Main Interface Container */
.main-interface-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    /* Prevent layout shift */
    min-height: 400px;
}

/* Main game image container */
.main-interface {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 400px;
    margin: 0 auto;
    /* Prevent layout shift */
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile main interface optimizations */
@media (max-width: 768px) {
    .main-interface-container {
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .main-interface {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
}

.main-interface {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-game-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 1;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(250, 152, 132, 0.9);
    color: var(--text-inverse);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.nav-arrow:hover {
    background: rgba(250, 152, 132, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.nav-arrow-left {
    left: 20px;
}

.nav-arrow-right {
    right: 20px;
}

/* Thumbnails Container */
.thumbnails-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 300px;
}

.thumbnail-item {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    aspect-ratio: 1;
    /* Prevent layout shift */
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
}

.thumbnail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.thumbnail-item.active {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.thumbnail-item.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: var(--text-inverse);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-item:hover .thumbnail-overlay {
    opacity: 1;
}

.game-name {
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.play-button {
    font-size: 0.75rem;
    background: var(--primary-color);
    color: var(--text-inverse);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Games Section */
.games-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #FFF3E2 0%, #FFE5CA 100%);
    position: relative;
    overflow: hidden;
}

.games-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="games-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1.5" fill="%23FA9884" opacity="0.06"/></pattern></defs><rect width="100" height="100" fill="url(%23games-pattern)"/></svg>');
    opacity: 0.7;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    /* Prevent layout shift */
    min-height: 400px;
}

.game-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Prevent layout shift */
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.game-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    /* Prevent layout shift */
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #E74646 0%, #d13d3d 100%);
    color: var(--text-inverse);
    padding: 3rem 0 1rem;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
    /* Prevent layout shift */
    min-height: 300px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-pattern)"/></svg>');
    opacity: 0.3;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #FFFFFF;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: #FFFFFF;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

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

.social-links a {
    color: #FFFFFF;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: #FFFFFF;
    position: relative;
    z-index: 2;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none !important;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 10000;
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle:hover {
    background: rgba(250, 152, 132, 0.1);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #FFFFFF;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive Design */
/* Consolidated media queries for better performance and maintainability */

/* Specific iPad Air optimization (820px width) */
@media (min-width: 800px) and (max-width: 840px) {
    .nav-container {
        padding: 0 25px;
        justify-content: space-between;
        align-items: center;
        height: 80px;
    }
    
    .nav-logo img {
        height: 60px;
        width: 180px;
    }
    
    .nav-menu {
        gap: 1.2rem;
        margin: 0 1rem;
        flex: 1;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 14px;
        white-space: nowrap;
    }
    
    .btn-login,
    .btn-register {
        padding: 0.7rem 1.5rem;
        font-size: 14px;
        min-width: 90px;
        white-space: nowrap;
    }
    
    /* Ensure perfect alignment for 820px width */
    .header::before,
    .navbar,
    .navbar::after {
        width: 100vw;
        min-width: 100vw;
        left: 0;
        right: 0;
    }
    
    /* Adjust body padding for tablet */
    body {
        padding-top: 87px;
    }
    
    .hero {
        margin-top: -87px;
    }
    
    /* Perfect spacing for 820px width */
    .nav-auth {
        gap: 0.8rem;
        margin-left: auto;
    }
    
    /* Ensure logo doesn't overlap */
    .nav-logo {
        flex-shrink: 0;
        margin-right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile header layout fixes */
    .header {
        width: 100vw;
        min-width: 100vw;
    }
    
    .navbar {
        width: 100vw;
        min-width: 100vw;
        height: 70px;
        padding: 0;
    }
    
    .nav-container {
        padding: 0 15px;
        height: 70px;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }
    
    .nav-logo img {
        height: 50px;
        width: 140px;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10001;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 4px;
        padding: 8px;
        cursor: pointer;
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(250, 152, 132, 0.2);
    }
    
    .mobile-menu-toggle[aria-expanded="true"] {
        background: rgba(250, 152, 132, 0.3);
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(90deg, #E74646 0%, #FA9884 100%);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid #E74646;
        z-index: 9999;
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s ease;
        width: 100%;
        min-height: 200px;
        list-style: none;
        margin: 0;
        /* Ensure proper positioning */
        box-sizing: border-box;
        /* Debug: ensure menu is visible when active */
        pointer-events: none;
    }

    .nav-menu.active {
        display: flex !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 10000 !important;
        min-height: 200px !important;
        width: 100% !important;
        /* Ensure visibility and interaction */
        pointer-events: auto !important;
        clip: auto !important;
        overflow: visible !important;
        /* Force display with maximum specificity */
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        /* Additional mobile menu fixes */
        background: linear-gradient(90deg, #E74646 0%, #FA9884 100%) !important;
        border-top: 1px solid #E74646 !important;
        box-shadow: var(--shadow-md) !important;
    }



    .nav-menu .nav-item {
        margin: 0;
        width: 100%;
        list-style: none;
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu.active .nav-item {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        /* Force visibility */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .nav-menu.active .nav-link {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #FFFFFF !important;
        background: transparent !important;
    }
    
    .nav-menu .nav-link {
        display: block;
        color: #FFFFFF !important;
        text-align: center;
        padding: 1.2rem 1rem;
        border-radius: var(--radius);
        transition: all 0.3s ease;
        width: 100%;
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
    }
    
    .nav-menu .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #FFFFFF !important;
    }
    
    .nav-menu .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Ensure mobile menu is touch-friendly */
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    




    .nav-auth {
        display: none;
    }

    .nav-container {
        position: relative;
        overflow: visible;
    }
    
    /* iPhone specific optimizations */
    @media (max-width: 414px) {
        .nav-container {
            padding: 0 10px;
        }
        
        .nav-logo img {
            height: 45px;
            width: 120px;
        }
        
        .mobile-menu-toggle {
            right: 10px;
            width: 28px;
            height: 22px;
        }
        
        .hamburger-line {
            height: 2px;
        }
        
        /* Ensure no text overflow */
        .nav-logo {
            max-width: 60%;
            overflow: hidden;
        }
        
        .nav-logo img {
            object-fit: contain;
            max-width: 100%;
        }
        
        /* Prevent header overflow */
        .header::before,
        .navbar,
        .navbar::after {
            width: 100vw;
            min-width: 100vw;
            max-width: 100vw;
            left: 0;
            right: 0;
        }
        
        /* Adjust body padding for mobile */
        body {
            padding-top: 77px;
        }
        
        .hero {
            margin-top: -77px;
            padding: 3rem 0;
        }
        
        .hero-container {
            padding: 0 0.5rem;
            gap: 1.5rem;
        }
        
        .hero-title {
            font-size: 2rem;
            line-height: 1.1;
        }
        
        .hero-description {
            font-size: 1rem;
            line-height: 1.5;
            padding: 0 0.5rem;
        }
        
        .hero-buttons {
            padding: 0 0.5rem;
        }
        
        .hero-buttons .btn {
            font-size: 14px;
            padding: 12px 20px;
        }
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .social-links {
        justify-content: center;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .features-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }



    .step {
        flex-direction: column;
        text-align: center;
    }

    .register-step,
    .login-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .register-layout,
    .login-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .register-content,
    .login-content {
        max-width: 100%;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 1rem;
    }

    .hero-content {
        text-align: center;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding: 0 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    /* Ensure hero section is fully visible on mobile */
    .hero {
        padding: 4rem 0;
        margin-top: -77px;
        min-height: calc(100vh - 77px);
        display: flex;
        align-items: center;
    }
    
    .hero-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 1rem;
    }
    
    .hero-image-container {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .hero-image {
        max-width: 100%;
        height: auto;
        border-radius: var(--radius);
    }

    .games-slider-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    /* Mobile games slider optimizations */
    .games-slider-section {
        padding: 3rem 0;
    }
    
    .main-interface {
        margin-bottom: 2rem;
    }
    
    .main-game-image {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .nav-arrow-left {
        left: 10px;
    }
    
    .nav-arrow-right {
        right: 10px;
    }

    .thumbnails-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .thumbnails-container {
        width: 100%;
        max-width: 100%;
    }
    
    /* Additional mobile games slider fixes */
    .games-slider-section .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .games-slider-section .section-title {
        text-align: center;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    /* Ensure thumbnails don't overflow on mobile */
    .thumbnails-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    /* Custom scrollbar for mobile */
    .thumbnails-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .thumbnails-container::-webkit-scrollbar-track {
        background: rgba(250, 152, 132, 0.1);
        border-radius: 2px;
    }
    
    .thumbnails-container::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
}



/* Large Desktop Breakpoint */
@media (min-width: 1025px) {
    .nav-container {
        padding: 0 40px;
    }
    
    .nav-menu {
        gap: 2.5rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-description {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 2rem 0;
    }

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

    .section-title {
        font-size: 1.75rem;
    }

    .features,
    .how-to-start,
    .register-section,
    .login-section,
    .games-section,
    .cta-section {
        padding: 3rem 0;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 1rem;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) transparent;
    }
    
    /* Additional Mobile Optimizations */
    .thumbnail-item {
        min-width: 80px;
        aspect-ratio: 1;
    }

            .nav-arrow {
            width: 40px;
            height: 40px;
            font-size: 20px;
        }

        .nav-arrow-left {
            left: 10px;
        }
        
        /* iPhone games slider optimizations */
        .games-slider-section {
            padding: 2rem 0;
        }
        
        .games-slider-container {
            padding: 0 0.5rem;
            gap: 1.5rem;
        }
        
        .main-game-image {
            max-width: 100%;
            width: 100%;
            height: auto;
        }
        
        .thumbnails-grid {
            grid-template-columns: repeat(5, 1fr);
            gap: 0.3rem;
            max-width: 100%;
            overflow-x: auto;
            padding-bottom: 0.5rem;
        }
        
        .thumbnail-item {
            min-width: 70px;
            aspect-ratio: 1;
        }
        
        .section-title {
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
            padding: 0 0.5rem;
        }

    .nav-arrow-right {
        right: 10px;
    }

    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .hero-image {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-image img {
        max-width: 100%;
        height: auto;
    }

    .nav-auth {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Custom Scrollbar Styles */
.thumbnails-grid::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-grid::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnails-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}



/* Print Styles */
@media print {
    .header,
    .footer,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero {
        background: white !important;
        color: black !important;
    }

    .cta-section {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #000000;
        --text-primary: #000000;
        --text-secondary: #000000;
        --border-color: #000000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #374151;
    }
}

/* Additional Styles for New Pages */

/* About Us Page Styles */
.about-content {
    padding: 3rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-image img {
    width: 100%;
    height: auto;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.mission,
.vision {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
}

.mission h3,
.vision h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.value-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.value-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.team-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

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

.team-member {
    text-align: center;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.team-member h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.team-member p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.achievement {
    text-align: center;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.achievement-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.achievement-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* FAQ Page Styles */
.faq-content {
    padding: 3rem 0;
}

.faq-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-intro p {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.faq-categories {
    margin-bottom: 3rem;
}

.faq-category {
    margin-bottom: 3rem;
}

.faq-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--bg-primary);
    border: none;
    padding: 1.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-answer {
    display: none;
    padding: 0 1.5rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer p {
    margin: 0;
}

.contact-support {
    text-align: center;
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: var(--radius);
    margin-top: 3rem;
}

.contact-support h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-support p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.support-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contact Us Page Styles */
.contact-content {
    padding: 3rem 0;
}

.contact-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-intro p {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-details p {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-details small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.support-hours {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.support-hours h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.support-hours ul {
    list-style: none;
    padding-left: 0;
}

.support-hours li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-form-container {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
}

.contact-form-container h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-form-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form input.error,
.contact-form select.error,
.contact-form textarea.error {
    border-color: #dc2626;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.support-options {
    margin-top: 3rem;
}

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

.support-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.support-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.support-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.support-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.support-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.faq-quick-access {
    margin-top: 3rem;
    text-align: center;
}

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

.quick-faq-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: left;
}

.quick-faq-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quick-faq-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.faq-cta {
    margin-top: 2rem;
}

/* Privacy Policy, Terms, and Disclaimer Page Styles */
.policy-content,
.terms-content,
.disclaimer-content {
    padding: 3rem 0;
}

.policy-intro,
.terms-intro,
.disclaimer-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.policy-intro h2,
.terms-intro h2,
.disclaimer-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.policy-intro p,
.terms-intro p,
.disclaimer-intro p {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 1rem;
}

.policy-sections,
.terms-sections,
.disclaimer-sections {
    margin-bottom: 3rem;
}

.policy-section,
.terms-section,
.disclaimer-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.policy-section h3,
.terms-section h3,
.disclaimer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.policy-section h4,
.terms-section h4,
.disclaimer-section h4 {
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    font-size: 1.25rem;
}

.policy-section p,
.terms-section p,
.disclaimer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.policy-section ul,
.terms-section ul,
.disclaimer-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.policy-section li,
.terms-section li,
.disclaimer-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-details {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.policy-summary,
.terms-summary,
.disclaimer-summary {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.policy-summary h3,
.terms-summary h3,
.disclaimer-summary h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.policy-summary p,
.terms-summary p,
.disclaimer-summary p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.summary-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.summary-point {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
}

.point-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.summary-point h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.summary-point p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.disclaimer-notice {
    background: var(--accent-color);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
}

.disclaimer-notice h4 {
    margin-bottom: 1rem;
    color: white;
}

.disclaimer-notice p {
    color: white;
    margin: 0;
}

/* Responsive adjustments for new pages */
@media (max-width: 768px) {
    .about-grid,
    .mission-vision,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .values-grid,
    .team-grid,
    .achievements-grid,
    .support-grid,
    .quick-faq-grid,
    .summary-points {
        grid-template-columns: 1fr;
    }
    
    .policy-section,
    .terms-section,
    .disclaimer-section {
        padding: 1.5rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .support-options {
        flex-direction: column;
        align-items: center;
    }
}
