/* ============================================
   SIDE MENU DRAWER — Platinum Reels
   Matches existing site colour palette:
     Accent blue:  #82b8df
     Gold:         #c2a76f
     Dark bg:      #05040a / #00192c
     Primary text: #e3eeff
     Secondary:    #8aa0c0
     Borders:      rgba(130,184,223,0.15)
   ============================================ */

/* ---- Overlay ---- */
.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.side-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Drawer ---- */
.side-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 100vw;
    height: 100dvh;
    height: 100vh; /* fallback for older browsers */
    background: #0f161d;
    border-left: 1px solid rgba(130, 184, 223, 0.12);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.side-menu-drawer.open {
    transform: translateX(0);
}

@media (max-width: 480px) {
    .side-menu-drawer {
        width: 100%;
    }
}

/* ---- Scrollable content ---- */
.side-menu-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 0px 20px;
    -webkit-overflow-scrolling: touch;
}
.side-menu-scroll::-webkit-scrollbar {
    width: 4px;
}
.side-menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(130, 184, 223, 0.2);
    border-radius: 4px;
}

/* ============================================
   HEADER
   ============================================ */
.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(130, 184, 223, 0.1);
    flex-shrink: 0;
}

.side-menu-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #82b8df, #a5cff2);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.side-menu-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(130, 184, 223, 0.08);
    border: 1px solid rgba(130, 184, 223, 0.18);
    border-radius: 16px;
    padding: 4px 12px;
    color: #e3eeff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.side-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(130, 184, 223, 0.1);
    border: 1px solid rgba(130, 184, 223, 0.2);
    border-radius: 8px;
    color: #e3eeff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.side-menu-close:hover {
    background: rgba(130, 184, 223, 0.2);
    border-color: rgba(130, 184, 223, 0.4);
    color: #ffffff;
}

/* ============================================
   SECTION LABELS
   ============================================ */
.side-menu-section-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #82b8df;
    padding: 18px 20px 8px;
    user-select: none;
}

/* ============================================
   COLLAPSIBLE SECTIONS
   ============================================ */
.side-menu-collapsible {
    border-top: 1px solid rgba(130, 184, 223, 0.06);
}
.side-menu-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}
.side-menu-section-header .side-menu-section-label {
    padding: 0;
}
.side-menu-section-header:hover {
    background: rgba(130, 184, 223, 0.03);
}
.side-menu-section-chevron {
    color: #5a6b80;
    font-size: 10px;
    transition: transform 0.25s ease;
}
.side-menu-collapsible .side-menu-chevron-rotate {
    transform: rotate(-90deg);
}
.side-menu-collapsible.open .side-menu-chevron-rotate {
    transform: rotate(0deg);
}
.side-menu-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.side-menu-collapsible.open .side-menu-section-content {
    max-height: 600px;
}

/* ============================================
   WALLET BUTTONS
   ============================================ */
.side-menu-wallet-btns {
    display: flex;
    gap: 8px;
    padding: 0px 20px;
}

.side-menu-btn-deposit,
.side-menu-btn-withdraw {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    border-radius: 5px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.side-menu-btn-deposit {
    background: url(../images/btn-bg.jpg) center top / cover no-repeat;
    color: #333;
    border: 2px solid #a7a7a7;
}
.side-menu-btn-deposit:hover {
    background: url(../images/btn-bg-over.jpg) center top / cover no-repeat;
    color: #fff;
}

.side-menu-btn-withdraw {
    background: url(../images/btn-bg-over.jpg) center top / cover no-repeat;
    color: #fff;
    border: 2px solid #a7a7a7;
}
.side-menu-btn-withdraw:hover {
    background: url(../images/btn-bg.jpg) center top / cover no-repeat;
    color: #333;
}

/* ============================================
   MENU ROWS
   ============================================ */
.side-menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid rgba(130, 184, 223, 0.08);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}
.side-menu-row:hover {
    background: rgba(130, 184, 223, 0.04);
}
.side-menu-row:last-child {
    border-bottom: none;
}

.side-menu-row-icon {
    width: 16px;
    text-align: center;
    color: #8aa0c0;
    font-size: 14px;
    flex-shrink: 0;
}

.side-menu-row-body {
    flex: 1;
    min-width: 0;
}

.side-menu-row-title {
    display: block;
    color: #e3eeff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.side-menu-row-sub {
    display: block;
    color: #8aa0c0;
    font-size: 14px;
    font-weight: 400;
    margin-top: 2px;
    line-height: 1.3;
}

.side-menu-row-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, #E8E8E8 44%, #FFFFFF 45%, #FFFFFF 50%, #9E9E9E 60%, #E8E8E8 95%);
    color: #0a0f1a;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.side-menu-row-chevron {
    color: #8aa0c0;
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* ============================================
   COMMUNITY BUTTONS
   ============================================ */
.side-menu-community-btns {
    display: flex;
    gap: 8px;
    padding: 0px 20px 4px 20px;
}

.side-menu-community-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 33px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid rgba(130, 184, 223, 0.15);
    color: #e3eeff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.side-menu-community-btn:hover {
    background: rgba(130, 184, 223, 0.06);
    border-color: rgba(130, 184, 223, 0.3);
}

/* Brand-colored icons only */
.side-menu-community-btn.telegram-btn i {
    color: #0088cc;
}
.side-menu-community-btn.whatsapp-btn i {
    color: #25D366;
}

/* ============================================
   DIVIDERS
   ============================================ */
.side-menu-divider {
    border: none;
    border-top: 1px solid rgba(130, 184, 223, 0.1);
    margin: 0;
}

/* ============================================    LOGOUT FOOTER
    ============================================ */
.side-menu-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(130, 184, 223, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.side-menu-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px 14px 20px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}
.side-menu-logout:hover {
    background: rgba(130, 184, 223, 0.04);
}

.side-menu-logout-icon {
    width: 16px;
    text-align: center;
    color: #c66b78;
    font-size: 14px;
}

.side-menu-logout-text {
    color: #c66b78;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   HAMBURGER → X ANIMATION (reuse existing)
   ============================================ */
.side-menu-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    padding: 2px;
}

.side-menu-hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #cdcdcd;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.side-menu-hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: #82b8df;
}
.side-menu-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.side-menu-hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: #82b8df;
}

/* ============================================
   PROFILE CARD
   ============================================ */
.side-menu-profile {
    position: relative;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid rgba(130, 184, 223, 0.1);
}

.side-menu-profile .side-menu-close {
    position: absolute;
    top: 12px;
    right: 16px;
}

.side-menu-profile-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.side-menu-profile-info {
    flex: 1;
    min-width: 0;
}

.side-menu-player-class {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    padding: 2px 9px;
    border: 1px solid rgba(130, 184, 223, 0.25);
    border-radius: 999px;
    background: rgba(130, 184, 223, 0.08);
    color: #0dcaf0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.side-menu-player-class:empty {
    display: none;
}

.side-menu-player-class i {
    font-size: 9px;
    color: #82b8df;
}

.side-menu-greeting {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.side-menu-greeting-label {
    color: #82b8df;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.side-menu-greeting-name {
    color: #e3eeff;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.side-menu-profile-stats {
    display: flex;
    gap: 8px;
}

.side-menu-profile-stat {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(130, 184, 223, 0.05);
    border: 1px solid rgba(130, 184, 223, 0.12);
    border-radius: 8px;
    padding: 6px 10px;
}

.side-menu-profile-stat-head {
    display: flex;
    align-items: center;
    gap: 5px;
}

.side-menu-profile-stat-head i {
    color: #82b8df;
    font-size: 11px;
}

.side-menu-profile-stat-label {
    color: #8aa0c0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.side-menu-profile-stat-value {
    display: block;
    color: #2ecc71;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.side-menu-profile-stat--comp .side-menu-profile-stat-value {
    color: #f3c14a;
}

.side-menu-profile-stat--comp {
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.side-menu-profile-stat--comp:hover {
    background: rgba(243, 193, 74, 0.1);
    border-color: rgba(243, 193, 74, 0.25);
}


/* Mobile adjustments */
@media (max-width: 480px) {
    .side-menu-hamburger {
        margin-right: 8px;
    }

    .side-menu-profile-top {
        gap: 10px;
    }

    .side-menu-profile-info {
        min-width: 0;
    }

    .side-menu-greeting-label {
        font-size: 10px;
    }

    .side-menu-greeting-name {
        font-size: 14px;
    }

    .side-menu-player-class {
        font-size: 9px;
        padding: 2px 7px;
    }

    .side-menu-profile-stats {
        gap: 6px;
    }

    .side-menu-profile-stat {
        padding: 4px 8px;
    }

    .side-menu-profile-stat-value {
        font-size: 12px;
    }
}

/* ============================================
   SUB-MENU (collapsible)
   ============================================ */
.side-menu-submenu-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.side-menu-submenu.open .side-menu-submenu-items {
    max-height: 300px;
}

.side-menu-submenu-item {
    padding-left: 20px;
}

.side-menu-submenu-item .side-menu-row-icon {
    font-size: 14px;
    width: 14px;
}

.side-menu-submenu-item .side-menu-row-title {
    font-size: 14px;
    font-weight: 500;
    color: #bccde0;
}

.side-menu-submenu-item:hover .side-menu-row-title {
    color: #e3eeff;
}

.side-menu-chevron-rotate {
    transition: transform 0.25s ease;
}

.side-menu-submenu.open .side-menu-chevron-rotate {
    transform: rotate(180deg);
}
