/* 50 jili ph CSS - All classes use g580- prefix */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables */
:root {
    --g580-primary: #FA8072;
    --g580-secondary: #F5DEB3;
    --g580-dark: #141414;
    --g580-accent: #FF1493;
    --g580-warm: #CD853F;
    --g580-white: #ffffff;
    --g580-gray: #666666;
    --g580-light-gray: #f5f5f5;
    --g580-border: #e0e0e0;
    --g580-shadow: rgba(0, 0, 0, 0.1);
    --g580-transition: all 0.3s ease;

    /* Typography */
    font-size: 62.5%; /* 1rem = 10px */
}

/* Base Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--g580-dark);
    background-color: var(--g580-light-gray);
    overflow-x: hidden;
}

/* Container */
.g580-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.g580-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.g580-main {
    flex: 1;
    padding-top: 6rem; /* Account for fixed header */
}

/* Header */
.g580-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--g580-dark) 0%, var(--g580-accent) 100%);
    box-shadow: 0 2px 10px var(--g580-shadow);
    z-index: 1000;
}

.g580-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    height: 6rem;
}

.g580-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--g580-white);
}

.g580-logo-icon {
    width: 3.2rem;
    height: 3.2rem;
    background-color: var(--g580-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.g580-logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--g580-white);
}

.g580-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.g580-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--g580-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.4rem;
    touch-action: manipulation;
}

.g580-btn-primary {
    background-color: var(--g580-primary);
    color: var(--g580-white);
}

.g580-btn-primary:hover {
    background-color: #e86a5d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 128, 114, 0.3);
}

.g580-btn-secondary {
    background-color: var(--g580-secondary);
    color: var(--g580-dark);
}

.g580-btn-secondary:hover {
    background-color: #e6d2a0;
    transform: translateY(-2px);
}

.g580-menu-toggle {
    background: none;
    border: none;
    color: var(--g580-white);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu */
.g580-mobile-menu {
    position: fixed;
    top: 6rem;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 6rem);
    background-color: var(--g580-white);
    box-shadow: -2px 0 10px var(--g580-shadow);
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.g580-mobile-menu.active {
    right: 0;
}

.g580-menu-overlay {
    position: fixed;
    top: 6rem;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--g580-transition);
    z-index: 9998;
}

.g580-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.g580-nav-list {
    list-style: none;
    padding: 2rem 0;
}

.g580-nav-item {
    border-bottom: 1px solid var(--g580-border);
}

.g580-nav-link {
    display: block;
    padding: 1.5rem 2rem;
    color: var(--g580-dark);
    text-decoration: none;
    transition: var(--g580-transition);
    font-size: 1.6rem;
}

.g580-nav-link:hover {
    background-color: var(--g580-light-gray);
    color: var(--g580-accent);
}

/* Hero Section */
.g580-hero {
    position: relative;
    overflow: hidden;
}

.g580-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: var(--g580-dark);
}

.g580-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.g580-carousel-slide.active {
    opacity: 1;
}

.g580-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.g580-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.g580-carousel-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--g580-transition);
}

.g580-carousel-indicator.active {
    background-color: var(--g580-primary);
    width: 2rem;
    border-radius: 0.5rem;
}

/* Typography */
.g580-h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--g580-dark);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.g580-h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--g580-dark);
    margin-bottom: 1rem;
}

.g580-h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--g580-dark);
    margin-bottom: 0.8rem;
}

.g580-text {
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--g580-gray);
    margin-bottom: 1rem;
}

.g580-text-center {
    text-align: center;
}

.g580-text-primary {
    color: var(--g580-primary);
}

.g580-text-accent {
    color: var(--g580-accent);
}

/* Game Grid */
.g580-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.g580-game-card {
    background-color: var(--g580-white);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--g580-shadow);
    transition: var(--g580-transition);
    cursor: pointer;
}

.g580-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.g580-game-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.g580-game-name {
    padding: 0.8rem;
    font-size: 1.2rem;
    text-align: center;
    color: var(--g580-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Section */
.g580-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.g580-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.g580-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--g580-dark);
}

.g580-section-link {
    color: var(--g580-accent);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
}

.g580-section-link:hover {
    text-decoration: underline;
}

/* Card */
.g580-card {
    background-color: var(--g580-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--g580-shadow);
    margin-bottom: 2rem;
}

/* Footer */
.g580-footer {
    background-color: var(--g580-dark);
    color: var(--g580-white);
    padding: 3rem 0 8rem; /* Extra bottom padding for mobile nav */
}

.g580-footer-content {
    margin-bottom: 2rem;
}

.g580-footer-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--g580-primary);
}

.g580-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.g580-footer-link {
    color: var(--g580-secondary);
    text-decoration: none;
    font-size: 1.4rem;
    transition: var(--g580-transition);
}

.g580-footer-link:hover {
    color: var(--g580-primary);
}

.g580-partners {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.g580-partner {
    width: 100%;
    height: 40px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--g580-transition);
}

.g580-partner:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.g580-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
    color: var(--g580-gray);
}

/* Bottom Navigation */
.g580-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--g580-dark) 0%, var(--g580-accent) 100%);
    box-shadow: 0 -2px 10px var(--g580-shadow);
    z-index: 1000;
    height: 6rem;
}

.g580-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 0.5rem 0;
}

.g580-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    min-height: 5rem;
    cursor: pointer;
    transition: var(--g580-transition);
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.g580-bottom-nav-item:hover,
.g580-bottom-nav-item.active {
    color: var(--g580-primary);
    transform: scale(1.1);
}

.g580-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
}

.g580-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Utility Classes */
.g580-flex {
    display: flex;
}

.g580-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.g580-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.g580-grid {
    display: grid;
}

.g580-gap-1 {
    gap: 1rem;
}

.g580-gap-2 {
    gap: 2rem;
}

.g580-mb-1 {
    margin-bottom: 1rem;
}

.g580-mb-2 {
    margin-bottom: 2rem;
}

.g580-mt-1 {
    margin-top: 1rem;
}

.g580-mt-2 {
    margin-top: 2rem;
}

.g580-p-1 {
    padding: 1rem;
}

.g580-p-2 {
    padding: 2rem;
}

.g580-text-center {
    text-align: center;
}

.g580-hidden {
    display: none;
}

/* Responsive */
@media (min-width: 769px) {
    .g580-bottom-nav {
        display: none;
    }

    .g580-main {
        padding-bottom: 0;
    }

    .g580-footer {
        padding-bottom: 3rem;
    }

    .g580-game-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .g580-main {
        padding-bottom: 8rem; /* Account for fixed bottom nav */
    }
}

/* Animations */
@keyframes g580-fadeIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.g580-fade-in {
    animation: g580-fadeIn 0.5s ease forwards;
}

/* Loading State */
.g580-loading {
    position: relative;
    overflow: hidden;
}

.g580-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: g580-loading 1.5s infinite;
}

@keyframes g580-loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}