/**
 * Cardtime Casino - Main Stylesheet
 * All classes use s5cd- prefix for namespace isolation
 * Color palette: #0E1621 (dark) | #FFBF00 (gold) | #9370DB (purple)
 * @version 1.0.0
 */

/* CSS Variables */
:root {
    --s5cd-primary: #FFBF00;
    --s5cd-secondary: #9370DB;
    --s5cd-bg-dark: #0E1621;
    --s5cd-bg-light: #1a2433;
    --s5cd-text-light: #ffffff;
    --s5cd-text-muted: #a0aec0;
    --s5cd-border: #2d3748;
    --s5cd-success: #48bb78;
    --s5cd-danger: #f56565;
    --s5cd-gradient: linear-gradient(135deg, #FFBF00 0%, #9370DB 100%);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--s5cd-bg-dark);
    color: var(--s5cd-text-light);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
.s5cd-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.s5cd-wrapper {
    width: 100%;
    padding: 2rem 0;
}

/* Header Styles */
.s5cd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--s5cd-bg-dark) 0%, rgba(14, 22, 33, 0.95) 100%);
    border-bottom: 1px solid var(--s5cd-border);
    transition: all 0.3s ease;
}

.s5cd-header-scrolled {
    background: rgba(14, 22, 33, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.s5cd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 430px;
    margin: 0 auto;
}

.s5cd-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.s5cd-logo img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.s5cd-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--s5cd-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.s5cd-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.s5cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.4rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 36px;
}

.s5cd-btn-primary {
    background: var(--s5cd-gradient);
    color: var(--s5cd-bg-dark);
}

.s5cd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 191, 0, 0.4);
}

.s5cd-btn-secondary {
    background: transparent;
    color: var(--s5cd-primary);
    border: 1px solid var(--s5cd-primary);
}

.s5cd-btn-secondary:hover {
    background: rgba(255, 191, 0, 0.1);
}

.s5cd-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.s5cd-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--s5cd-primary);
    transition: all 0.3s ease;
}

.s5cd-toggle-active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.s5cd-toggle-active span:nth-child(2) {
    opacity: 0;
}

.s5cd-toggle-active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Menu */
.s5cd-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--s5cd-bg-light);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 8rem 2rem 2rem;
}

.s5cd-menu-active {
    right: 0;
}

.s5cd-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;
}

.s5cd-overlay-active {
    opacity: 1;
    visibility: visible;
}

.s5cd-nav-list {
    list-style: none;
}

.s5cd-nav-item {
    margin-bottom: 0.5rem;
}

.s5cd-nav-link {
    display: block;
    padding: 1.2rem 1rem;
    font-size: 1.4rem;
    color: var(--s5cd-text-light);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.s5cd-nav-link:hover {
    background: rgba(255, 191, 0, 0.1);
    color: var(--s5cd-primary);
}

.s5cd-nav-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--s5cd-border);
}

.s5cd-nav-section-title {
    font-size: 1.2rem;
    color: var(--s5cd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

/* Main Content */
.s5cd-main {
    padding-top: 70px;
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .s5cd-main {
        padding-bottom: 90px;
    }
}

/* Slider/Carousel */
.s5cd-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.s5cd-slides {
    position: relative;
    height: 200px;
}

.s5cd-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.s5cd-slide-active {
    opacity: 1;
}

.s5cd-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.s5cd-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.s5cd-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.s5cd-dot-active {
    background: var(--s5cd-primary);
    width: 20px;
    border-radius: 4px;
}

/* Section Titles */
.s5cd-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--s5cd-text-light);
}

.s5cd-section-title span {
    background: var(--s5cd-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Game Grid */
.s5cd-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.s5cd-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.s5cd-game-item:hover {
    transform: scale(1.05);
}

.s5cd-game-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid var(--s5cd-border);
    transition: border-color 0.3s ease;
}

.s5cd-game-item:hover .s5cd-game-icon {
    border-color: var(--s5cd-primary);
}

.s5cd-game-name {
    font-size: 1rem;
    color: var(--s5cd-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
    margin: 0 auto;
}

/* Category Section */
.s5cd-category {
    margin-bottom: 2.5rem;
}

.s5cd-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.s5cd-category-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--s5cd-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.s5cd-category-title i {
    font-size: 1.8rem;
}

/* Content Sections */
.s5cd-content-section {
    background: var(--s5cd-bg-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--s5cd-border);
}

.s5cd-content-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--s5cd-primary);
}

.s5cd-content-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--s5cd-text-muted);
    margin-bottom: 1rem;
}

.s5cd-content-text:last-child {
    margin-bottom: 0;
}

.s5cd-highlight {
    color: var(--s5cd-primary);
    font-weight: 600;
}

/* Features List */
.s5cd-features-list {
    list-style: none;
    padding: 0;
}

.s5cd-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 1rem;
    background: rgba(255, 191, 0, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--s5cd-primary);
}

.s5cd-feature-icon {
    font-size: 2rem;
    color: var(--s5cd-primary);
}

.s5cd-feature-content h4 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: var(--s5cd-text-light);
}

.s5cd-feature-content p {
    font-size: 1.2rem;
    color: var(--s5cd-text-muted);
}

/* FAQ Section */
.s5cd-faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--s5cd-border);
    border-radius: 8px;
    overflow: hidden;
}

.s5cd-faq-question {
    padding: 1.2rem;
    background: var(--s5cd-bg-light);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--s5cd-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.s5cd-faq-question i {
    color: var(--s5cd-primary);
}

.s5cd-faq-answer {
    padding: 1rem 1.2rem;
    font-size: 1.2rem;
    color: var(--s5cd-text-muted);
    line-height: 1.6;
    background: rgba(147, 112, 219, 0.05);
}

/* Footer */
.s5cd-footer {
    background: var(--s5cd-bg-light);
    border-top: 1px solid var(--s5cd-border);
    padding: 2rem 1.5rem 3rem;
}

.s5cd-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.s5cd-footer-link {
    font-size: 1.2rem;
    color: var(--s5cd-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.s5cd-footer-link:hover {
    color: var(--s5cd-primary);
}

.s5cd-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.s5cd-partner-logo {
    height: 24px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.s5cd-partner-logo:hover {
    opacity: 1;
}

.s5cd-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: var(--s5cd-text-muted);
}

/* Mobile Bottom Navigation */
.s5cd-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, var(--s5cd-bg-light) 0%, var(--s5cd-bg-dark) 100%);
    border-top: 1px solid var(--s5cd-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.5rem;
}

@media (min-width: 769px) {
    .s5cd-bottom-nav {
        display: none;
    }
}

.s5cd-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(--s5cd-text-muted);
    transition: all 0.3s ease;
    text-decoration: none;
}

.s5cd-nav-btn:hover,
.s5cd-nav-btn-active {
    color: var(--s5cd-primary);
    transform: scale(1.1);
}

.s5cd-nav-btn i {
    font-size: 22px;
    margin-bottom: 2px;
}

.s5cd-nav-btn span {
    font-size: 10px;
    font-weight: 500;
}

/* Promo Links */
.s5cd-promo-text {
    color: var(--s5cd-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.s5cd-promo-text:hover {
    text-decoration: underline;
}

.s5cd-promo-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--s5cd-gradient);
    color: var(--s5cd-bg-dark);
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.s5cd-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 191, 0, 0.4);
}

/* Utilities */
.s5cd-text-center { text-align: center; }
.s5cd-mb-1 { margin-bottom: 1rem; }
.s5cd-mb-2 { margin-bottom: 2rem; }
.s5cd-mb-3 { margin-bottom: 3rem; }
.s5cd-mt-2 { margin-top: 2rem; }
.s5cd-hidden { display: none; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.s5cd-animate {
    animation: fadeIn 0.5s ease forwards;
}
