/**
 * SBS CHESS - Global Theme & Platform Styling
 * Brand: SBS TECHNOLOGIES
 * Website: https://sbstechnologies.in
 * Tagline: Play. Compete. Improve.
 */

:root {
    --sbs-bg-dark: #0f1218;
    --sbs-bg-card: #181c25;
    --sbs-bg-card-hover: #212734;
    --sbs-accent: #f39c12;
    --sbs-accent-hover: #e67e22;
    --sbs-success: #2ed573;
    --sbs-danger: #ff4757;
    --sbs-info: #1e90ff;
    --sbs-text-main: #f1f2f6;
    --sbs-text-muted: #8b9bb4;
    --sbs-border: rgba(255, 255, 255, 0.08);
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--sbs-bg-dark);
    color: var(--sbs-text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-sbs {
    background-color: #131720 !important;
    border-bottom: 1px solid var(--sbs-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.navbar-brand-sbs {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #111;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.nav-link {
    color: var(--sbs-text-muted) !important;
    font-weight: 500;
    transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff !important;
}

/* Cards */
.card-sbs {
    background-color: var(--sbs-bg-card);
    border: 1px solid var(--sbs-border);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card-sbs.card-hover:hover {
    border-color: rgba(243, 156, 18, 0.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

/* Buttons */
.btn-sbs-primary {
    background: linear-gradient(135deg, #f39c12, #d35400);
    border: none;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(243, 156, 18, 0.35);
    transition: all 0.2s ease;
}

.btn-sbs-primary:hover {
    background: linear-gradient(135deg, #e67e22, #c0392b);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(243, 156, 18, 0.5);
    transform: translateY(-1px);
}

.btn-sbs-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--sbs-text-main);
}

.btn-sbs-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Hero Section */
.hero-banner {
    background: radial-gradient(circle at 50% 30%, #1f2737 0%, #0f1218 80%);
    padding: 4.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--sbs-border);
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 40%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--sbs-text-muted);
    max-width: 650px;
    margin: 0 auto 2rem;
}

/* Tables */
.table-sbs {
    --bs-table-bg: transparent;
    --bs-table-color: var(--sbs-text-main);
    border-color: var(--sbs-border);
}

.table-sbs th {
    font-weight: 600;
    color: var(--sbs-text-muted);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    border-bottom: 2px solid var(--sbs-border);
    padding: 0.85rem 0.75rem;
}

.table-sbs td {
    padding: 0.95rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--sbs-border);
}

.table-sbs tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Modals */
.modal-content-sbs {
    background-color: var(--sbs-bg-card);
    border: 1px solid var(--sbs-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    color: var(--sbs-text-main);
}

.modal-header-sbs {
    border-bottom: 1px solid var(--sbs-border);
    padding: 1.2rem 1.5rem;
}

.modal-footer-sbs {
    border-top: 1px solid var(--sbs-border);
    padding: 1rem 1.5rem;
}

/* Inputs & Forms */
.form-control-sbs, .form-select-sbs {
    background-color: #12151c;
    border: 1px solid var(--sbs-border);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.65rem 1rem;
}

.form-control-sbs:focus, .form-select-sbs:focus {
    background-color: #141822;
    border-color: var(--sbs-accent);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.25);
}

/* Avatar circle */
.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #232936;
}

.user-avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #232936;
}

.user-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.15);
    background: #232936;
}

/* Status Indicator Dot */
.status-indicator {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-online {
    background-color: var(--sbs-success);
    box-shadow: 0 0 6px rgba(46, 213, 115, 0.6);
}

.status-offline {
    background-color: #747d8c;
}

.status-in_game {
    background-color: var(--sbs-accent);
    box-shadow: 0 0 6px rgba(243, 156, 18, 0.6);
}

/* Footer */
.footer-sbs {
    background-color: #0b0d12;
    border-top: 1px solid var(--sbs-border);
    padding: 2.5rem 0 1.5rem;
    color: var(--sbs-text-muted);
    font-size: 0.9rem;
}

.footer-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-link {
    color: var(--sbs-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--sbs-accent);
}

/* Stats Counter Badge */
.stat-box {
    padding: 1.25rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--sbs-border);
    text-align: center;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--sbs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* SBS Money Wallet Card */
.wallet-card {
    background: linear-gradient(135deg, #1e2638 0%, #11151f 100%);
    border: 1px solid rgba(243, 156, 18, 0.35);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.wallet-card::before {
    content: "♔";
    position: absolute;
    right: -20px;
    bottom: -40px;
    font-size: 160px;
    opacity: 0.04;
    color: #f39c12;
    pointer-events: none;
    line-height: 1;
}

.wallet-chip {
    width: 44px;
    height: 32px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    border-radius: 6px;
    display: inline-block;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.3);
}

.qr-code-box {
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.plan-card {
    background-color: var(--sbs-bg-card);
    border: 1px solid var(--sbs-border);
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.plan-card.popular {
    border: 2px solid #f39c12;
    background: linear-gradient(180deg, rgba(243, 156, 18, 0.08) 0%, #181c25 35%);
}

.plan-card.elite {
    border: 2px solid #e74c3c;
    background: linear-gradient(180deg, rgba(231, 76, 60, 0.08) 0%, #181c25 35%);
}

.upi-chip {
    background: rgba(46, 213, 115, 0.15);
    border: 1px solid rgba(46, 213, 115, 0.35);
    color: #2ed573;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ----------------------------------------------------
 * Mobile Device UI & Responsiveness Optimizations
 * ---------------------------------------------------- */

/* Tap and Touch Performance */
button, a, .nav-link, .btn, .dropdown-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent auto-zoom on iOS when tapping inputs */
@media (max-width: 768px) {
    .form-control, .form-select, .form-control-sm, .form-select-sm, .form-control-sbs, .form-select-sbs {
        font-size: 16px !important;
    }
}

/* Table scroll smoothness */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* Responsive navbar dropdown on mobile */
@media (max-width: 991px) {
    .navbar-sbs .navbar-collapse {
        padding: 0.75rem 0 1rem;
    }
    .navbar-sbs .nav-link {
        padding: 0.65rem 0.5rem;
    }
    .dropdown-menu-dark {
        background-color: #161a22;
        border-color: var(--sbs-border);
    }
}

/* Mobile Screens (< 576px) */
@media (max-width: 576px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .card-sbs {
        padding: 1.25rem !important;
        border-radius: 12px;
    }

    .hero-banner {
        padding: 2.75rem 1rem 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .stat-box {
        padding: 0.85rem 0.5rem;
    }

    .stat-value {
        font-size: 1.45rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .wallet-card {
        padding: 1.25rem !important;
    }

    .wallet-card::before {
        font-size: 120px;
        right: -10px;
        bottom: -20px;
    }

    .table-sbs th {
        font-size: 0.72rem;
        padding: 0.65rem 0.5rem;
    }

    .table-sbs td {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }

    /* Modal responsiveness */
    .modal-content-sbs {
        padding: 1.25rem !important;
        border-radius: 12px;
    }

    .modal-header-sbs {
        padding: 1rem 1.25rem;
    }

    .modal-footer-sbs {
        padding: 0.85rem 1.25rem;
    }

    /* Floating Toast Alerts centered & full-width on mobile */
    #sbs-toast-container {
        left: 0.75rem !important;
        right: 0.75rem !important;
        bottom: 0.75rem !important;
        padding: 0 !important;
    }

    #sbs-toast-container .toast {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Extra small devices (<= 360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.85rem;
    }
    .hero-subtitle {
        font-size: 0.88rem;
    }
    .btn-sbs-primary, .btn-sbs-outline {
        font-size: 0.9rem;
    }
}


