/* ================================================================
   J-SAM BET — Site Header Styles
   ================================================================ */

:root {
    --jh-bg:       #0f111e;
    --jh-surface:  #161929;
    --jh-border:   #252840;
    --jh-green:    #00c853;
    --jh-gold:     #f5c518;
    --jh-purple:   #6d28d9;
    --jh-red:      #ef4444;
    --jh-text:     #f0f2ff;
    --jh-text-dim: #8891a5;
    --jh-height:   62px;
}

/* ----------------------------------------------------------------
   FIXED HEADER BAR
   ---------------------------------------------------------------- */
#jsam-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999990;
    background: var(--jh-bg);
    border-bottom: 2px solid var(--jh-purple);
    height: var(--jh-height);
    box-shadow: 0 2px 20px rgba(0,0,0,0.6);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.jsam-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

/* ----------------------------------------------------------------
   LOGO
   ---------------------------------------------------------------- */
.jsam-logo {
    display: flex;
    align-items: baseline;
    gap: 4px;
    text-decoration: none !important;
    flex-shrink: 0;
}

.jsam-logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}

.jsam-logo-accent { color: var(--jh-gold); }

.jsam-logo-sub {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--jh-green);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid var(--jh-green);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 2px;
    line-height: 1.5;
}

/* ----------------------------------------------------------------
   MAIN NAV
   ---------------------------------------------------------------- */
.jsam-header-left {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
    min-width: 0;
}

.jsam-main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.jsam-nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--jh-text-dim) !important;
    text-decoration: none !important;
    transition: all 0.2s;
    white-space: nowrap;
}

.jsam-nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--jh-text) !important;
}

.jsam-nav-link.active {
    background: rgba(109, 40, 217, 0.2);
    color: var(--jh-gold) !important;
    border-bottom: 2px solid var(--jh-gold);
    border-radius: 7px 7px 0 0;
}

.jsam-nav-icon { font-size: 14px; }
.jsam-hdr-icon { display: inline-flex; align-items: center; justify-content: center; color: currentColor; vertical-align: -3px; }
.jsam-hdr-icon svg { width: 15px; height: 15px; display: block; }

/* ----------------------------------------------------------------
   RIGHT SIDE
   ---------------------------------------------------------------- */
.jsam-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Wallet balance chip */
.jsam-header-wallet {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none !important;
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--jh-border);
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1.2;
}

.jsam-header-wallet:hover { background: rgba(255,255,255,0.09); }

.jsam-hw-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--jh-text-dim);
    font-weight: 600;
}

.jsam-header-balance {
    font-size: 14px;
    font-weight: 800;
    color: var(--jh-gold);
}

/* Deposit button */
.jsam-deposit-btn-header {
    display: inline-flex;
    align-items: center;
    background: var(--jh-green);
    color: #000 !important;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 7px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.jsam-deposit-btn-header:hover {
    background: #00a844;
    transform: translateY(-1px);
}

/* Auth buttons (logged-out) */
.jsam-header-login-btn {
    padding: 7px 16px;
    border: 1px solid var(--jh-gold);
    color: var(--jh-gold) !important;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s;
}

.jsam-header-login-btn:hover {
    background: rgba(245, 197, 24, 0.1);
}

.jsam-header-register-btn {
    padding: 7px 16px;
    background: var(--jh-purple);
    color: #fff !important;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s;
}

.jsam-header-register-btn:hover {
    background: #5b21b6;
}

/* ----------------------------------------------------------------
   NOTIFICATION BELL
   ---------------------------------------------------------------- */
.jsam-notification-bell {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--jh-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--jh-text-dim);
    transition: all 0.2s;
}

.jsam-notification-bell:hover {
    background: rgba(255,255,255,0.1);
    color: var(--jh-text);
}

.jsam-notif-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--jh-red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
}

/* ----------------------------------------------------------------
   ACCOUNT MENU
   ---------------------------------------------------------------- */
.jsam-account-menu {
    position: relative;
}

.jsam-account-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--jh-border);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--jh-text);
}

.jsam-account-btn:hover { background: rgba(255,255,255,0.1); }

.jsam-avatar {
    width: 28px;
    height: 28px;
    background: var(--jh-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.jsam-chevron {
    transition: transform 0.2s;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    color: var(--jh-text-dim);
}

.jsam-account-menu.open .jsam-chevron {
    transform: rotate(180deg);
}

.jsam-account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--jh-surface);
    border: 1px solid var(--jh-border);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    z-index: 999999;
}

.jsam-account-menu.open .jsam-account-dropdown {
    display: block;
    animation: jsam-dropdown-in 0.15s ease;
}

@keyframes jsam-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.jsam-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--jh-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jsam-dropdown-header strong {
    font-size: 14px;
    color: var(--jh-text);
    font-weight: 700;
}

.jsam-dropdown-header small {
    font-size: 11px;
    color: var(--jh-text-dim);
}

.jsam-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--jh-text-dim) !important;
    text-decoration: none !important;
    transition: all 0.15s;
}

.jsam-dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--jh-text) !important;
}

.jsam-dropdown-divider {
    height: 1px;
    background: var(--jh-border);
    margin: 4px 0;
}

.jsam-dropdown-logout {
    color: var(--jh-red) !important;
}

.jsam-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}

/* ----------------------------------------------------------------
   HAMBURGER (MOBILE)
   ---------------------------------------------------------------- */
.jsam-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--jh-border);
    border-radius: 8px;
    padding: 7px;
    cursor: pointer;
    transition: background 0.2s;
}

.jsam-hamburger span {
    display: block;
    height: 2px;
    background: var(--jh-text-dim);
    border-radius: 2px;
    transition: all 0.3s;
}

.jsam-hamburger:hover { background: rgba(255,255,255,0.1); }
.jsam-hamburger:hover span { background: var(--jh-text); }

.jsam-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jsam-hamburger.open span:nth-child(2) { opacity: 0; }
.jsam-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------------
   MOBILE NAV DRAWER
   ---------------------------------------------------------------- */
.jsam-mobile-nav {
    display: none;
    position: fixed;
    top: var(--jh-height);
    left: 0;
    right: 0;
    background: var(--jh-bg);
    border-bottom: 1px solid var(--jh-border);
    padding: 12px 0;
    z-index: 999989;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.jsam-mobile-nav.open { display: block; }

.jsam-mobile-nav-link {
    display: block;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--jh-text-dim) !important;
    text-decoration: none !important;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.jsam-mobile-nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--jh-text) !important;
    padding-left: 30px;
}

.jsam-mobile-login {
    color: var(--jh-gold) !important;
    border-top: 1px solid var(--jh-border);
    margin-top: 4px;
}

.jsam-mobile-register {
    background: var(--jh-purple);
    color: #fff !important;
    margin: 4px 16px;
    border-radius: 8px;
    padding: 12px 24px;
}

.jsam-mobile-logout { color: var(--jh-red) !important; }

/* ----------------------------------------------------------------
   RESPONSIVE — show hamburger, hide desktop nav on mobile
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
    .jsam-main-nav { display: none; }
    .jsam-hamburger { display: flex; }

    .jsam-header-wallet .jsam-hw-label { display: none; }
    .jsam-header-wallet { padding: 5px 8px; }
    .jsam-header-balance { font-size: 12px; }

    .jsam-deposit-btn-header { padding: 7px 10px; font-size: 11px; }
}

@media (max-width: 600px) {
    .jsam-header-login-btn,
    .jsam-header-register-btn { display: none; }
    .jsam-header-wallet { display: none; }
}

@media (min-width: 901px) {
    .jsam-mobile-nav { display: none !important; }
}
