/**
 * SG7 Casino - Main Stylesheet
 * All classes use g169- prefix for namespace isolation
 * Mobile-first responsive design
 * @version 1.0.0
 */

/* CSS Variables */
:root {
    --g169-primary: #CD853F;
    --g169-secondary: #708090;
    --g169-accent: #F5DEB3;
    --g169-bg-dark: #3A3A3A;
    --g169-bg-darker: #5D5D5D;
    --g169-text-light: #E0E0E0;
    --g169-text-muted: #708090;
    --g169-border-radius: 8px;
    --g169-transition: all 0.3s ease;
    --g169-header-height: 60px;
    --g169-bottom-nav-height: 60px;
    --g169-z-header: 1000;
    --g169-z-bottom-nav: 1000;
    --g169-z-menu: 9999;
}

/* Reset & Base */
* {
    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.4rem;
    line-height: 1.5;
    color: var(--g169-text-light);
    background-color: var(--g169-bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--g169-primary);
    text-decoration: none;
    transition: var(--g169-transition);
}

a:hover {
    color: var(--g169-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.g169-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

/* Header */
.g169-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--g169-header-height);
    background: linear-gradient(135deg, var(--g169-bg-darker) 0%, var(--g169-bg-dark) 100%);
    border-bottom: 1px solid var(--g169-primary);
    z-index: var(--g169-z-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
}

.g169-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.g169-logo img {
    width: 32px;
    height: 32px;
}

.g169-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--g169-primary);
}

.g169-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.g169-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--g169-border-radius);
    border: none;
    cursor: pointer;
    transition: var(--g169-transition);
    min-height: 36px;
    min-width: 44px;
}

.g169-btn-primary {
    background: linear-gradient(135deg, var(--g169-primary) 0%, #DAA520 100%);
    color: var(--g169-bg-dark);
}

.g169-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(205, 133, 63, 0.4);
}

.g169-btn-outline {
    background: transparent;
    color: var(--g169-primary);
    border: 2px solid var(--g169-primary);
}

.g169-btn-outline:hover {
    background: var(--g169-primary);
    color: var(--g169-bg-dark);
}

.g169-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.g169-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--g169-primary);
    transition: var(--g169-transition);
}

/* Mobile Menu */
.g169-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--g169-bg-darker);
    z-index: var(--g169-z-menu);
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.g169-menu-active {
    right: 0;
}

.g169-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: calc(var(--g169-z-menu) - 1);
    opacity: 0;
    visibility: hidden;
    transition: var(--g169-transition);
}

.g169-overlay-active {
    opacity: 1;
    visibility: visible;
}

.g169-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--g169-primary);
}

.g169-menu-close {
    background: transparent;
    border: none;
    color: var(--g169-text-light);
    font-size: 2.4rem;
    cursor: pointer;
}

.g169-nav-list {
    list-style: none;
}

.g169-nav-item {
    margin-bottom: 0.5rem;
}

.g169-nav-link {
    display: block;
    padding: 1rem;
    color: var(--g169-text-light);
    border-radius: var(--g169-border-radius);
    transition: var(--g169-transition);
}

.g169-nav-link:hover {
    background: var(--g169-primary);
    color: var(--g169-bg-dark);
}

/* Main Content */
main {
    padding-top: calc(var(--g169-header-height) + 1rem);
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    main {
        padding-bottom: calc(var(--g169-bottom-nav-height) + 2rem);
    }
}

/* Carousel */
.g169-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--g169-border-radius);
    margin-bottom: 1.5rem;
}

.g169-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.g169-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: relative;
}

.g169-slide-active {
    opacity: 1;
}

.g169-slide img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

.g169-slide-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}

.g169-slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--g169-transition);
}

.g169-dot-active {
    background: var(--g169-primary);
}

/* Section Styles */
.g169-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--g169-bg-darker);
    border-radius: var(--g169-border-radius);
    border: 1px solid rgba(205, 133, 63, 0.2);
}

.g169-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--g169-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--g169-primary);
}

/* Game Grid */
.g169-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.g169-game-item {
    text-align: center;
    cursor: pointer;
    transition: var(--g169-transition);
    padding: 0.5rem;
    border-radius: var(--g169-border-radius);
}

.g169-game-item:hover {
    background: rgba(205, 133, 63, 0.1);
    transform: translateY(-2px);
}

.g169-game-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.g169-game-name {
    font-size: 1rem;
    color: var(--g169-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category Tabs */
.g169-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--g169-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Features */
.g169-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.g169-feature-card {
    background: var(--g169-bg-dark);
    padding: 1.2rem;
    border-radius: var(--g169-border-radius);
    text-align: center;
    border: 1px solid rgba(205, 133, 63, 0.3);
}

.g169-feature-icon {
    font-size: 2.4rem;
    color: var(--g169-primary);
    margin-bottom: 0.5rem;
}

.g169-feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--g169-text-light);
    margin-bottom: 0.3rem;
}

.g169-feature-text {
    font-size: 1rem;
    color: var(--g169-text-muted);
}

/* CTA Buttons */
.g169-cta-section {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--g169-bg-darker) 0%, var(--g169-bg-dark) 100%);
    border-radius: var(--g169-border-radius);
    margin: 1.5rem 0;
}

.g169-cta-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--g169-primary);
    margin-bottom: 1rem;
}

.g169-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.g169-cta-btn {
    padding: 1rem 2rem;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Testimonials */
.g169-testimonials {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.g169-testimonial {
    background: var(--g169-bg-dark);
    padding: 1.2rem;
    border-radius: var(--g169-border-radius);
    border-left: 3px solid var(--g169-primary);
}

.g169-testimonial-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    color: var(--g169-text-light);
}

.g169-testimonial-author {
    font-size: 1.1rem;
    color: var(--g169-primary);
    font-weight: 600;
}

/* Payment Methods */
.g169-payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.g169-payment-item {
    background: var(--g169-bg-dark);
    padding: 1rem;
    border-radius: var(--g169-border-radius);
    text-align: center;
    border: 1px solid rgba(205, 133, 63, 0.2);
}

.g169-payment-icon {
    font-size: 2rem;
    color: var(--g169-primary);
    margin-bottom: 0.3rem;
}

/* Winners Showcase */
.g169-winners-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.g169-winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: var(--g169-bg-dark);
    border-radius: var(--g169-border-radius);
}

.g169-winner-game {
    font-weight: 600;
    color: var(--g169-text-light);
}

.g169-winner-amount {
    color: var(--g169-primary);
    font-weight: 700;
}

/* Footer */
.g169-footer {
    background: var(--g169-bg-darker);
    padding: 2rem 1.2rem;
    border-top: 1px solid var(--g169-primary);
}

.g169-footer-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.g169-footer-brand p {
    color: var(--g169-text-muted);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.g169-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.g169-footer-link {
    padding: 0.5rem 1rem;
    background: var(--g169-bg-dark);
    border-radius: var(--g169-border-radius);
    font-size: 1.1rem;
    color: var(--g169-text-light);
}

.g169-footer-link:hover {
    background: var(--g169-primary);
    color: var(--g169-bg-dark);
}

.g169-footer-promo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.g169-footer-promo .g169-btn {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

.g169-copyright {
    text-align: center;
    color: var(--g169-text-muted);
    font-size: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(205, 133, 63, 0.2);
}

/* Bottom Navigation */
.g169-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--g169-bottom-nav-height);
    background: linear-gradient(180deg, var(--g169-bg-darker) 0%, var(--g169-bg-dark) 100%);
    border-top: 2px solid var(--g169-primary);
    z-index: var(--g169-z-bottom-nav);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
}

@media (min-width: 769px) {
    .g169-bottom-nav {
        display: none;
    }
}

.g169-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--g169-text-muted);
    cursor: pointer;
    transition: var(--g169-transition);
    border-radius: 8px;
}

.g169-nav-btn:hover,
.g169-nav-btn-active {
    color: var(--g169-primary);
    background: rgba(205, 133, 63, 0.1);
}

.g169-nav-btn:hover {
    transform: scale(1.1);
}

.g169-nav-btn-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.g169-nav-btn-text {
    font-size: 10px;
    font-weight: 500;
}

/* Utility Classes */
.g169-text-center { text-align: center; }
.g169-text-primary { color: var(--g169-primary); }
.g169-text-accent { color: var(--g169-accent); }
.g169-mb-1 { margin-bottom: 1rem; }
.g169-mb-2 { margin-bottom: 2rem; }
.g169-mt-1 { margin-top: 1rem; }
.g169-mt-2 { margin-top: 2rem; }

/* Responsive Adjustments */
@media (max-width: 360px) {
    .g169-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .g169-features {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .g169-container {
        max-width: 430px;
    }

    .g169-menu-toggle {
        display: none;
    }
}
