/* lobby.css — главная страница, турниры, касса */

.app {
    display: grid;
    grid-template-rows: 64px 1fr;
    grid-template-columns: 1fr 260px;
    grid-template-areas:
        "topbar  topbar"
        "main    sidebar";
    min-height: 100vh;
    background: #0e0e12;
    color: #e5e7eb;
}

/* ---------- TOPBAR ---------- */
.topbar {
    grid-area: topbar;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #16161c;
    border-bottom: 1px solid #26262f;
    padding: 0 20px;
    gap: 20px;
}
.topbar-left { display: flex; align-items: center; gap: 24px; }
.logo {
    font-size: 1.4em; font-weight: 900; letter-spacing: 2px;
    color: #fff;
}
.topnav { display: flex; gap: 6px; }
.topnav-item {
    padding: 8px 16px; border-radius: 20px;
    color: #9ca3af; font-size: 0.85em; font-weight: 600;
    letter-spacing: 0.5px; text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.topnav-item:hover { background: #22222b; color: #fff; text-decoration: none; }
.topnav-item.active { background: #b91c1c; color: #fff; }
.topnav-item.disabled { opacity: 0.4; pointer-events: none; }

.topbar-banner { flex: 1; display: flex; justify-content: center; }
.banner-badge {
    padding: 8px 24px; border-radius: 8px;
    background: linear-gradient(90deg, #7c2d12, #b45309);
    color: #fff; font-weight: bold; font-size: 0.85em;
    letter-spacing: 0.5px;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }
.profile { display: flex; align-items: center; gap: 10px; }
.profile-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    overflow: hidden; border: 2px solid #fbbf24;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 0.9em; font-weight: 600; }
.profile-balance { font-size: 0.8em; color: #fbbf24; }

/* ---------- QUICK MENU (вторичное меню) ---------- */
.app {
    grid-template-rows: 64px 56px 1fr;
    grid-template-areas:
        "topbar   topbar"
        "quickmenu quickmenu"
        "main     sidebar";
}

.quick-menu {
    grid-area: quickmenu;
    display: flex;
    gap: 4px;
    padding: 8px 16px;
    background: #0e0e12;
    border-bottom: 1px solid #26262f;
    overflow-x: auto;
    white-space: nowrap;
}
.quick-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    font-size: 0.8em;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    transition: transform 0.15s, filter 0.15s;
}
.quick-item:hover { text-decoration: none; filter: brightness(1.15); transform: translateY(-1px); }
.quick-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; border-radius: 6px; }
.quick-item span { position: relative; z-index: 1; }

/* ---------- MAIN HOME ---------- */
.main-home {
    grid-area: main;
    padding: 20px;
    overflow-y: auto;
    background: #0e0e12;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ---------- BANNER CAROUSEL ---------- */
.banner-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 1;
    max-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slide:hover { text-decoration: none; }
.banner-image {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.banner-text {
    position: relative; z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.banner-title { font-size: 2.6em; font-weight: 900; letter-spacing: 2px; }
.banner-subtitle { font-size: 1.1em; margin-top: 6px; opacity: 0.9; }

.banner-dots {
    position: absolute; bottom: 12px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 2;
}
.banner-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}
.banner-dot.active { background: #fbbf24; }

/* ---------- PROMO CARDS ---------- */
.section-title {
    font-size: 1.3em; font-weight: 700;
    margin: 0 0 14px; color: #fff;
}
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.promo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
    border-radius: 12px;
    overflow: hidden;
    padding: 16px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    transition: transform 0.15s;
}
.promo-card:hover { transform: translateY(-3px); text-decoration: none; }
.promo-image {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.6;
    z-index: 0;
}
.promo-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fbbf24; font-weight: bold; font-size: 0.7em;
    padding: 3px 8px; border-radius: 4px;
    letter-spacing: 1px; z-index: 2;
}
.promo-body { position: relative; z-index: 1; }
.promo-title { font-size: 1.1em; font-weight: 800; }
.promo-subtitle { font-size: 0.8em; opacity: 0.9; margin-top: 4px; }

.promo-progress {
    position: relative; z-index: 1;
    background: rgba(0,0,0,0.5);
    height: 6px; border-radius: 3px;
    margin-top: 10px; overflow: hidden;
}
.promo-progress-bar {
    height: 100%;
    background: #22c55e;
    transition: width 0.3s;
}
.promo-footer {
    position: relative; z-index: 1;
    font-size: 0.75em; opacity: 0.85;
    margin-top: 6px;
}

/* ---------- MAIN ---------- */
.main {
    grid-area: main;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 0;
    overflow: hidden;
}

.tournaments-list-panel {
    background: #16161c;
    padding: 16px;
    overflow-y: auto;
    border-right: 1px solid #26262f;
}

.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.panel-header h2 { margin: 0; font-size: 1.05em; }

.tournament-filters {
    display: flex; gap: 6px; margin-bottom: 12px;
}
.tournament-filters a {
    padding: 6px 12px; border-radius: 6px;
    color: #9ca3af; font-size: 0.8em;
    text-decoration: none; background: #22222b;
}
.tournament-filters a.active { background: #b91c1c; color: #fff; }
.tournament-filters a:hover { text-decoration: none; }

.tournament-list { display: flex; flex-direction: column; gap: 4px; }

.tournament-row {
    display: grid;
    grid-template-columns: 90px 1fr 70px 90px 130px 40px;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #1a1a22;
    border-radius: 6px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.85em;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.tournament-row:hover { background: #22222b; text-decoration: none; }
.tournament-row.selected {
    background: #2a1a1a;
    border-left-color: #b91c1c;
}
.tournament-row-time { color: #fbbf24; font-size: 0.85em; }
.tournament-row-name { color: #fff; font-weight: 600; }
.tour-hashtags { color: #6b7280; font-size: 0.8em; margin-left: 6px; }
.tournament-row-buyin { color: #fbbf24; text-align: right; }
.tournament-row-players { color: #9ca3af; text-align: right; }
.tournament-row-prize { color: #22c55e; text-align: right; font-weight: 600; }
.tour-gtd { display: block; color: #6b7280; font-size: 0.75em; }
.tournament-row-badge {
    background: #16a34a; color: #fff; font-size: 0.7em;
    padding: 2px 6px; border-radius: 4px; text-align: center;
}

/* ---------- DETAILS ---------- */
.tournament-details-panel {
    background: #16161c;
    padding: 20px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 16px;
}
.details-header h2 { margin: 0 0 4px; font-size: 1.05em; color: #fbbf24; }
.details-hashtags { color: #6b7280; font-size: 0.8em; }

.details-list {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    margin: 0; font-size: 0.85em;
}
.details-list dt { color: #9ca3af; }
.details-list dd { margin: 0; text-align: right; color: #fff; font-weight: 600; }

.details-actions { margin-top: auto; }
.btn-block { width: 100%; }

/* ---------- SIDEBAR ---------- */
.sidebar {
    grid-area: sidebar;
    background: #111118;
    padding: 16px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 16px;
    border-left: 1px solid #26262f;
}
.sidebar-profile { text-align: center; }
.sidebar-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    overflow: hidden; margin: 0 auto 8px;
    border: 2px solid #fbbf24;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-username { font-weight: bold; }

.sidebar-balances { display: flex; flex-direction: column; gap: 6px; }
.balance-row {
    display: flex; justify-content: space-between;
    font-size: 0.85em; padding: 4px 8px;
    background: #1a1a22; border-radius: 4px;
}
.balance-row.muted { opacity: 0.5; }
.balance-label { color: #9ca3af; }
.balance-value { color: #fbbf24; font-weight: bold; }

.btn-cashier {
    background: linear-gradient(135deg, #b45309, #d97706);
    color: #fff; padding: 12px;
    border: none; border-radius: 999px;
    font-weight: bold; font-size: 0.95em;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center; gap: 8px;
}
.btn-cashier:hover { filter: brightness(1.1); }
.cashier-icon { font-size: 1.1em; }

.sidebar-links { display: flex; flex-direction: column; gap: 6px; font-size: 0.85em; }
.sidebar-links a { color: #9ca3af; text-decoration: none; }
.sidebar-links a:hover { color: #fbbf24; }

/* ---------- CASHIER MODAL ---------- */
.cashier-quick {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 6px; margin-bottom: 12px;
}
.cashier-quick button {
    padding: 8px; background: #22222b; border: 1px solid #374151;
    border-radius: 6px; color: #fff; cursor: pointer;
    font-weight: bold; font-size: 0.85em;
}
.cashier-quick button:hover { background: #2f2f3b; border-color: #fbbf24; }

.modal-subtitle { color: #9ca3af; font-size: 0.85em; margin-top: -8px; }

.empty-state { color: #6b7280; padding: 30px 20px; text-align: center; }