/**
 * Jililive Website Main CSS
 * Mobile-first responsive design with branded color scheme
 */

/* CSS Variables */
:root {
    --pg8f-primary: #8B0000;      /* Dark Red */
    --pg8f-secondary: #FFC0CB;     /* Pink */
    --pg8f-accent: #0000CD;        /* Blue */
    --pg8f-dark: #1C2833;          /* Dark Gray */
    --pg8f-light: #DB7093;         /* Pale Violet Red */
    --pg8f-white: #FFFFFF;
    --pg8f-black: #000000;
    --pg8f-bg: var(--pg8f-dark);
    --pg8f-text: var(--pg8f-secondary);
    --pg8f-border: rgba(255, 192, 203, 0.2);
    --pg8f-shadow: rgba(0, 0, 0, 0.3);
    --pg8f-radius: 0.8rem;
    --pg8f-transition: all 0.3s ease;
}

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--pg8f-text);
    background: linear-gradient(135deg, var(--pg8f-dark) 0%, var(--pg8f-primary) 100%);
    min-height: 100vh;
}

/* Layout Components */
.pg8f-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 430px;
    margin: 0 auto;
    background: var(--pg8f-bg);
    position: relative;
    box-shadow: 0 0 20px var(--pg8f-shadow);
}

.pg8f-container {
    padding: 0 1.5rem;
    margin: 0 auto;
    max-width: 100%;
}

.pg8f-main {
    flex: 1;
    padding: 8rem 0 8rem;
    position: relative;
}

/* Header and Navigation */
.pg8f-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(28, 40, 51, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pg8f-border);
    z-index: 1000;
    transition: var(--pg8f-transition);
}

.pg8f-header.pg8f-scrolled {
    background: rgba(28, 40, 51, 0.98);
    box-shadow: 0 2px 20px var(--pg8f-shadow);
}

.pg8f-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    height: 6rem;
}

.pg8f-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--pg8f-text);
    font-weight: 700;
    font-size: 1.8rem;
}

.pg8f-logo img {
    width: 3.2rem;
    height: 3.2rem;
    margin-right: 0.8rem;
    border-radius: 0.6rem;
}

.pg8f-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pg8f-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: var(--pg8f-radius);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--pg8f-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.pg8f-btn-primary {
    background: linear-gradient(135deg, var(--pg8f-primary), var(--pg8f-light));
    color: var(--pg8f-white);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

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

.pg8f-btn-outline {
    background: transparent;
    color: var(--pg8f-text);
    border: 2px solid var(--pg8f-secondary);
}

.pg8f-btn-outline:hover {
    background: var(--pg8f-secondary);
    color: var(--pg8f-dark);
}

.pg8f-menu-toggle {
    display: flex;
    flex-direction: column;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.pg8f-menu-toggle span {
    display: block;
    width: 2.4rem;
    height: 0.3rem;
    background: var(--pg8f-text);
    margin: 0.3rem 0;
    transition: var(--pg8f-transition);
    border-radius: 0.2rem;
}

.pg8f-menu-toggle.pg8f-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pg8f-menu-toggle.pg8f-active span:nth-child(2) {
    opacity: 0;
}

.pg8f-menu-toggle.pg8f-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.pg8f-nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(28, 40, 51, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--pg8f-border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--pg8f-transition);
}

.pg8f-nav-menu.pg8f-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.pg8f-nav-link {
    display: block;
    color: var(--pg8f-text);
    text-decoration: none;
    padding: 1rem 0;
    font-size: 1.6rem;
    font-weight: 500;
    border-bottom: 1px solid var(--pg8f-border);
    transition: var(--pg8f-transition);
}

.pg8f-nav-link:hover {
    color: var(--pg8f-light);
    padding-left: 1rem;
}

/* Carousel */
.pg8f-carousel {
    position: relative;
    height: 20rem;
    margin: 2rem 0;
    border-radius: var(--pg8f-radius);
    overflow: hidden;
    background: var(--pg8f-primary);
}

.pg8f-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.pg8f-slide.pg8f-active {
    opacity: 1;
}

.pg8f-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--pg8f-radius);
}

/* Sections and Cards */
.pg8f-section {
    margin: 3rem 0;
}

.pg8f-section-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pg8f-text);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.pg8f-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--pg8f-border);
    border-radius: var(--pg8f-radius);
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--pg8f-transition);
}

.pg8f-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pg8f-card-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg8f-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pg8f-card-content {
    color: var(--pg8f-text);
    line-height: 1.6;
}

.pg8f-card-content p {
    margin-bottom: 1.5rem;
}

/* Game Grid */
.pg8f-game-section {
    margin: 3rem 0;
}

.pg8f-game-category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pg8f-light);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(219, 112, 147, 0.2), rgba(0, 0, 205, 0.1));
    border-radius: var(--pg8f-radius);
    border-left: 4px solid var(--pg8f-accent);
}

.pg8f-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.pg8f-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pg8f-border);
    border-radius: var(--pg8f-radius);
    text-decoration: none;
    color: var(--pg8f-text);
    transition: var(--pg8f-transition);
    cursor: pointer;
    min-height: 44px;
}

.pg8f-game-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.2);
}

.pg8f-game-icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 0.8rem;
    margin-bottom: 0.8rem;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pg8f-game-name {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Promotional Elements */
.pg8f-promo-section {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(219, 112, 147, 0.1));
    border: 2px solid var(--pg8f-primary);
    border-radius: var(--pg8f-radius);
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.pg8f-promo-btn, .pg8f-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.4rem;
    background: linear-gradient(135deg, var(--pg8f-primary), var(--pg8f-light));
    color: var(--pg8f-white);
    text-decoration: none;
    border-radius: var(--pg8f-radius);
    font-size: 1.6rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--pg8f-transition);
    margin: 0.5rem;
    min-height: 44px;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.pg8f-promo-btn:hover, .pg8f-play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
}

.pg8f-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--pg8f-accent);
    text-decoration: none;
    font-weight: 600;
    padding: 0.8rem 1.2rem;
    border-radius: var(--pg8f-radius);
    background: rgba(0, 0, 205, 0.1);
    border: 1px solid var(--pg8f-accent);
    margin: 0.5rem;
    transition: var(--pg8f-transition);
    min-height: 44px;
    justify-content: center;
}

.pg8f-promo-link:hover {
    background: var(--pg8f-accent);
    color: var(--pg8f-white);
    transform: translateY(-2px);
}

/* Statistics and Features */
.pg8f-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pg8f-stat-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: var(--pg8f-radius);
    text-align: center;
    border: 1px solid var(--pg8f-border);
}

.pg8f-stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--pg8f-light);
    display: block;
    margin-bottom: 0.5rem;
}

.pg8f-stat-label {
    font-size: 1.2rem;
    color: var(--pg8f-text);
    opacity: 0.8;
}

/* Footer */
.pg8f-footer {
    background: var(--pg8f-dark);
    border-top: 1px solid var(--pg8f-border);
    padding: 3rem 1.5rem 9rem;
    margin-top: 4rem;
}

.pg8f-footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pg8f-footer-section {
    margin-bottom: 2rem;
}

.pg8f-footer-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pg8f-text);
    margin-bottom: 1rem;
}

.pg8f-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pg8f-footer-link {
    color: var(--pg8f-text);
    text-decoration: none;
    font-size: 1.4rem;
    padding: 0.5rem;
    transition: var(--pg8f-transition);
}

.pg8f-footer-link:hover {
    color: var(--pg8f-light);
}

.pg8f-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.pg8f-partner-logo {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    filter: grayscale(1) opacity(0.7);
    transition: var(--pg8f-transition);
}

.pg8f-partner-logo:hover {
    filter: grayscale(0) opacity(1);
}

.pg8f-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--pg8f-border);
    color: var(--pg8f-text);
    opacity: 0.7;
    font-size: 1.4rem;
}

/* Bottom Navigation (Mobile) */
.pg8f-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(28, 40, 51, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--pg8f-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.8rem;
    z-index: 999;
    height: 6.4rem;
}

.pg8f-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--pg8f-text);
    transition: var(--pg8f-transition);
    padding: 0.5rem;
    border-radius: 0.8rem;
    min-width: 44px;
    min-height: 44px;
}

.pg8f-bottom-nav-item:hover,
.pg8f-bottom-nav-item.pg8f-active {
    color: var(--pg8f-light);
    background: rgba(219, 112, 147, 0.1);
    transform: scale(1.05);
}

.pg8f-bottom-nav-item i {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.pg8f-bottom-nav-item span {
    font-size: 1rem;
    font-weight: 600;
}

/* Utility Classes */
.pg8f-text-center { text-align: center; }
.pg8f-text-left { text-align: left; }
.pg8f-text-right { text-align: right; }
.pg8f-mt-1 { margin-top: 1rem; }
.pg8f-mt-2 { margin-top: 2rem; }
.pg8f-mt-3 { margin-top: 3rem; }
.pg8f-mb-1 { margin-bottom: 1rem; }
.pg8f-mb-2 { margin-bottom: 2rem; }
.pg8f-mb-3 { margin-bottom: 3rem; }
.pg8f-hidden { display: none; }
.pg8f-visible { display: block; }

/* Responsive Design */
@media (max-width: 374px) {
    .pg8f-container {
        padding: 0 1rem;
    }
    
    .pg8f-nav {
        padding: 1rem;
    }
    
    .pg8f-card {
        padding: 1.5rem;
    }
    
    .pg8f-game-grid {
        grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    }
}

@media (min-width: 375px) and (max-width: 430px) {
    .pg8f-game-grid {
        grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    }
}

/* Animation and Keyframes */
@keyframes pg8f-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.pg8f-fade-in {
    animation: pg8f-fadeIn 0.6s ease-out;
}

.pg8f-pulse {
    animation: pg8f-pulse 2s infinite;
}

/* Performance optimizations */
.pg8f-wrapper {
    contain: layout style;
}

.pg8f-game-item,
.pg8f-btn,
.pg8f-promo-btn {
    will-change: transform;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --pg8f-border: rgba(255, 255, 255, 0.5);
        --pg8f-text: #FFFFFF;
    }
}

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