/**
 * Fun Bingo Games - Theme Stylesheet
 * All classes use prefix: s509-
 * Color Palette: #2E4057 (dark bg), #F08080 (accent), #CD853F (gold)
 * Version: 1.0.0
 */

/* CSS Variables */
:root {
    --s509-primary: #2E4057;
    --s509-secondary: #F08080;
    --s509-accent: #CD853F;
    --s509-bg-dark: #1a2a3a;
    --s509-bg-light: #f5f5f5;
    --s509-text-light: #ffffff;
    --s509-text-dark: #333333;
    --s509-gradient-start: #2E4057;
    --s509-gradient-end: #1a2a3a;
    --s509-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --s509-radius: 8px;
    --s509-transition: all 0.3s ease;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--s509-gradient-start), var(--s509-gradient-end));
    color: var(--s509-text-light);
    line-height: 1.5rem;
    min-height: 100vh;
}

/* Container */
.s509-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

.s509-wrapper {
    padding: 1rem;
}

/* Header */
.s509-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--s509-primary);
    padding: 0.8rem 1rem;
    z-index: 1000;
    box-shadow: var(--s509-shadow);
    transition: var(--s509-transition);
}

.s509-header-scrolled {
    background: rgba(46, 64, 87, 0.95);
    backdrop-filter: blur(10px);
}

.s509-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.s509-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--s509-text-light);
}

.s509-logo img {
    width: 28px;
    height: 28px;
}

.s509-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--s509-secondary);
}

.s509-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s509-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--s509-radius);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--s509-transition);
    text-decoration: none;
    min-height: 36px;
}

.s509-btn-primary {
    background: var(--s509-accent);
    color: var(--s509-text-light);
}

.s509-btn-primary:hover {
    background: #b87333;
    transform: translateY(-2px);
}

.s509-btn-secondary {
    background: transparent;
    border: 2px solid var(--s509-secondary);
    color: var(--s509-secondary);
}

.s509-btn-secondary:hover {
    background: var(--s509-secondary);
    color: var(--s509-primary);
}

.s509-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
}

.s509-hamburger span {
    width: 24px;
    height: 3px;
    background: var(--s509-text-light);
    transition: var(--s509-transition);
}

.s509-hamburger-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.s509-hamburger-active span:nth-child(2) {
    opacity: 0;
}

.s509-hamburger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.s509-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--s509-bg-dark);
    z-index: 9999;
    padding: 6rem 1.5rem 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.s509-menu-open {
    right: 0;
}

.s509-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: var(--s509-transition);
}

.s509-overlay-visible {
    opacity: 1;
    visibility: visible;
}

.s509-nav-list {
    list-style: none;
}

.s509-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.s509-nav-link {
    display: block;
    padding: 1.2rem 0;
    color: var(--s509-text-light);
    text-decoration: none;
    font-size: 1.4rem;
    transition: var(--s509-transition);
}

.s509-nav-link:hover {
    color: var(--s509-secondary);
    padding-left: 0.5rem;
}

/* Main Content */
.s509-main {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Slider */
.s509-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--s509-radius);
    margin: 1rem 0;
}

.s509-slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.s509-slide {
    min-width: 100%;
    cursor: pointer;
}

.s509-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.s509-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.s509-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--s509-transition);
}

.s509-dot-active {
    background: var(--s509-accent);
    transform: scale(1.2);
}

/* Sections */
.s509-section {
    padding: 1.5rem 0;
}

.s509-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--s509-secondary);
    margin-bottom: 1rem;
    text-align: center;
}

.s509-section-subtitle {
    font-size: 1.3rem;
    color: var(--s509-text-light);
    opacity: 0.8;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Game Grid */
.s509-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.s509-game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--s509-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--s509-transition);
    text-align: center;
    padding: 0.5rem;
}

.s509-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.s509-game-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.s509-game-name {
    font-size: 1rem;
    color: var(--s509-text-light);
    margin-top: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category Section */
.s509-category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(205, 133, 63, 0.2);
    border-radius: var(--s509-radius);
}

.s509-category-icon {
    font-size: 2rem;
}

.s509-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--s509-accent);
}

/* Content Cards */
.s509-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--s509-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.s509-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--s509-secondary);
    margin-bottom: 0.8rem;
}

.s509-card-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--s509-text-light);
    opacity: 0.9;
}

/* Promo Links */
.s509-promo-link {
    color: var(--s509-accent);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--s509-transition);
}

.s509-promo-link:hover {
    color: var(--s509-secondary);
    text-decoration: underline;
}

.s509-promo-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--s509-accent), #e8a849);
    color: var(--s509-text-light);
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: var(--s509-radius);
    cursor: pointer;
    transition: var(--s509-transition);
    border: none;
    margin: 1rem 0;
}

.s509-promo-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(205, 133, 63, 0.4);
}

/* Footer */
.s509-footer {
    background: var(--s509-bg-dark);
    padding: 2rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.s509-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.s509-footer-link {
    color: var(--s509-text-light);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: var(--s509-transition);
}

.s509-footer-link:hover {
    background: rgba(240, 128, 128, 0.2);
    color: var(--s509-secondary);
}

.s509-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.s509-partner-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.7;
    transition: var(--s509-transition);
}

.s509-partner-logo:hover {
    opacity: 1;
}

.s509-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: var(--s509-text-light);
    opacity: 0.6;
}

/* Mobile Bottom Navigation */
.s509-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--s509-primary);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.s509-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    background: transparent;
    border: none;
    color: var(--s509-text-light);
    cursor: pointer;
    transition: var(--s509-transition);
    text-decoration: none;
}

.s509-nav-btn:hover {
    transform: scale(1.1);
}

.s509-nav-btn.active {
    color: var(--s509-accent);
}

.s509-nav-btn .material-icons,
.s509-nav-btn ion-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.s509-nav-btn i {
    font-size: 22px;
    margin-bottom: 2px;
}

.s509-nav-btn span {
    font-size: 10px;
    font-weight: 500;
}

/* Desktop - Hide bottom nav */
@media (min-width: 769px) {
    .s509-bottom-nav {
        display: none;
    }

    .s509-main {
        padding-bottom: 20px;
    }
}

/* Touch feedback */
.s509-touch-active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* Utility Classes */
.s509-text-center {
    text-align: center;
}

.s509-mt-1 { margin-top: 0.5rem; }
.s509-mt-2 { margin-top: 1rem; }
.s509-mb-1 { margin-bottom: 0.5rem; }
.s509-mb-2 { margin-bottom: 1rem; }

.s509-highlight {
    color: var(--s509-accent);
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .s509-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .s509-btn {
        padding: 0.5rem 0.8rem;
        font-size: 1.1rem;
    }
}
