/* Shared Header Styles */
.top-bar {
    background: #0a1628;
    padding: 12px 24px;
    border-bottom: 1px solid #1e2d47;
}

.top-bar__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
}

.top-bar .logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.top-bar .logo img {
    height: 32px;
    width: auto;
}

.top-bar .nav {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-left: 20px;
}

.top-bar .nav__link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}

.top-bar .nav__link:hover {
    color: #2AABEE;
}

.top-bar .auth {
    margin-left: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.support-link {
    display: flex;
    align-items: center;
    color: #cbd5e1;
    transition: color 0.2s;
}

.support-link:hover {
    color: #fff;
}

.support-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.top-bar .auth__input:focus {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: #00A3FF !important;
    outline: none !important;
}

.top-bar .auth__button:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

/* Password wrapper for eye toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .auth__input {
    padding-right: 36px;
}

.eye-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
    color: rgba(148, 163, 184, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.eye-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.top-bar .auth__button {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.top-bar .auth__button--icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #00A3FF;
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 163, 255, 0.4);
}

.top-bar .auth__button--icon svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* Logged in state */
.auth-logged-in {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0f1621;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #2a3546;
    cursor: pointer;
    transition: all 0.2s;
}

.user-balance-display:hover {
    border-color: #2AABEE;
}

.user-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.balance-text {
    color: #fff;
    font-weight: bold;
    font-size: 13px;
}

.btn-deposit-header {
    background: #f1c40f;
    color: #111;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    font-size: 13px;
    text-transform: uppercase;
}

.btn-deposit-header:hover {
    opacity: 0.9;
}

/* Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #161f2c;
    border: 1px solid #2a3546;
    border-radius: 8px;
    width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
    display: none;
    z-index: 100;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #8a9eb5;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #1e2a3b;
    color: #fff;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.dropdown-divider {
    height: 1px;
    background: #2a3546;
    margin: 5px 0;
}

/* Header CAPTCHA Styles */
.captcha-header-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.captcha-header-img {
    height: 32px;
    width: auto;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.captcha-header-img:hover {
    opacity: 0.9;
}

.captcha-header-input {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Responsive Header Optimization */
@media (max-width: 1100px) {
    .top-bar .nav {
        margin-left: 10px;
        gap: 10px;
    }

    .top-bar .nav__link {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 8px 12px;
    }

    .top-bar__inner {
        gap: 8px;
        justify-content: space-between !important;
    }

    .top-bar .logo img {
        height: 24px;
    }

    .top-bar .nav {
        margin-left: 5px;
        gap: 8px;
    }

    .top-bar .nav__link {
        font-size: 10px;
        white-space: nowrap;
    }

    .top-bar .auth {
        gap: 6px;
    }

    .top-bar .auth__input {
        width: 75px;
        font-size: 11px;
        padding: 6px 8px;
    }

    .top-bar .auth__button {
        padding: 6px 12px;
        font-size: 11px;
    }

    .user-balance-display {
        padding: 4px 8px;
        gap: 4px;
    }

    .balance-text {
        font-size: 11px;
    }

    .btn-deposit-header {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 8px;
    }

    .top-bar__inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .top-bar .logo img {
        height: 18px;
    }

    .top-bar .auth {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
        order: 2;
        padding: 5px 0;
        margin-top: 5px;
    }

    .top-bar .auth__input {
        display: block !important;
        background: rgba(30, 41, 59, 0.6) !important;
        border: 1px solid rgba(148, 163, 184, 0.2) !important;
        border-radius: 20px !important;
        color: #fff !important;
        height: 32px;
        flex: 1;
        min-width: 0;
        max-width: 120px;
        font-size: 11px;
        padding: 0 12px;
    }

    .top-bar .auth__input::placeholder {
        color: rgba(255, 255, 255, 0.4);
    }

    .top-bar .auth__button--icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .top-bar .auth__button--ghost,
    .top-bar .auth__button {
        height: 32px;
        padding: 0 12px;
        border-radius: 16px;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .top-bar .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin: 8px 0 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 10px;
        gap: 15px;
    }

    .top-bar .nav__link {
        font-size: 10px;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
}

.sidebar-overlay.active {
    display: block;
}

/* Global Mobile Menu Toggle Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2100;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-right: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #f59e0b;
    border-radius: 1px;
}

.mobile-menu-toggle span:last-child {
    width: 70%;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}