/* PHPlay CSS Styles - All classes use pg46- prefix */
/* Color palette: #BBBBBB | #8B4513 | #ECF0F1 | #34495E | #D2B48C */

:root {
    /* Brand colors */
    --pg46-primary: #8B4513;
    --pg46-secondary: #D2B48C;
    --pg46-accent: #BBBBBB;
    --pg46-dark: #34495E;
    --pg46-light: #ECF0F1;

    /* Text colors */
    --pg46-text-primary: #ECF0F1;
    --pg46-text-secondary: #D2B48C;
    --pg46-text-muted: #BBBBBB;

    /* Background colors */
    --pg46-bg-primary: #34495E;
    --pg46-bg-secondary: #8B4513;
    --pg46-bg-card: rgba(139, 69, 19, 0.9);
    --pg46-bg-overlay: rgba(52, 73, 94, 0.95);

    /* Status colors */
    --pg46-success: #28a745;
    --pg46-warning: #ffc107;
    --pg46-danger: #dc3545;
    --pg46-info: #17a2b8;

    /* Spacing */
    --pg46-spacing-xs: 0.4rem;
    --pg46-spacing-sm: 0.8rem;
    --pg46-spacing-md: 1.6rem;
    --pg46-spacing-lg: 2.4rem;
    --pg46-spacing-xl: 3.2rem;

    /* Typography */
    --pg46-font-size-xs: 1rem;
    --pg46-font-size-sm: 1.2rem;
    --pg46-font-size-base: 1.4rem;
    --pg46-font-size-lg: 1.6rem;
    --pg46-font-size-xl: 1.8rem;
    --pg46-font-size-2xl: 2.4rem;
    --pg46-font-size-3xl: 3.2rem;

    /* Border radius */
    --pg46-radius-sm: 0.4rem;
    --pg46-radius-md: 0.8rem;
    --pg46-radius-lg: 1.2rem;
    --pg46-radius-xl: 1.6rem;

    /* Shadows */
    --pg46-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --pg46-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --pg46-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --pg46-shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.25);

    /* Z-index */
    --pg46-z-header: 1000;
    --pg46-z-bottom-nav: 1000;
    --pg46-z-mobile-menu: 9999;
    --pg46-z-overlay: 9998;
}

/* 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, Cantarell, sans-serif;
    font-size: var(--pg46-font-size-base);
    line-height: 1.5;
    color: var(--pg46-text-primary);
    background-color: var(--pg46-bg-primary);
    overflow-x: hidden;
}

/* Typography */
.pg46-h1 {
    font-size: var(--pg46-font-size-3xl);
    font-weight: 700;
    color: var(--pg46-text-primary);
    margin-bottom: var(--pg46-spacing-md);
    line-height: 1.2;
}

.pg46-h2 {
    font-size: var(--pg46-font-size-2xl);
    font-weight: 600;
    color: var(--pg46-text-secondary);
    margin-bottom: var(--pg46-spacing-sm);
    line-height: 1.3;
}

.pg46-h3 {
    font-size: var(--pg46-font-size-xl);
    font-weight: 500;
    color: var(--pg46-text-primary);
    margin-bottom: var(--pg46-spacing-sm);
}

.pg46-text {
    color: var(--pg46-text-primary);
    margin-bottom: var(--pg46-spacing-sm);
}

.pg46-text-sm {
    font-size: var(--pg46-font-size-sm);
    color: var(--pg46-text-muted);
}

/* Layout containers */
.pg46-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 var(--pg46-spacing-sm);
}

.pg46-wrapper {
    min-height: 100vh;
    padding-bottom: 8rem; /* Space for bottom nav */
}

.pg46-main {
    padding-top: 8rem; /* Space for fixed header */
}

/* Header */
.pg46-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--pg46-z-header);
    background: linear-gradient(135deg, var(--pg46-bg-secondary) 0%, var(--pg46-bg-primary) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pg46-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--pg46-spacing-sm);
    height: 6rem;
}

.pg46-logo {
    display: flex;
    align-items: center;
    gap: var(--pg46-spacing-xs);
    text-decoration: none;
    color: var(--pg46-text-primary);
    font-weight: 700;
    font-size: var(--pg46-font-size-lg);
}

.pg46-logo-icon {
    width: 2.4rem;
    height: 2.4rem;
    background: var(--pg46-accent);
    border-radius: var(--pg46-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--pg46-dark);
}

.pg46-header-actions {
    display: flex;
    align-items: center;
    gap: var(--pg46-spacing-sm);
}

.pg46-menu-toggle {
    background: none;
    border: none;
    color: var(--pg46-text-primary);
    font-size: 2.4rem;
    cursor: pointer;
    padding: var(--pg46-spacing-xs);
    border-radius: var(--pg46-radius-sm);
    transition: all 0.3s ease;
}

.pg46-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Buttons */
.pg46-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--pg46-spacing-sm) var(--pg46-spacing-md);
    border: none;
    border-radius: var(--pg46-radius-md);
    font-size: var(--pg46-font-size-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 4.4rem; /* Touch-friendly size */
    min-width: 8rem;
}

.pg46-btn-primary {
    background: linear-gradient(135deg, var(--pg46-secondary) 0%, var(--pg46-accent) 100%);
    color: var(--pg46-dark);
    box-shadow: var(--pg46-shadow-sm);
}

.pg46-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--pg46-shadow-md);
}

.pg46-btn-secondary {
    background: transparent;
    color: var(--pg46-text-primary);
    border: 2px solid var(--pg46-secondary);
}

.pg46-btn-secondary:hover {
    background: var(--pg46-secondary);
    color: var(--pg46-dark);
}

.pg46-btn-promo {
    background: linear-gradient(135deg, var(--pg46-success) 0%, #20c997 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--pg46-shadow-sm);
}

.pg46-btn-promo:hover {
    transform: translateY(-2px);
    box-shadow: var(--pg46-shadow-md);
}

/* Mobile menu */
.pg46-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--pg46-bg-overlay);
    backdrop-filter: blur(10px);
    z-index: var(--pg46-z-mobile-menu);
    transition: right 0.3s ease;
    padding: var(--pg46-spacing-lg) var(--pg46-spacing-md);
    overflow-y: auto;
}

.pg46-mobile-menu.active {
    right: 0;
}

.pg46-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--pg46-z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pg46-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pg46-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--pg46-spacing-lg);
    padding-bottom: var(--pg46-spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pg46-menu-close {
    background: none;
    border: none;
    color: var(--pg46-text-primary);
    font-size: 2.4rem;
    cursor: pointer;
    padding: var(--pg46-spacing-xs);
    border-radius: var(--pg46-radius-sm);
    transition: all 0.3s ease;
}

.pg46-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.pg46-menu-nav {
    list-style: none;
}

.pg46-menu-item {
    margin-bottom: var(--pg46-spacing-sm);
}

.pg46-menu-link {
    display: flex;
    align-items: center;
    padding: var(--pg46-spacing-sm);
    color: var(--pg46-text-primary);
    text-decoration: none;
    border-radius: var(--pg46-radius-md);
    transition: all 0.3s ease;
    font-weight: 500;
}

.pg46-menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--pg46-secondary);
    transform: translateX(4px);
}

.pg46-menu-link.active {
    background: var(--pg46-secondary);
    color: var(--pg46-dark);
}

.pg46-menu-icon {
    margin-right: var(--pg46-spacing-sm);
    font-size: var(--pg46-font-size-lg);
    width: 2rem;
    text-align: center;
}

/* Carousel */
.pg46-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--pg46-radius-lg);
    margin-bottom: var(--pg46-spacing-lg);
    box-shadow: var(--pg46-shadow-lg);
}

.pg46-carousel-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.pg46-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.pg46-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pg46-carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--pg46-spacing-md);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.pg46-carousel-title {
    font-size: var(--pg46-font-size-xl);
    font-weight: 700;
    margin-bottom: var(--pg46-spacing-xs);
}

.pg46-carousel-text {
    font-size: var(--pg46-font-size-sm);
    opacity: 0.9;
}

.pg46-carousel-indicators {
    position: absolute;
    bottom: var(--pg46-spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--pg46-spacing-xs);
}

.pg46-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg46-carousel-indicator.active {
    background: var(--pg46-secondary);
    transform: scale(1.2);
}

/* Game grid */
.pg46-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--pg46-spacing-sm);
    margin-bottom: var(--pg46-spacing-lg);
}

.pg46-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--pg46-spacing-sm);
    background: var(--pg46-bg-card);
    border-radius: var(--pg46-radius-md);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--pg46-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pg46-game-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--pg46-shadow-md);
    border-color: var(--pg46-secondary);
}

.pg46-game-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: var(--pg46-spacing-xs);
    border-radius: var(--pg46-radius-sm);
    overflow: hidden;
}

.pg46-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pg46-game-name {
    font-size: var(--pg46-font-size-xs);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Cards */
.pg46-card {
    background: var(--pg46-bg-card);
    border-radius: var(--pg46-radius-lg);
    padding: var(--pg46-spacing-md);
    margin-bottom: var(--pg46-spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--pg46-shadow-sm);
}

.pg46-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--pg46-spacing-md);
    padding-bottom: var(--pg46-spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pg46-card-title {
    font-size: var(--pg46-font-size-lg);
    font-weight: 600;
    color: var(--pg46-text-primary);
}

.pg46-card-content {
    color: var(--pg46-text-secondary);
}

/* Bottom navigation */
.pg46-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--pg46-z-bottom-nav);
    background: linear-gradient(135deg, var(--pg46-bg-secondary) 0%, var(--pg46-bg-primary) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--pg46-spacing-xs) 0;
    height: 6.4rem;
}

.pg46-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.pg46-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    min-height: 5.6rem;
    padding: var(--pg46-spacing-xs);
    text-decoration: none;
    color: var(--pg46-text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    border-radius: var(--pg46-radius-md);
}

.pg46-bottom-nav-item:hover {
    color: var(--pg46-secondary);
    transform: translateY(-2px);
}

.pg46-bottom-nav-item.active {
    color: var(--pg46-secondary);
    background: rgba(210, 180, 140, 0.2);
}

.pg46-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: var(--pg46-spacing-xs);
    transition: all 0.3s ease;
}

.pg46-bottom-nav-item:hover .pg46-bottom-nav-icon {
    transform: scale(1.1);
}

.pg46-bottom-nav-text {
    font-size: var(--pg46-font-size-xs);
    font-weight: 500;
    text-align: center;
}

/* Footer */
.pg46-footer {
    background: var(--pg46-bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--pg46-spacing-lg) 0 var(--pg46-spacing-xl);
    margin-top: var(--pg46-spacing-xl);
}

.pg46-footer-content {
    text-align: center;
}

.pg46-partners {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--pg46-spacing-md);
    margin-bottom: var(--pg46-spacing-lg);
}

.pg46-partner-logo {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.pg46-partner-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.pg46-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--pg46-spacing-md);
    margin-bottom: var(--pg46-spacing-lg);
}

.pg46-footer-link {
    color: var(--pg46-text-muted);
    text-decoration: none;
    font-size: var(--pg46-font-size-sm);
    transition: color 0.3s ease;
}

.pg46-footer-link:hover {
    color: var(--pg46-secondary);
}

.pg46-copyright {
    color: var(--pg46-text-muted);
    font-size: var(--pg46-font-size-xs);
    margin-top: var(--pg46-spacing-md);
}

/* Promotional links */
.pg46-promo-link {
    color: var(--pg46-success);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pg46-promo-link:hover {
    color: var(--pg46-warning);
    text-decoration: underline;
}

.pg46-promo-btn {
    background: linear-gradient(135deg, var(--pg46-success) 0%, #20c997 100%);
    color: white;
    padding: var(--pg46-spacing-sm) var(--pg46-spacing-md);
    border-radius: var(--pg46-radius-md);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--pg46-spacing-xs);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: var(--pg46-shadow-sm);
}

.pg46-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--pg46-shadow-md);
}

/* Responsive design */
@media (min-width: 769px) {
    .pg46-container {
        max-width: 1200px;
    }

    .pg46-bottom-nav {
        display: none;
    }

    .pg46-main {
        padding-bottom: 0;
    }

    .pg46-wrapper {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    .pg46-main {
        padding-bottom: 8rem; /* Space for bottom nav */
    }
}

/* Utility classes */
.pg46-text-center {
    text-align: center;
}

.pg46-text-left {
    text-align: left;
}

.pg46-text-right {
    text-align: right;
}

.pg46-mb-sm {
    margin-bottom: var(--pg46-spacing-sm);
}

.pg46-mb-md {
    margin-bottom: var(--pg46-spacing-md);
}

.pg46-mb-lg {
    margin-bottom: var(--pg46-spacing-lg);
}

.pg46-mt-sm {
    margin-top: var(--pg46-spacing-sm);
}

.pg46-mt-md {
    margin-top: var(--pg46-spacing-md);
}

.pg46-mt-lg {
    margin-top: var(--pg46-spacing-lg);
}

.pg46-flex {
    display: flex;
}

.pg46-flex-col {
    flex-direction: column;
}

.pg46-items-center {
    align-items: center;
}

.pg46-justify-center {
    justify-content: center;
}

.pg46-justify-between {
    justify-content: space-between;
}

.pg46-gap-sm {
    gap: var(--pg46-spacing-sm);
}

.pg46-gap-md {
    gap: var(--pg46-spacing-md);
}

/* Animations */
@keyframes pg46-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pg46-slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.pg46-fade-in {
    animation: pg46-fadeIn 0.6s ease-out;
}

.pg46-slide-in-right {
    animation: pg46-slideInRight 0.3s ease-out;
}

/* Loading states */
.pg46-loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--pg46-secondary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus styles for accessibility */
.pg46-btn:focus,
.pg46-menu-toggle:focus,
.pg46-menu-link:focus,
.pg46-bottom-nav-item:focus {
    outline: 2px solid var(--pg46-secondary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --pg46-bg-card: rgba(255, 255, 255, 0.95);
        --pg46-text-primary: #000;
        --pg46-text-secondary: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}