/**
 * BF77 Core Stylesheet
 * All classes use prefix: s49a-
 * Color palette: #F4A460 (Sandy Brown) | #0D1117 (Dark) | #DEB887 (Burlywood)
 * @version 1.0.0
 */

/* CSS Variables with prefix */
:root {
    --s49a-primary: #F4A460;
    --s49a-secondary: #DEB887;
    --s49a-bg: #0D1117;
    --s49a-bg-light: #161B22;
    --s49a-bg-card: #1C2128;
    --s49a-text: #DEB887;
    --s49a-text-light: #F5E6D3;
    --s49a-text-muted: #8B8680;
    --s49a-accent: #F4A460;
    --s49a-success: #2EA043;
    --s49a-warning: #D29922;
    --s49a-danger: #F85149;
    --s49a-border: #30363D;
    --s49a-gradient: linear-gradient(135deg, #F4A460 0%, #DEB887 100%);
    --s49a-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --s49a-radius: 8px;
    --s49a-radius-lg: 16px;
    --s49a-header-height: 56px;
    --s49a-bottom-nav-height: 60px;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--s49a-bg);
    color: var(--s49a-text);
    line-height: 1.5;
    font-size: 1.4rem;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.s49a-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

.s49a-wrapper {
    padding: 1rem 0;
}

/* Typography */
.s49a-h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--s49a-text-light);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.s49a-h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--s49a-text-light);
    margin-bottom: 1rem;
}

.s49a-h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--s49a-text);
    margin-bottom: 0.8rem;
}

.s49a-text {
    font-size: 1.4rem;
    color: var(--s49a-text);
    line-height: 1.6;
}

.s49a-text-muted {
    color: var(--s49a-text-muted);
}

/* Header */
.s49a-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--s49a-header-height);
    background: linear-gradient(180deg, var(--s49a-bg) 0%, rgba(13, 17, 23, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--s49a-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    max-width: 430px;
    margin: 0 auto;
}

.s49a-header-scrolled {
    background: rgba(13, 17, 23, 0.98);
    box-shadow: var(--s49a-shadow);
}

.s49a-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.s49a-logo img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.s49a-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--s49a-primary);
    letter-spacing: 0.5px;
}

.s49a-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.s49a-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: none;
    border-radius: var(--s49a-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 36px;
}

.s49a-btn-primary {
    background: var(--s49a-gradient);
    color: var(--s49a-bg);
}

.s49a-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 164, 96, 0.3);
}

.s49a-btn-secondary {
    background: transparent;
    color: var(--s49a-primary);
    border: 1px solid var(--s49a-primary);
}

.s49a-btn-secondary:hover {
    background: rgba(244, 164, 96, 0.1);
}

.s49a-menu-btn {
    background: transparent;
    border: none;
    color: var(--s49a-text);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.8rem;
}

/* Mobile Menu */
.s49a-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--s49a-bg-light);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem;
}

.s49a-menu-active {
    right: 0;
}

.s49a-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.s49a-overlay-active {
    opacity: 1;
    visibility: visible;
}

.s49a-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--s49a-border);
}

.s49a-menu-close {
    background: transparent;
    border: none;
    color: var(--s49a-text);
    font-size: 2rem;
    cursor: pointer;
}

.s49a-menu-nav {
    list-style: none;
}

.s49a-menu-item {
    margin-bottom: 0.5rem;
}

.s49a-menu-link {
    display: block;
    padding: 1rem;
    color: var(--s49a-text);
    text-decoration: none;
    font-size: 1.4rem;
    border-radius: var(--s49a-radius);
    transition: all 0.2s ease;
}

.s49a-menu-link:hover {
    background: var(--s49a-bg-card);
    color: var(--s49a-primary);
}

/* Main Content */
.s49a-main {
    padding-top: calc(var(--s49a-header-height) + 1rem);
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .s49a-main {
        padding-bottom: calc(var(--s49a-bottom-nav-height) + 2rem);
    }
}

/* Carousel */
.s49a-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--s49a-radius-lg);
    margin-bottom: 1.5rem;
}

.s49a-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.s49a-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.s49a-slide-active {
    opacity: 1;
}

.s49a-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s49a-slide-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.s49a-slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.s49a-dot-active {
    background: var(--s49a-primary);
    width: 20px;
    border-radius: 4px;
}

/* Section */
.s49a-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--s49a-bg-card);
    border-radius: var(--s49a-radius-lg);
    border: 1px solid var(--s49a-border);
}

.s49a-section-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--s49a-border);
}

.s49a-section-title i {
    color: var(--s49a-primary);
    font-size: 1.6rem;
}

/* Game Grid */
.s49a-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.s49a-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.s49a-game-card:hover {
    transform: translateY(-2px);
}

.s49a-game-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--s49a-radius);
    object-fit: cover;
    margin-bottom: 0.4rem;
    border: 2px solid var(--s49a-border);
    transition: border-color 0.2s ease;
}

.s49a-game-card:hover .s49a-game-icon {
    border-color: var(--s49a-primary);
}

.s49a-game-name {
    font-size: 1.1rem;
    color: var(--s49a-text);
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features Grid */
.s49a-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.s49a-feature-card {
    padding: 1.2rem;
    background: var(--s49a-bg-light);
    border-radius: var(--s49a-radius);
    border: 1px solid var(--s49a-border);
    text-align: center;
}

.s49a-feature-icon {
    font-size: 2.4rem;
    color: var(--s49a-primary);
    margin-bottom: 0.8rem;
}

.s49a-feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--s49a-text-light);
    margin-bottom: 0.4rem;
}

.s49a-feature-desc {
    font-size: 1.2rem;
    color: var(--s49a-text-muted);
}

/* Footer */
.s49a-footer {
    background: var(--s49a-bg-light);
    border-top: 1px solid var(--s49a-border);
    padding: 2rem 1rem;
    margin-top: 2rem;
}

.s49a-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.s49a-footer-link {
    color: var(--s49a-text);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    background: var(--s49a-bg-card);
    border-radius: var(--s49a-radius);
    transition: all 0.2s ease;
}

.s49a-footer-link:hover {
    color: var(--s49a-primary);
    background: rgba(244, 164, 96, 0.1);
}

.s49a-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.s49a-partner-logo {
    height: 24px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.s49a-partner-logo:hover {
    opacity: 1;
}

.s49a-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: var(--s49a-text-muted);
}

/* Bottom Navigation */
.s49a-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--s49a-bottom-nav-height);
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.98) 0%, var(--s49a-bg) 100%);
    border-top: 1px solid var(--s49a-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    max-width: 430px;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .s49a-bottom-nav {
        display: none;
    }
}

.s49a-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: var(--s49a-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.s49a-nav-item:hover,
.s49a-nav-item.s49a-nav-active {
    color: var(--s49a-primary);
}

.s49a-nav-item i {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}

.s49a-nav-item span {
    font-size: 1rem;
}

/* Toast */
.s49a-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--s49a-bg-card);
    color: var(--s49a-text);
    padding: 1rem 2rem;
    border-radius: var(--s49a-radius);
    border: 1px solid var(--s49a-border);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.s49a-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Promo Link Styles */
.s49a-promo-text {
    color: var(--s49a-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.s49a-promo-text:hover {
    color: var(--s49a-text-light);
}

/* Lists */
.s49a-list {
    list-style: none;
}

.s49a-list-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--s49a-border);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.s49a-list-item:last-child {
    border-bottom: none;
}

.s49a-list-icon {
    color: var(--s49a-primary);
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

/* Cards */
.s49a-card {
    background: var(--s49a-bg-card);
    border-radius: var(--s49a-radius);
    border: 1px solid var(--s49a-border);
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.s49a-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.s49a-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--s49a-text-light);
}

/* Touch Active State */
.s49a-touch-active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Utility Classes */
.s49a-mt-1 { margin-top: 0.5rem; }
.s49a-mt-2 { margin-top: 1rem; }
.s49a-mt-3 { margin-top: 1.5rem; }
.s49a-mb-1 { margin-bottom: 0.5rem; }
.s49a-mb-2 { margin-bottom: 1rem; }
.s49a-mb-3 { margin-bottom: 1.5rem; }
.s49a-text-center { text-align: center; }
.s49a-flex { display: flex; }
.s49a-flex-center { display: flex; align-items: center; justify-content: center; }
.s49a-gap-1 { gap: 0.5rem; }
.s49a-gap-2 { gap: 1rem; }

/* RTP Display */
.s49a-rtp-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(46, 160, 67, 0.2);
    color: var(--s49a-success);
    border-radius: var(--s49a-radius);
    font-size: 1.2rem;
    font-weight: 600;
}

/* FAQ Accordion */
.s49a-faq-item {
    border-bottom: 1px solid var(--s49a-border);
}

.s49a-faq-question {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    color: var(--s49a-text-light);
    font-size: 1.4rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s49a-faq-answer {
    padding: 0 0 1rem 0;
    color: var(--s49a-text);
    font-size: 1.3rem;
    line-height: 1.6;
}

/* Responsive Adjustments */
@media (max-width: 380px) {
    .s49a-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .s49a-game-icon {
        width: 56px;
        height: 56px;
    }
}

@media (min-width: 769px) {
    .s49a-container {
        max-width: 430px;
    }

    .s49a-header,
    .s49a-bottom-nav {
        max-width: 430px;
    }
}
