/* ==========================================================================
   MOBILE ADAPTIVE — БАЗА
   ========================================================================== */

.nav-more,
.nav-mobile {
    display: none;
}

.header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(5, 6, 10, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth .btn-login,
.auth .btn-register,
.auth .auth-actions button {
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    cursor: pointer;
    transition: .2s;
}

.auth .btn-register {
    background: linear-gradient(135deg,#7b5cff,#ff7b9c);
    border-color: transparent;
    color:#fff;
}

.auth button:hover {
    background: rgba(255,255,255,.1);
    transform: translateY(-1px);
}

/* ==========================================================================
   MOBILE — max-width: 900px
   ========================================================================== */

@media (max-width: 900px) {
    .header {
        flex-wrap: wrap;
        align-items: center;
        padding-inline: 18px;
        gap: 8px;
    }

    .auth {
        width: 100%;
        margin-top: 10px;
    }
}

/* ==========================================================================
   FULL MOBILE DESIGN — max-width: 600px
   ========================================================================== */

@media (max-width: 600px) {

    /* ===== скрываем кнопку ВЫЙТИ в профиле ===== */
    .auth-actions .auth-btn-logout {
        display: none !important;
    }

    /* ===== кнопка ВЫЙТИ в бургер-меню ===== */
    .nav-mobile .logout-mobile {
        margin-top: 6px;
        padding: 10px 12px;
        border-radius: 12px;

        background: rgba(255, 70, 70, 0.15);
        border: 1px solid rgba(255, 70, 70, 0.35);
        color: #ff5d5d !important;
        font-weight: 600;

        transition: background .2s ease, border-color .2s ease, transform .12s ease;
    }

    .nav-mobile .logout-mobile:hover {
        background: rgba(255, 70, 70, 0.28);
        border-color: rgba(255, 70, 70, 0.55);
        transform: translateY(-1px);
    }

    /* HEADER */

    .header {
        position: sticky;
        top: 0;
        padding: 10px 16px;
        flex-wrap: wrap;
        align-items: center;
        background: radial-gradient(circle at top left,rgba(123,92,255,.3),rgba(5,6,10,.96));
        border-bottom: 1px solid rgba(255,255,255,.1);
        backdrop-filter: blur(18px);
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 8px;
        order: 1;
    }

    .header-left img {
        max-height: 28px;
    }

    .nav-desktop {
        display: none !important;
    }

    /* BURGER */

    .nav-more {
        order: 2;
        margin-left: auto;
        display: flex;
        flex-direction: column;
        gap: 5px;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 32px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,.15);
        background: rgba(255,255,255,.05);
        cursor: pointer;
        transition: .2s;
    }

    .nav-more:hover {
        background: rgba(255,255,255,.1);
    }

    .burger-line {
        width: 60%;
        height: 3px;
        background: #fff;
        border-radius: 3px;
        transition: .25s;
    }

    .nav-more.active .burger-line:nth-child(1){
        transform: translateY(6px) rotate(45deg);
    }
    .nav-more.active .burger-line:nth-child(2){
        opacity: 0;
    }
    .nav-more.active .burger-line:nth-child(3){
        transform: translateY(-6px) rotate(-45deg);
    }

    /* ==========================================================================
       PROFILE BLOCK — FIX, КНОПКИ СПРАВА
       ========================================================================== */

    .auth {
        order: 3;
        width: 100%;
        margin-top: 12px;

        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .auth-left {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .auth .avatar {
        width: 62px;
        height: 62px;
        min-width: 62px;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid rgba(255,255,255,.18);
        box-shadow: 0 8px 18px rgba(0,0,0,.45);
    }

    .auth .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .auth-user-info {
        display: flex;
        flex-direction: column;
        line-height: 1.25;
    }

    .auth-user-info .name {
        font-size: 15px;
        font-weight: 600;
        color: #fff;
    }

    .auth-user-info .role {
        font-size: 13px;
        font-weight: 700;
        color: #3ab4ff;
    }

    .auth-user-info .balance {
        font-size: 16px;
        font-weight: 700;
        margin-top: 4px;
        color: #fff;
        white-space: nowrap;
    }

    .auth-actions {
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: flex-end;
        align-items: center;
    }

    .auth-actions a {
        padding: 9px 16px;
        font-size: 14px;
        border-radius: 12px;
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.1);
        color: #fff;
        transition: .2s;
    }

    .auth-actions .auth-btn-admin {
        display: none;
    }

    body.admin .auth-actions .auth-btn-admin {
        display: inline-flex;
    }

    .auth-actions a:hover {
        background: rgba(255,255,255,.13);
        transform: translateY(-1px);
    }

    /* ==========================================================================
       MOBILE MENU
       ========================================================================== */

    .nav-mobile {
        order: 5;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 14px 16px 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        background: rgba(10,10,15,.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,255,255,.1);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: .25s;
    }

    .nav-mobile.nav-mobile-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-mobile a {
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.15);
        color: #fff;
        font-size: 16px;
        transition: .2s;
    }

    .nav-mobile a:hover {
        background: rgba(255,255,255,.12);
        transform: translateY(-1px);
    }

    /* =============================
       LIVE DROPS FIX — ВАЖНО
       ============================= */
    .live-drops {
        margin-top: var(--header-height, 90px);
    }

    /* MAIN */
    main {
        padding: 20px 16px 40px;
    }

    .grid-card {
        padding: 14px;
        border-radius: 16px;
        background: rgba(26,28,40,.95);
        border: 1px solid rgba(255,255,255,.06);
        box-shadow: 0 14px 30px rgba(0,0,0,.75);
        margin-bottom: 16px;
    }
}
