/**
 * JLBOSS Log In - Main Stylesheet
 * All classes use sabf- prefix for namespace isolation
 * Mobile-first responsive design
 */

/* CSS Variables */
:root {
    --sabf-primary: #8470FF;
    --sabf-secondary: #20B2AA;
    --sabf-dark: #2D2D2D;
    --sabf-light: #E6E6FA;
    --sabf-accent: #8FBC8F;
    --sabf-white: #FFFFFF;
    --sabf-black: #1A1A1A;
    --sabf-gray: #6B7280;
    --sabf-border: rgba(132, 112, 255, 0.2);
    --sabf-shadow: 0 4px 20px rgba(132, 112, 255, 0.15);
    --sabf-gradient: linear-gradient(135deg, #8470FF 0%, #20B2AA 100%);
    --sabf-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --sabf-radius: 12px;
    --sabf-radius-sm: 8px;
    --sabf-transition: all 0.3s ease;
}

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sabf-font);
    background: linear-gradient(180deg, #1A1A2E 0%, #16213E 50%, #0F0F23 100%);
    color: var(--sabf-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container and Layout */
.sabf-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px;
}

.sabf-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sabf-main {
    flex: 1;
    padding-top: 64px;
    padding-bottom: 80px;
}

@media (min-width: 769px) {
    .sabf-main {
        padding-bottom: 20px;
    }
}

/* Header Styles */
.sabf-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(22, 33, 62, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sabf-border);
    transition: var(--sabf-transition);
}

.sabf-header-scrolled {
    box-shadow: var(--sabf-shadow);
}

.sabf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 16px;
    max-width: 430px;
    margin: 0 auto;
}

.sabf-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--sabf-light);
}

.sabf-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.sabf-logo-text {
    font-size: 16px;
    font-weight: 700;
    background: var(--sabf-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sabf-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sabf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--sabf-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--sabf-transition);
    text-decoration: none;
    min-height: 44px;
    min-width: 44px;
}

.sabf-btn-primary {
    background: var(--sabf-gradient);
    color: var(--sabf-white);
    box-shadow: 0 4px 15px rgba(132, 112, 255, 0.4);
}

.sabf-btn-primary:hover, .sabf-btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(132, 112, 255, 0.5);
}

.sabf-btn-outline {
    background: transparent;
    color: var(--sabf-primary);
    border: 2px solid var(--sabf-primary);
}

.sabf-btn-outline:hover, .sabf-btn-outline:active {
    background: var(--sabf-primary);
    color: var(--sabf-white);
}

.sabf-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--sabf-light);
    font-size: 24px;
    cursor: pointer;
    border-radius: var(--sabf-radius-sm);
    transition: var(--sabf-transition);
}

.sabf-menu-btn:hover {
    background: rgba(132, 112, 255, 0.1);
}

/* Mobile Menu */
.sabf-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--sabf-transition);
}

.sabf-overlay-visible {
    opacity: 1;
    visibility: visible;
}

.sabf-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1A1A2E 0%, #16213E 100%);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid var(--sabf-border);
}

.sabf-menu-open {
    right: 0;
}

.sabf-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--sabf-border);
}

.sabf-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--sabf-light);
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--sabf-transition);
}

.sabf-menu-close:hover {
    background: rgba(132, 112, 255, 0.1);
}

.sabf-menu-nav {
    padding: 16px;
}

.sabf-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--sabf-light);
    text-decoration: none;
    border-radius: var(--sabf-radius-sm);
    transition: var(--sabf-transition);
    font-size: 15px;
    margin-bottom: 4px;
}

.sabf-menu-link:hover, .sabf-nav-active {
    background: rgba(132, 112, 255, 0.15);
    color: var(--sabf-primary);
}

.sabf-menu-link i {
    width: 24px;
    font-size: 18px;
    text-align: center;
}

/* Carousel Styles */
.sabf-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--sabf-radius);
    margin-bottom: 24px;
}

.sabf-carousel-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.sabf-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sabf-slide-active {
    opacity: 1;
}

.sabf-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.sabf-carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.sabf-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: var(--sabf-transition);
}

.sabf-indicator-active {
    background: var(--sabf-primary);
    width: 24px;
    border-radius: 4px;
}

/* Section Styles */
.sabf-section {
    margin-bottom: 32px;
}

.sabf-section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--sabf-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sabf-section-title i {
    color: var(--sabf-primary);
}

/* Game Tabs */
.sabf-game-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.sabf-game-tabs::-webkit-scrollbar {
    display: none;
}

.sabf-game-tab {
    flex-shrink: 0;
    padding: 10px 18px;
    background: rgba(132, 112, 255, 0.1);
    border: 1px solid var(--sabf-border);
    border-radius: 20px;
    color: var(--sabf-light);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sabf-transition);
    white-space: nowrap;
}

.sabf-tab-active, .sabf-game-tab:hover {
    background: var(--sabf-gradient);
    border-color: transparent;
    color: var(--sabf-white);
}

/* Game Grid */
.sabf-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.sabf-game-card {
    background: rgba(132, 112, 255, 0.08);
    border-radius: var(--sabf-radius-sm);
    overflow: hidden;
    transition: var(--sabf-transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.sabf-game-card:hover, .sabf-game-card:active {
    transform: translateY(-4px);
    border-color: var(--sabf-primary);
    box-shadow: 0 8px 25px rgba(132, 112, 255, 0.3);
}

.sabf-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.sabf-game-name {
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    color: var(--sabf-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sabf-game-category {
    display: none;
}

.sabf-category-visible {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Content Cards */
.sabf-card {
    background: rgba(132, 112, 255, 0.08);
    border: 1px solid var(--sabf-border);
    border-radius: var(--sabf-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.sabf-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--sabf-light);
}

.sabf-card p {
    color: rgba(230, 230, 250, 0.8);
    margin-bottom: 12px;
    font-size: 14px;
}

.sabf-card ul {
    list-style: none;
    margin-bottom: 12px;
}

.sabf-card li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: rgba(230, 230, 250, 0.8);
    font-size: 14px;
}

.sabf-card li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--sabf-secondary);
}

/* Accordion Styles */
.sabf-accordion-item {
    background: rgba(132, 112, 255, 0.08);
    border: 1px solid var(--sabf-border);
    border-radius: var(--sabf-radius-sm);
    margin-bottom: 10px;
    overflow: hidden;
}

.sabf-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    transition: var(--sabf-transition);
}

.sabf-accordion-header:hover {
    background: rgba(132, 112, 255, 0.1);
}

.sabf-accordion-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sabf-light);
    flex: 1;
    padding-right: 12px;
}

.sabf-accordion-icon {
    color: var(--sabf-primary);
    transition: transform 0.3s ease;
}

.sabf-accordion-open .sabf-accordion-icon {
    transform: rotate(180deg);
}

.sabf-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sabf-accordion-open .sabf-accordion-content {
    max-height: 500px;
}

.sabf-accordion-body {
    padding: 0 16px 16px;
    color: rgba(230, 230, 250, 0.8);
    font-size: 14px;
    line-height: 1.7;
}

/* Footer Styles */
.sabf-footer {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 15, 35, 1) 100%);
    border-top: 1px solid var(--sabf-border);
    padding: 32px 16px 100px;
}

@media (min-width: 769px) {
    .sabf-footer {
        padding-bottom: 32px;
    }
}

.sabf-footer-inner {
    max-width: 430px;
    margin: 0 auto;
}

.sabf-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.sabf-footer-link {
    color: rgba(230, 230, 250, 0.7);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 0;
    transition: var(--sabf-transition);
}

.sabf-footer-link:hover {
    color: var(--sabf-primary);
}

.sabf-partners {
    margin-bottom: 24px;
}

.sabf-partners-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--sabf-light);
}

.sabf-partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sabf-partner-logo {
    width: 50px;
    height: 30px;
    object-fit: contain;
    opacity: 0.7;
    transition: var(--sabf-transition);
}

.sabf-partner-logo:hover {
    opacity: 1;
}

.sabf-copyright {
    text-align: center;
    font-size: 12px;
    color: rgba(230, 230, 250, 0.5);
    padding-top: 16px;
    border-top: 1px solid var(--sabf-border);
}

/* Bottom Navigation */
.sabf-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 15, 35, 1) 100%);
    border-top: 1px solid var(--sabf-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 769px) {
    .sabf-bottom-nav {
        display: none;
    }
}

.sabf-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    max-width: 430px;
    margin: 0 auto;
}

.sabf-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 8px 12px;
    color: rgba(230, 230, 250, 0.6);
    text-decoration: none;
    border-radius: var(--sabf-radius-sm);
    transition: var(--sabf-transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: none;
}

.sabf-bottom-nav-item:hover, .sabf-bottom-nav-active {
    color: var(--sabf-primary);
    background: rgba(132, 112, 255, 0.1);
}

.sabf-bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.sabf-bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.sabf-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(132, 112, 255, 0.3);
    transform: scale(0);
    animation: sabf-ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes sabf-ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Utility Classes */
.sabf-text-center { text-align: center; }
.sabf-text-primary { color: var(--sabf-primary); }
.sabf-text-secondary { color: var(--sabf-secondary); }
.sabf-text-accent { color: var(--sabf-accent); }
.sabf-mb-8 { margin-bottom: 8px; }
.sabf-mb-16 { margin-bottom: 16px; }
.sabf-mb-24 { margin-bottom: 24px; }
.sabf-mt-16 { margin-top: 16px; }

.sabf-highlight {
    color: var(--sabf-primary);
    font-weight: 600;
}

.sabf-cta-box {
    background: var(--sabf-gradient);
    border-radius: var(--sabf-radius);
    padding: 24px;
    text-align: center;
    margin: 24px 0;
}

.sabf-cta-box h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--sabf-white);
}

.sabf-cta-box p {
    font-size: 14px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.sabf-btn-white {
    background: var(--sabf-white);
    color: var(--sabf-primary);
    font-weight: 700;
}

.sabf-btn-white:hover {
    background: var(--sabf-light);
    transform: translateY(-2px);
}

/* Step List */
.sabf-steps {
    counter-reset: step-counter;
}

.sabf-step {
    position: relative;
    padding-left: 50px;
    margin-bottom: 20px;
}

.sabf-step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    background: var(--sabf-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--sabf-white);
}

.sabf-step-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--sabf-light);
}

.sabf-step-desc {
    font-size: 13px;
    color: rgba(230, 230, 250, 0.7);
    line-height: 1.6;
}

/* Link Styles */
.sabf-link {
    color: var(--sabf-primary);
    text-decoration: none;
    transition: var(--sabf-transition);
}

.sabf-link:hover {
    color: var(--sabf-secondary);
    text-decoration: underline;
}

/* Breadcrumb */
.sabf-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    color: rgba(230, 230, 250, 0.6);
}

.sabf-breadcrumb a {
    color: var(--sabf-primary);
    text-decoration: none;
}

.sabf-breadcrumb a:hover {
    text-decoration: underline;
}

/* H1 Title Styles */
.sabf-page-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--sabf-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.sabf-page-subtitle {
    font-size: 14px;
    color: rgba(230, 230, 250, 0.7);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Icon Adjustments for Mixed Libraries */
.material-icons {
    font-size: 22px;
    vertical-align: middle;
}

ion-icon {
    font-size: 22px;
    vertical-align: middle;
}
