/**
 * TAYA365 Pro CSS Layout Styles
 * All classes use prefix "gf35-" for namespace isolation
 * Mobile-first responsive design with professional color palette
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px for easy calculations */
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem; /* 16px base font size */
    line-height: 1.6;
    color: #ffffff;
    background-color: #2E4057;
    overflow-x: hidden;
}

/* Color Palette */
:root {
    --gf35-primary: #95A5A6;      /* Silver/Gray */
    --gf35-secondary: #36454F;    /* Charcoal */
    --gf35-background: #2E4057;   /* Dark Blue */
    --gf35-accent: #3498DB;       /* Bright Blue */
    --gf35-success: #27AE60;      /* Green */
    --gf35-warning: #F39C12;      /* Orange */
    --gf35-error: #E74C3C;        /* Red */
    --gf35-text-light: #ffffff;
    --gf35-text-muted: #bdc3c7;
    --gf35-border: #34495E;
}

/* Typography */
.gf35-h1, .gf35-h2, .gf35-h3, .gf35-h4, .gf35-h5, .gf35-h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--gf35-text-light);
}

.gf35-h1 { font-size: 3.2rem; }
.gf35-h2 { font-size: 2.8rem; }
.gf35-h3 { font-size: 2.4rem; }
.gf35-h4 { font-size: 2.0rem; }
.gf35-h5 { font-size: 1.8rem; }
.gf35-h6 { font-size: 1.6rem; }

.gf35-p {
    margin-bottom: 1.5rem;
    color: var(--gf35-text-muted);
}

/* Layout Container */
.gf35-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.gf35-header {
    background: linear-gradient(135deg, var(--gf35-secondary) 0%, var(--gf35-background) 100%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.gf35-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.gf35-logo {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--gf35-text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.gf35-logo:hover {
    color: var(--gf35-accent);
}

.gf35-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.gf35-button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.4rem; /* Touch-friendly minimum */
    min-width: 8rem;
}

.gf35-button-primary {
    background: linear-gradient(135deg, var(--gf35-accent) 0%, #2980B9 100%);
    color: white;
}

.gf35-button-primary:hover {
    background: linear-gradient(135deg, #2980B9 0%, var(--gf35-accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.gf35-button-secondary {
    background: transparent;
    color: var(--gf35-text-light);
    border: 2px solid var(--gf35-accent);
}

.gf35-button-secondary:hover {
    background: var(--gf35-accent);
    color: white;
    transform: translateY(-2px);
}

.gf35-button-loading {
    position: relative;
    pointer-events: none;
}

.gf35-button-loading::after {
    content: '';
    position: absolute;
    width: 2rem;
    height: 2rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: gf35-spin 1s linear infinite;
}

@keyframes gf35-spin {
    to { transform: rotate(360deg); }
}

/* Mobile Menu Toggle */
.gf35-menu-button {
    background: transparent;
    border: none;
    color: var(--gf35-text-light);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.gf35-menu-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Overlay */
.gf35-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gf35-menu-overlay.gf35-active {
    opacity: 1;
    visibility: visible;
}

.gf35-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, var(--gf35-secondary) 0%, var(--gf35-background) 100%);
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.gf35-mobile-menu.gf35-active {
    right: 0;
}

.gf35-menu-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gf35-border);
}

.gf35-menu-close {
    background: transparent;
    border: none;
    color: var(--gf35-text-light);
    font-size: 2rem;
    cursor: pointer;
}

.gf35-menu-nav {
    padding: 2rem 0;
}

.gf35-menu-nav ul {
    list-style: none;
}

.gf35-menu-nav li {
    border-bottom: 1px solid var(--gf35-border);
}

.gf35-menu-nav a {
    display: block;
    padding: 1.5rem 2rem;
    color: var(--gf35-text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.gf35-menu-nav a:hover {
    background: rgba(149, 165, 166, 0.2);
    color: var(--gf35-accent);
}

/* Main Content */
.gf35-main {
    padding-top: 8rem; /* Account for fixed header */
    padding-bottom: 8rem; /* Account for fixed bottom nav */
    min-height: 100vh;
}

/* Hero Section */
.gf35-hero {
    background: linear-gradient(135deg, var(--gf35-background) 0%, var(--gf35-secondary) 100%);
    padding: 3rem 0;
    text-align: center;
}

.gf35-hero-title {
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gf35-accent) 0%, #2980B9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gf35-hero-subtitle {
    font-size: 1.8rem;
    color: var(--gf35-text-muted);
    margin-bottom: 2rem;
}

/* Carousel */
.gf35-carousel {
    position: relative;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.gf35-slide {
    display: none;
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.gf35-slide.gf35-active {
    display: block;
}

.gf35-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 2rem;
    color: white;
}

.gf35-slide-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gf35-slide-text {
    font-size: 1.4rem;
    opacity: 0.9;
}

.gf35-carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.gf35-dot {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gf35-dot.gf35-active {
    background: var(--gf35-accent);
    transform: scale(1.2);
}

/* Game Categories */
.gf35-section {
    padding: 3rem 0;
}

.gf35-section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.gf35-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.gf35-category-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--gf35-text-light);
}

.gf35-category-more {
    color: var(--gf35-accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.4rem;
}

.gf35-category-more:hover {
    text-decoration: underline;
}

/* Game Grid */
.gf35-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gf35-game-card {
    background: var(--gf35-secondary);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.gf35-game-card:hover {
    transform: translateY(-4px);
    border-color: var(--gf35-accent);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.gf35-game-card.gf35-touched {
    transform: scale(0.98);
}

.gf35-game-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--gf35-primary) 0%, var(--gf35-secondary) 100%);
}

.gf35-game-info {
    padding: 1rem;
    text-align: center;
}

.gf35-game-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--gf35-text-light);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gf35-game-category {
    font-size: 1.1rem;
    color: var(--gf35-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content Modules */
.gf35-module {
    background: var(--gf35-secondary);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gf35-module-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gf35-accent);
}

.gf35-module-content {
    color: var(--gf35-text-muted);
    line-height: 1.8;
}

.gf35-module-content p {
    margin-bottom: 1.5rem;
}

.gf35-module-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.gf35-module-content li {
    margin-bottom: 0.8rem;
}

.gf35-module-content a {
    color: var(--gf35-accent);
    text-decoration: none;
}

.gf35-module-content a:hover {
    text-decoration: underline;
}

/* Partners Section */
.gf35-partners {
    background: var(--gf35-secondary);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.gf35-partners-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--gf35-text-light);
}

.gf35-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    align-items: center;
}

.gf35-partner-logo {
    width: 100%;
    height: 60px;
    object-fit: contain;
    filter: grayscale(100%) brightness(150%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.gf35-partner-logo:hover {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
    transform: scale(1.1);
}

/* Footer */
.gf35-footer {
    background: var(--gf35-secondary);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--gf35-border);
    margin-bottom: 6rem; /* Account for bottom nav */
}

.gf35-footer-content {
    text-align: center;
}

.gf35-footer-links {
    margin-bottom: 2rem;
}

.gf35-footer-links a {
    color: var(--gf35-text-muted);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.gf35-footer-links a:hover {
    color: var(--gf35-accent);
}

.gf35-copyright {
    color: var(--gf35-text-muted);
    font-size: 1.2rem;
    margin-top: 1rem;
}

/* Bottom Mobile Navigation */
.gf35-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--gf35-secondary) 0%, var(--gf35-background) 100%);
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 6rem;
}

.gf35-nav-button {
    background: transparent;
    border: none;
    color: var(--gf35-text-muted);
    text-align: center;
    padding: 0.5rem;
    min-width: 6rem;
    min-height: 6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 1rem;
    position: relative;
}

.gf35-nav-button:hover,
.gf35-nav-button.gf35-active {
    color: var(--gf35-accent);
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.gf35-nav-button.gf35-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--gf35-accent);
    border-radius: 50%;
}

.gf35-nav-icon {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 0.2rem;
}

.gf35-nav-text {
    font-size: 1rem;
    font-weight: 500;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gf35-main {
        padding-bottom: 8rem;
    }

    .gf35-hero-title {
        font-size: 2.8rem;
    }

    .gf35-slide {
        height: 180px;
    }

    .gf35-slide-title {
        font-size: 2rem;
    }

    .gf35-game-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }

    .gf35-game-image {
        height: 100px;
    }

    .gf35-partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }

    .gf35-partner-logo {
        height: 40px;
    }
}

@media (min-width: 769px) {
    .gf35-container {
        max-width: 1200px;
        padding: 0 2rem;
    }

    .gf35-mobile-menu,
    .gf35-menu-overlay,
    .gf35-menu-button {
        display: none;
    }

    .gf35-bottom-nav {
        display: none;
    }

    .gf35-main {
        padding-bottom: 0;
    }

    .gf35-footer {
        margin-bottom: 0;
    }

    .gf35-slide {
        height: 250px;
    }

    .gf35-slide-title {
        font-size: 3rem;
    }

    .gf35-game-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 2rem;
    }

    .gf35-game-image {
        height: 140px;
    }

    .gf35-partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .gf35-partner-logo {
        height: 50px;
    }
}

/* Print Styles */
@media print {
    .gf35-header,
    .gf35-bottom-nav,
    .gf35-mobile-menu,
    .gf35-menu-overlay,
    .gf35-menu-button {
        display: none !important;
    }

    .gf35-main {
        padding-top: 0;
        padding-bottom: 0;
    }

    body {
        background: white;
        color: black;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --gf35-text-muted: #ffffff;
        --gf35-border: #ffffff;
    }
}

/* Focus styles for keyboard navigation */
.gf35-button:focus,
.gf35-menu-button:focus,
.gf35-nav-button:focus,
.gf35-game-card:focus {
    outline: 2px solid var(--gf35-accent);
    outline-offset: 2px;
}

/* Touch feedback */
.gf35-touched {
    transform: scale(0.95) !important;
}

/* Loading states */
.gf35-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Utility Classes */
.gf35-text-center { text-align: center; }
.gf35-text-left { text-align: left; }
.gf35-text-right { text-align: right; }

.gf35-mb-1 { margin-bottom: 1rem; }
.gf35-mb-2 { margin-bottom: 2rem; }
.gf35-mb-3 { margin-bottom: 3rem; }

.gf35-mt-1 { margin-top: 1rem; }
.gf35-mt-2 { margin-top: 2rem; }
.gf35-mt-3 { margin-top: 3rem; }

.gf35-hidden { display: none; }
.gf35-visible { display: block; }

.gf35-flex { display: flex; }
.gf35-flex-col { flex-direction: column; }
.gf35-items-center { align-items: center; }
.gf35-justify-center { justify-content: center; }
.gf35-justify-between { justify-content: space-between; }

.gf35-w-full { width: 100%; }
.gf35-h-full { height: 100%; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gf35-background);
}

::-webkit-scrollbar-thumb {
    background: var(--gf35-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980B9;
}