/**
 * jilib.css - Core Stylesheet for jilib.sbs
 * Mobile-first responsive design (max-width: 430px)
 * All classes use prefix 'pg58-' for namespace isolation
 * Color palette: #6C757D | #FFCC33 | #333333
 */

/* CSS Reset and Base Styles */
:root {
    --pg58-primary: #FFCC33;
    --pg58-secondary: #6C757D;
    --pg58-dark: #333333;
    --pg58-bg: #1a1a1a;
    --pg58-bg-light: #2d2d2d;
    --pg58-text: #ffffff;
    --pg58-text-muted: #b0b0b0;
    --pg58-border: #444444;
    --pg58-success: #28a745;
    --pg58-danger: #dc3545;
    --pg58-gradient: linear-gradient(135deg, #FFCC33 0%, #FFA500 100%);
    font-size: 62.5%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    background-color: var(--pg58-bg);
    color: var(--pg58-text);
    min-height: 100vh;
}

a {
    color: var(--pg58-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FFD700;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container Styles */
.pg58-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.pg58-wrapper {
    padding: 2rem 0;
}

/* Header Styles */
.pg58-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--pg58-dark) 0%, rgba(51, 51, 51, 0.95) 100%);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.pg58-header-scrolled {
    background: rgba(51, 51, 51, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.pg58-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.pg58-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg58-logo img {
    width: 32px;
    height: 32px;
}

.pg58-logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg58-primary);
    letter-spacing: 1px;
}

.pg58-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pg58-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-height: 44px;
}

.pg58-btn-primary {
    background: var(--pg58-gradient);
    color: var(--pg58-dark);
}

.pg58-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 204, 51, 0.4);
}

.pg58-btn-outline {
    background: transparent;
    border: 2px solid var(--pg58-primary);
    color: var(--pg58-primary);
}

.pg58-btn-outline:hover {
    background: var(--pg58-primary);
    color: var(--pg58-dark);
}

/* Hamburger Menu */
.pg58-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 10001;
}

.pg58-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--pg58-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.pg58-hamburger-active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.pg58-hamburger-active span:nth-child(2) {
    opacity: 0;
}

.pg58-hamburger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.pg58-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--pg58-bg-light);
    z-index: 9999;
    padding: 8rem 2rem 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.pg58-menu-active {
    right: 0;
}

.pg58-mobile-menu ul {
    list-style: none;
}

.pg58-mobile-menu li {
    border-bottom: 1px solid var(--pg58-border);
}

.pg58-mobile-menu a {
    display: block;
    padding: 1.5rem 1rem;
    color: var(--pg58-text);
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

.pg58-mobile-menu a:hover {
    color: var(--pg58-primary);
    padding-left: 1.5rem;
}

/* Menu Overlay */
.pg58-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pg58-overlay-active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.pg58-main {
    padding-top: 70px;
    padding-bottom: 80px;
}

/* Carousel Styles */
.pg58-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.pg58-slide {
    display: none;
    width: 100%;
    cursor: pointer;
}

.pg58-slide:first-child {
    display: block;
}

.pg58-slide img {
    width: 100%;
    border-radius: 0;
}

.pg58-carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
}

.pg58-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg58-dot-active {
    background: var(--pg58-primary);
    transform: scale(1.2);
}

/* Section Styles */
.pg58-section {
    padding: 2rem 1.5rem;
    margin-bottom: 1rem;
}

.pg58-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--pg58-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.pg58-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--pg58-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Game Grid */
.pg58-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg58-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.pg58-game-item:hover {
    transform: scale(1.05);
}

.pg58-game-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 2px solid var(--pg58-border);
    transition: border-color 0.3s ease;
}

.pg58-game-item:hover img {
    border-color: var(--pg58-primary);
}

.pg58-game-name {
    font-size: 1.2rem;
    color: var(--pg58-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Category Section */
.pg58-category-section {
    margin-bottom: 2rem;
}

.pg58-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.pg58-category-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--pg58-primary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg58-category-title i {
    font-size: 2rem;
}

/* Feature Cards */
.pg58-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.pg58-feature-card {
    background: var(--pg58-bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--pg58-border);
    transition: all 0.3s ease;
}

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

.pg58-feature-icon {
    font-size: 3rem;
    color: var(--pg58-primary);
    margin-bottom: 1rem;
}

.pg58-feature-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pg58-feature-text {
    font-size: 1.3rem;
    color: var(--pg58-text-muted);
}

/* Promo Links */
.pg58-promo-text {
    color: var(--pg58-primary);
    font-weight: 600;
    cursor: pointer;
}

.pg58-promo-text:hover {
    text-decoration: underline;
}

/* Footer Styles */
.pg58-footer {
    background: var(--pg58-bg-light);
    padding: 3rem 1.5rem 2rem;
    border-top: 1px solid var(--pg58-border);
}

.pg58-footer-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.pg58-footer-brand p {
    font-size: 1.4rem;
    color: var(--pg58-text-muted);
    margin-top: 1rem;
    line-height: 1.6;
}

.pg58-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg58-footer-link {
    display: block;
    padding: 1rem;
    background: var(--pg58-bg);
    border-radius: 8px;
    text-align: center;
    font-size: 1.3rem;
    color: var(--pg58-text);
    border: 1px solid var(--pg58-border);
    transition: all 0.3s ease;
}

.pg58-footer-link:hover {
    border-color: var(--pg58-primary);
    color: var(--pg58-primary);
}

.pg58-footer-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: var(--pg58-text-muted);
    padding-top: 1.5rem;
    border-top: 1px solid var(--pg58-border);
}

/* Bottom Navigation */
.pg58-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, var(--pg58-dark) 0%, #1a1a1a 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid var(--pg58-border);
}

.pg58-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    color: var(--pg58-text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pg58-nav-item:hover,
.pg58-nav-item.active {
    color: var(--pg58-primary);
}

.pg58-nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
}

.pg58-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.pg58-nav-item:hover i {
    transform: scale(1.15);
}

/* Testimonials */
.pg58-testimonials {
    background: var(--pg58-bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.pg58-testimonial-item {
    padding: 1rem;
    border-bottom: 1px solid var(--pg58-border);
}

.pg58-testimonial-item:last-child {
    border-bottom: none;
}

.pg58-testimonial-text {
    font-size: 1.4rem;
    color: var(--pg58-text);
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.pg58-testimonial-author {
    font-size: 1.2rem;
    color: var(--pg58-primary);
    font-weight: 600;
}

/* RTP Section */
.pg58-rtp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pg58-rtp-item {
    background: var(--pg58-bg-light);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--pg58-border);
}

.pg58-rtp-game {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pg58-rtp-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg58-success);
}

/* Payment Methods */
.pg58-payment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.pg58-payment-item {
    background: var(--pg58-bg-light);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    border: 1px solid var(--pg58-border);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg58-payment-item i {
    font-size: 2rem;
    color: var(--pg58-primary);
}

/* CTA Section */
.pg58-cta {
    background: var(--pg58-gradient);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.pg58-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg58-dark);
    margin-bottom: 1rem;
}

.pg58-cta-text {
    font-size: 1.4rem;
    color: var(--pg58-dark);
    margin-bottom: 1.5rem;
}

.pg58-cta .pg58-btn {
    background: var(--pg58-dark);
    color: var(--pg58-primary);
    font-size: 1.6rem;
    padding: 1rem 3rem;
}

/* Winners Section */
.pg58-winners-list {
    background: var(--pg58-bg-light);
    border-radius: 12px;
    overflow: hidden;
}

.pg58-winner-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--pg58-border);
}

.pg58-winner-item:last-child {
    border-bottom: none;
}

.pg58-winner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pg58-winner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pg58-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--pg58-dark);
}

.pg58-winner-name {
    font-size: 1.4rem;
    font-weight: 600;
}

.pg58-winner-game {
    font-size: 1.2rem;
    color: var(--pg58-text-muted);
}

.pg58-winner-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pg58-success);
}

/* Desktop Styles - Hide Bottom Nav */
@media (min-width: 769px) {
    .pg58-bottom-nav {
        display: none;
    }

    .pg58-main {
        padding-bottom: 2rem;
    }

    .pg58-container {
        max-width: 768px;
    }

    .pg58-game-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .pg58-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Utility Classes */
.pg58-text-center {
    text-align: center;
}

.pg58-text-primary {
    color: var(--pg58-primary);
}

.pg58-mb-1 {
    margin-bottom: 1rem;
}

.pg58-mb-2 {
    margin-bottom: 2rem;
}

.pg58-mt-2 {
    margin-top: 2rem;
}
