/**
 * Lucky88 - Main Stylesheet
 * All classes use pg81- prefix for namespace isolation
 */

/* CSS Variables */
:root {
    --pg81-primary: #CC99FF;
    --pg81-secondary: #FFB347;
    --pg81-accent: #7B68EE;
    --pg81-gray: #808080;
    --pg81-light: #FFEF94;
    --pg81-dark: #2D2D2D;
    --pg81-bg: #1a1a1a;
    --pg81-text: #f5f5f5;
    --pg81-text-muted: #b0b0b0;
    --pg81-border: #333;
    --pg81-gradient: linear-gradient(135deg, #CC99FF 0%, #7B68EE 50%, #FFB347 100%);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--pg81-text);
    background-color: var(--pg81-bg);
    overflow-x: hidden;
}

body.pg81-loaded {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Container */
.pg81-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.pg81-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--pg81-dark) 0%, rgba(45, 45, 45, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--pg81-primary);
    box-shadow: 0 4px 20px rgba(204, 153, 255, 0.3);
    transition: transform 0.3s ease;
}

.pg81-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    max-width: 430px;
    margin: 0 auto;
}

.pg81-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--pg81-primary);
    font-size: 1.8rem;
    font-weight: 700;
}

.pg81-logo img {
    width: 32px;
    height: 32px;
}

/* Header Buttons */
.pg81-header-btns {
    display: flex;
    gap: 0.5rem;
}

.pg81-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pg81-btn-primary {
    background: var(--pg81-gradient);
    color: var(--pg81-dark);
}

.pg81-btn-secondary {
    background: transparent;
    color: var(--pg81-primary);
    border: 2px solid var(--pg81-primary);
}

.pg81-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 153, 255, 0.4);
}

.pg81-btn:active {
    transform: translateY(0);
}

/* Mobile Menu Toggle */
.pg81-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.pg81-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--pg81-primary);
    transition: all 0.3s ease;
}

/* Mobile Menu */
.pg81-mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--pg81-dark);
    border-bottom: 2px solid var(--pg81-primary);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 9999;
}

.pg81-mobile-menu.pg81-menu-open {
    max-height: 500px;
}

.pg81-menu-nav {
    padding: 1rem;
}

.pg81-menu-item {
    display: block;
    padding: 1rem;
    color: var(--pg81-text);
    text-decoration: none;
    border-bottom: 1px solid var(--pg81-border);
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.pg81-menu-item:hover {
    background: rgba(204, 153, 255, 0.1);
    color: var(--pg81-primary);
    padding-left: 1.5rem;
}

.pg81-menu-item:last-child {
    border-bottom: none;
}

/* Main Content */
.pg81-main {
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 100vh;
}

@media (min-width: 769px) {
    .pg81-main {
        padding-bottom: 0;
    }
}

/* Carousel */
.pg81-carousel {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 12px;
}

.pg81-carousel-item {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.pg81-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pg81-carousel-item:hover img {
    transform: scale(1.05);
}

/* Section */
.pg81-section {
    margin-bottom: 2.5rem;
}

.pg81-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg81-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game Grid */
.pg81-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.pg81-game-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--pg81-dark);
    border: 2px solid var(--pg81-border);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--pg81-text);
    display: block;
}

.pg81-game-item:hover {
    border-color: var(--pg81-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(204, 153, 255, 0.3);
}

.pg81-game-icon {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.pg81-game-name {
    padding: 0.6rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--pg81-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card */
.pg81-card {
    background: linear-gradient(145deg, rgba(45, 45, 45, 0.8), rgba(26, 26, 26, 0.9));
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--pg81-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pg81-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pg81-secondary);
    margin-bottom: 1rem;
}

.pg81-card-content {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--pg81-text-muted);
}

/* Footer */
.pg81-footer {
    background: var(--pg81-dark);
    border-top: 3px solid var(--pg81-primary);
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.pg81-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.pg81-footer-link {
    color: var(--pg81-text-muted);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--pg81-border);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pg81-footer-link:hover {
    background: var(--pg81-primary);
    color: var(--pg81-dark);
    border-color: var(--pg81-primary);
}

.pg81-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.pg81-partner-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pg81-partner-logo:hover {
    opacity: 1;
}

.pg81-copyright {
    text-align: center;
    color: var(--pg81-text-muted);
    font-size: 1.2rem;
    padding: 1rem;
    border-top: 1px solid var(--pg81-border);
}

/* Mobile Bottom Navigation */
.pg81-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--pg81-dark) 0%, #1a1a1a 100%);
    border-top: 3px solid var(--pg81-primary);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -4px 20px rgba(204, 153, 255, 0.3);
}

@media (min-width: 769px) {
    .pg81-mobile-nav {
        display: none;
    }
}

.pg81-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pg81-text-muted);
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 0.3rem;
}

.pg81-nav-btn:hover,
.pg81-nav-btn.active {
    color: var(--pg81-primary);
    transform: scale(1.1);
}

.pg81-nav-btn i {
    font-size: 24px;
    margin-bottom: 4px;
}

.pg81-nav-btn span {
    font-size: 10px;
    font-weight: 600;
}

/* Promotional Links */
.pg81-promo-link {
    color: var(--pg81-secondary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pg81-promo-link:hover {
    color: var(--pg81-primary);
    text-decoration: underline;
}

/* Utility Classes */
.pg81-text-center {
    text-align: center;
}

.pg81-mb-1 {
    margin-bottom: 1rem;
}

.pg81-mb-2 {
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .pg81-container {
        padding: 0 1rem;
    }

    .pg81-section-title {
        font-size: 1.8rem;
    }

    .pg81-game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
}
