/**
 * Jili56 CSS Layout Styles
 * Mobile-first responsive design with custom color palette
 * Colors: #006400, #32CD32, #1C2833, #3CB371, #DEE2E6
 */

/* CSS Variables for consistent theming */
:root {
    --primary-dark: #006400;
    --primary-light: #32CD32;
    --primary-medium: #3CB371;
    --background-dark: #1C2833;
    --background-light: #DEE2E6;
    --text-light: #ffffff;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --accent-gold: #ffd700;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* Utility classes */
.g88f-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.g88f-text-center { text-align: center; }
.g88f-text-left { text-align: left; }
.g88f-text-right { text-align: right; }

.g88f-mb-1 { margin-bottom: 0.5rem; }
.g88f-mb-2 { margin-bottom: 1rem; }
.g88f-mb-3 { margin-bottom: 1.5rem; }
.g88f-mb-4 { margin-bottom: 2rem; }

.g88f-mt-1 { margin-top: 0.5rem; }
.g88f-mt-2 { margin-top: 1rem; }
.g88f-mt-3 { margin-top: 1.5rem; }
.g88f-mt-4 { margin-top: 2rem; }

.g88f-p-1 { padding: 0.5rem; }
.g88f-p-2 { padding: 1rem; }
.g88f-p-3 { padding: 1.5rem; }
.g88f-p-4 { padding: 2rem; }

.g88f-d-none { display: none; }
.g88f-d-block { display: block; }
.g88f-d-flex { display: flex; }
.g88f-d-inline-block { display: inline-block; }

.g88f-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.g88f-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.g88f-flex-wrap { flex-wrap: wrap; }

.g88f-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.g88f-btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    color: var(--text-light);
    box-shadow: var(--shadow);
}

.g88f-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-medium), var(--primary-light));
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.g88f-btn-secondary {
    background: var(--background-dark);
    color: var(--text-light);
    border: 2px solid var(--primary-medium);
}

.g88f-btn-secondary:hover {
    background: var(--primary-medium);
    color: var(--text-light);
}

.g88f-btn-success {
    background: var(--success);
    color: var(--text-light);
}

.g88f-btn-success:hover {
    background: #229954;
    color: var(--text-light);
}

.g88f-btn-warning {
    background: var(--warning);
    color: var(--text-light);
}

.g88f-btn-warning:hover {
    background: #e67e22;
    color: var(--text-light);
}

.g88f-btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.g88f-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Header styles */
.g88f-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(28, 40, 51, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.75rem 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(60, 179, 113, 0.3);
}

.g88f-header.g88f-scrolled {
    background: rgba(28, 40, 51, 0.98);
    box-shadow: var(--shadow-lg);
}

.g88f-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.g88f-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
}

.g88f-logo:hover {
    color: var(--primary-light);
}

.g88f-logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-medium));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.2rem;
}

.g88f-desktop-nav {
    display: none;
}

.g88f-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.g88f-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.g88f-hamburger span {
    width: 100%;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition);
}

.g88f-hamburger:hover span {
    background: var(--primary-light);
}

/* Mobile menu */
.g88f-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--background-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.g88f-mobile-menu.g88f-active {
    right: 0;
}

.g88f-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.g88f-menu-overlay.g88f-active {
    opacity: 1;
    visibility: visible;
}

.g88f-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.g88f-menu-nav {
    margin-top: 2rem;
}

.g88f-menu-nav ul {
    list-style: none;
}

.g88f-menu-nav li {
    margin-bottom: 1rem;
}

.g88f-menu-nav a {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.g88f-menu-nav a:hover {
    color: var(--primary-light);
    padding-left: 0.5rem;
}

/* Hero carousel */
.g88f-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin-top: 70px;
}

.g88f-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.g88f-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.g88f-carousel-slide.g88f-active {
    opacity: 1;
}

.g88f-carousel-content {
    text-align: center;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 90%;
}

.g88f-carousel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.g88f-carousel-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.g88f-carousel-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.g88f-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.g88f-carousel-dot.g88f-active {
    background: var(--primary-light);
    transform: scale(1.2);
}

.g88f-carousel-prev,
.g88f-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.g88f-carousel-prev:hover,
.g88f-carousel-next:hover {
    background: var(--primary-medium);
}

.g88f-carousel-prev {
    left: 1rem;
}

.g88f-carousel-next {
    right: 1rem;
}

/* Game categories */
.g88f-game-categories {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.g88f-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.g88f-category-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-medium);
    background: transparent;
    color: var(--primary-dark);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.g88f-category-btn:hover,
.g88f-category-btn.g88f-active {
    background: var(--primary-medium);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Game grid */
.g88f-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.g88f-game-card {
    background: var(--text-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.g88f-game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.g88f-game-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-medium));
}

.g88f-game-info {
    padding: 0.75rem;
    text-align: center;
}

.g88f-game-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.g88f-game-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.g88f-game-play-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary-medium);
    color: var(--text-light);
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
}

.g88f-game-play-btn:hover {
    background: var(--primary-dark);
}

/* Bottom navigation */
.g88f-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--background-dark);
    border-top: 1px solid rgba(60, 179, 113, 0.3);
    z-index: 1000;
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
}

.g88f-bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.g88f-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    min-width: 60px;
    min-height: 60px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
    position: relative;
}

.g88f-bottom-nav-item:hover,
.g88f-bottom-nav-item.g88f-active {
    color: var(--primary-light);
    background: rgba(60, 179, 113, 0.1);
    transform: translateY(-2px);
}

.g88f-bottom-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.g88f-bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
}

.g88f-bottom-nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--danger);
    color: var(--text-light);
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.g88f-footer {
    background: var(--background-dark);
    color: var(--text-light);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.g88f-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.g88f-footer-section h3 {
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.g88f-footer-links {
    list-style: none;
}

.g88f-footer-links li {
    margin-bottom: 0.5rem;
}

.g88f-footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.g88f-footer-links a:hover {
    color: var(--primary-light);
}

.g88f-footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes g88f-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.g88f-fade-in {
    animation: g88f-fade-in 0.5s ease-out;
}

@keyframes g88f-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.g88f-pulse {
    animation: g88f-pulse 2s infinite;
}

/* Tooltip */
.g88f-tooltip {
    position: absolute;
    background: var(--background-dark);
    color: var(--text-light);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.g88f-tooltip.g88f-show {
    opacity: 1;
}

.g88f-tooltip-arrow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--background-dark);
}

/* Form styles */
.g88f-form-group {
    margin-bottom: 1.5rem;
}

.g88f-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.g88f-form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--background-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--text-light);
}

.g88f-form-control:focus {
    outline: none;
    border-color: var(--primary-medium);
    box-shadow: 0 0 0 3px rgba(60, 179, 113, 0.1);
}

.g88f-form-control.g88f-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Search bar */
.g88f-search-container {
    position: relative;
    margin-bottom: 2rem;
}

.g88f-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--primary-medium);
    border-radius: 25px;
    font-size: 1rem;
    transition: var(--transition);
}

.g88f-search-input:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(0, 100, 0, 0.1);
}

.g88f-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    /* Mobile-specific adjustments */
    .g88f-hero {
        height: 300px;
    }

    .g88f-carousel-title {
        font-size: 1.5rem;
    }

    .g88f-carousel-text {
        font-size: 1rem;
    }

    .g88f-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .g88f-game-image {
        height: 100px;
    }

    .g88f-category-buttons {
        gap: 0.25rem;
    }

    .g88f-category-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Add bottom padding for mobile nav */
    main {
        padding-bottom: 80px;
    }

    .g88f-footer {
        margin-bottom: 80px;
    }
}

@media (min-width: 769px) {
    /* Hide mobile elements on desktop */
    .g88f-bottom-nav {
        display: none;
    }

    .g88f-hamburger {
        display: none;
    }

    .g88f-mobile-menu {
        display: none;
    }

    .g88f-menu-overlay {
        display: none;
    }

    /* Show desktop navigation */
    .g88f-desktop-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .g88f-desktop-nav ul {
        display: flex;
        list-style: none;
        gap: 1.5rem;
    }

    .g88f-desktop-nav a {
        color: var(--text-light);
        text-decoration: none;
        font-weight: 500;
        transition: var(--transition);
        position: relative;
    }

    .g88f-desktop-nav a:hover {
        color: var(--primary-light);
    }

    .g88f-desktop-nav a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary-light);
        transition: width 0.3s ease;
    }

    .g88f-desktop-nav a:hover::after {
        width: 100%;
    }

    /* Larger hero on desktop */
    .g88f-hero {
        height: 500px;
    }

    .g88f-carousel-title {
        font-size: 3rem;
    }

    .g88f-carousel-text {
        font-size: 1.3rem;
    }

    /* Larger game grid */
    .g88f-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }

    .g88f-game-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    /* Small mobile adjustments */
    .g88f-header-container {
        padding: 0 0.5rem;
    }

    .g88f-logo {
        font-size: 1.2rem;
    }

    .g88f-logo-icon {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }

    .g88f-carousel-content {
        padding: 1rem;
    }

    .g88f-carousel-title {
        font-size: 1.3rem;
    }

    .g88f-carousel-text {
        font-size: 0.9rem;
    }

    .g88f-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .g88f-bottom-nav-label {
        font-size: 0.6rem;
    }

    .g88f-bottom-nav-icon {
        font-size: 1.3rem;
    }
}

/* Print styles */
@media print {
    .g88f-header,
    .g88f-bottom-nav,
    .g88f-hamburger,
    .g88f-mobile-menu,
    .g88f-menu-overlay {
        display: none !important;
    }

    main {
        padding-bottom: 0 !important;
    }

    .g88f-footer {
        margin-bottom: 0 !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-dark: #004000;
        --primary-light: #228B22;
        --background-dark: #0F1419;
        --text-dark: #000000;
    }

    .g88f-game-card {
        border: 2px solid var(--text-dark);
    }

    .g88f-category-btn {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .g88f-carousel-slide {
        transition: none;
    }

    .g88f-game-card:hover {
        transform: none;
    }
}