/* JollyPH CSS Styles with unique visual theme */
/* All classes use prefix sf33- to avoid conflicts */

:root {
    /* Unique color palette for jollyph-sbs */
    --sf33-primary: #CD853F;        /* Peru - Warm golden */
    --sf33-secondary: #8A2BE2;      /* Blue Violet - Rich purple */
    --sf33-dark: #273746;           /* Dark blue-gray */
    --sf33-accent: #9966CC;         /* Amethyst - Light purple */
    --sf33-highlight: #DDA0DD;      /* Plum - Soft pink */
    --sf33-bg-dark: #1A1A2E;        /* Deep dark blue */
    --sf33-bg-light: #16213E;       /* Medium dark blue */
    --sf33-text-light: #F5F5F5;     /* Light gray */
    --sf33-text-muted: #BDBDBD;     /* Muted gray */
    --sf33-success: #4CAF50;        /* Success green */
    --sf33-warning: #FF9800;        /* Warning orange */
    --sf33-danger: #F44336;         /* Danger red */

    /* Spacing and sizing */
    --sf33-header-height: 60px;
    --sf33-bottom-nav-height: 64px;
    --sf33-border-radius: 12px;
    --sf33-card-radius: 16px;

    /* Typography */
    --sf33-font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sf33-font-mono: 'Roboto Mono', monospace;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--sf33-font-primary);
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--sf33-text-light);
    background: linear-gradient(135deg, var(--sf33-bg-dark) 0%, var(--sf33-bg-light) 100%);
    min-height: 100vh;
    max-width: 430px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* Container and layout */
.sf33-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sf33-wrapper {
    min-height: 100vh;
    padding-bottom: calc(var(--sf33-bottom-nav-height) + 2rem);
}

.sf33-grid {
    display: grid;
    gap: 1.5rem;
}

/* Header styles */
.sf33-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--sf33-header-height);
    background: linear-gradient(90deg, var(--sf33-dark) 0%, var(--sf33-secondary) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.sf33-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sf33-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sf33-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.2rem;
}

.sf33-site-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sf33-text-light);
    text-decoration: none;
}

.sf33-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sf33-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: var(--sf33-border-radius);
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    touch-action: manipulation;
}

.sf33-btn-primary {
    background: linear-gradient(135deg, var(--sf33-primary) 0%, var(--sf33-highlight) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(205, 133, 63, 0.4);
}

.sf33-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(205, 133, 63, 0.6);
}

.sf33-btn-secondary {
    background: transparent;
    color: var(--sf33-text-light);
    border: 2px solid var(--sf33-accent);
}

.sf33-btn-secondary:hover {
    background: var(--sf33-accent);
    color: white;
    transform: translateY(-2px);
}

.sf33-menu-btn {
    background: none;
    border: none;
    color: var(--sf33-text-light);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sf33-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Mobile menu */
.sf33-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, var(--sf33-dark) 0%, var(--sf33-bg-light) 100%);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    padding: 2rem 0;
    overflow-y: auto;
}

.sf33-mobile-menu.active {
    transform: translateX(0);
}

.sf33-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 9998;
}

.sf33-menu-header {
    padding: 0 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.sf33-menu-nav {
    list-style: none;
}

.sf33-menu-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sf33-menu-nav a {
    display: block;
    padding: 1.2rem 2rem;
    color: var(--sf33-text-light);
    text-decoration: none;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.sf33-menu-nav a:hover {
    background: rgba(138, 43, 226, 0.2);
    color: var(--sf33-accent);
    padding-left: 2.5rem;
}

/* Main content */
.sf33-main {
    margin-top: var(--sf33-header-height);
    padding-top: 2rem;
}

/* Carousel styles */
.sf33-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--sf33-card-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sf33-carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    cursor: pointer;
}

.sf33-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf33-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.sf33-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sf33-carousel-indicator.active {
    background: var(--sf33-primary);
    transform: scale(1.2);
}

/* Card styles */
.sf33-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: var(--sf33-card-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.sf33-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--sf33-accent);
}

.sf33-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--sf33-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.sf33-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--sf33-primary) 0%, var(--sf33-secondary) 100%);
    border-radius: 2px;
}

/* Game grid */
.sf33-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.sf33-game-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sf33-game-item:hover {
    transform: scale(1.05);
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--sf33-accent);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
}

.sf33-game-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.8rem;
    border-radius: 8px;
    overflow: hidden;
}

.sf33-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf33-game-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--sf33-text-light);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Content sections */
.sf33-content-section {
    margin-bottom: 3rem;
}

.sf33-content-section h3 {
    font-size: 1.8rem;
    color: var(--sf33-accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.sf33-content-section p {
    color: var(--sf33-text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.sf33-content-section ul {
    list-style: none;
    padding-left: 0;
}

.sf33-content-section li {
    padding: 0.5rem 0;
    color: var(--sf33-text-muted);
    position: relative;
    padding-left: 2rem;
}

.sf33-content-section li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--sf33-primary);
    font-weight: bold;
}

/* Bottom navigation */
.sf33-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: var(--sf33-bottom-nav-height);
    background: linear-gradient(90deg, var(--sf33-dark) 0%, var(--sf33-bg-light) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.sf33-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    text-decoration: none;
    color: var(--sf33-text-muted);
}

.sf33-bottom-nav-item:hover,
.sf33-bottom-nav-item.active {
    color: var(--sf33-primary);
    background: rgba(205, 133, 63, 0.1);
    transform: translateY(-2px);
}

.sf33-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}

.sf33-bottom-nav-item:hover .sf33-bottom-nav-icon {
    transform: scale(1.1);
}

.sf33-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

/* Footer */
.sf33-footer {
    background: linear-gradient(135deg, var(--sf33-bg-dark) 0%, var(--sf33-dark) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.sf33-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sf33-partner-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sf33-partner-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

.sf33-partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.8) contrast(1.2);
}

.sf33-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sf33-footer-links a {
    color: var(--sf33-text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.sf33-footer-links a:hover {
    color: var(--sf33-primary);
}

.sf33-copyright {
    text-align: center;
    color: var(--sf33-text-muted);
    font-size: 1.1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .sf33-main {
        padding-bottom: calc(var(--sf33-bottom-nav-height) + 2rem);
    }

    .sf33-game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .sf33-carousel {
        height: 180px;
    }

    .sf33-section-title {
        font-size: 2rem;
    }
}

@media (min-width: 769px) {
    .sf33-bottom-nav {
        display: none;
    }

    .sf33-wrapper {
        padding-bottom: 2rem;
    }
}

/* Animations */
@keyframes sf33-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sf33-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sf33-fade-in {
    animation: sf33-fadeIn 0.6s ease-out;
}

.sf33-pulse {
    animation: sf33-pulse 2s infinite;
}

/* Utility classes */
.sf33-text-center {
    text-align: center;
}

.sf33-text-primary {
    color: var(--sf33-primary);
}

.sf33-text-secondary {
    color: var(--sf33-secondary);
}

.sf33-mb-1 { margin-bottom: 1rem; }
.sf33-mb-2 { margin-bottom: 2rem; }
.sf33-mb-3 { margin-bottom: 3rem; }

.sf33-mt-1 { margin-top: 1rem; }
.sf33-mt-2 { margin-top: 2rem; }
.sf33-mt-3 { margin-top: 3rem; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--sf33-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--sf33-accent);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sf33-secondary);
}