/* ========================================= */
/*  ЭКИПИРОВКА / ЛОББИ — FNF STYLE           */
/* ========================================= */

/* === КОНТЕЙНЕР === */
.lobby-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    width: 100vw;
    overflow-y: auto;
    padding: 2rem 1rem;
    background: linear-gradient(160deg, #1a0f30 0%, #ad4612 40%, #933b3b 100%);
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    position: relative;
}
.char-stats-panel {
    background: linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 100%);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #111;
}

.char-stats-panel::-webkit-scrollbar {
    width: 6px;
}

.char-stats-panel::-webkit-scrollbar-track {
    background: #111;
    border-radius: 3px;
}

.char-stats-panel::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* Заголовок */
.char-stats-header {
    text-align: center;
    padding: 12px 0 16px;
    border-bottom: 2px solid #ffd70044;
    margin-bottom: 12px;
}

.char-avatar {
    font-size: 48px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 10px #ffd700);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.char-name {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 16px;
    color: #ffd700;
    text-shadow: 2px 2px 0 #000;
    letter-spacing: 2px;
}

.char-level {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 8px;
    color: #888;
    margin-top: 6px;
}

/* Секции */
.char-stats-section {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ffffff11;
}

.char-stats-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.char-stats-section-title {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 10px;
    color: #aaa;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Строки */
.char-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.char-stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 8px;
    color: #ccc;
}

.char-stat-icon {
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.char-stat-value {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    min-width: 60px;
    text-align: right;
}

/* Детали */
.char-stat-detail {
    font-family: "Press Start 2P", monospace, Arial;
    font-size: 6px;
    color: #666;
    text-align: right;
    margin-top: -2px;
    margin-bottom: 2px;
    padding-right: 2px;
}

/* Полоска прогресса */
.char-stat-bar {
    width: 100%;
    height: 4px;
    background: #222;
    border-radius: 2px;
    margin: 2px 0 6px;
    overflow: hidden;
}

.char-stat-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 6px currentColor;
}
/* Виньетка */
.lobby-container::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 0;
}

/* === ЗАГОЛОВОК === */
.lobby-title {
    font-family: var(--font-heading, 'Press Start 2P', monospace);
    font-size: 1.8rem;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
    text-shadow:
        0 0 10px var(--color-red-glow, rgba(255, 34, 68, 0.5)),
        0 0 30px var(--color-red-glow, rgba(255, 34, 68, 0.5)),
        4px 4px 0 #000;
}

/* === ВКЛАДКИ === */
.lobby-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.lobby-tab {
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0.7rem 1rem;
    border: 3px solid #000;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 3px 3px 0 #000;

    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #c0b8d8);
}

.lobby-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 4px 5px 0 #000;
}

.lobby-tab.active {
    background: var(--color-red, #ff2244);
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
    box-shadow: 3px 3px 0 #000, 0 0 15px rgba(255, 34, 68, 0.3);
}

/* === LAYOUT — две колонки === */
.lobby-content-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 2;
}

/* === ЛЕВАЯ КОЛОНКА — Персонаж === */
.character-container {
    flex: 0 0 280px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.2rem;
    backdrop-filter: blur(4px);
}

.character-stats-title,
.selected-equipment-title {
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--color-gold, #ffcc00);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
    margin-bottom: 0.8rem;
}

.character-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0.5rem 0.7rem;
    transition: border-color 0.2s;
    transform: none;
    box-shadow: none;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: none;
    animation: none;
}

.stat-icon { font-size: 1.1rem; }

.stat-label {
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    font-size: 0.65rem;
    color: var(--text-secondary, #c0b8d8);
    text-shadow: none;
}

.stat-value {
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    text-shadow: none;
}

/* Экипированные предметы */
.selected-equipment-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary, #c0b8d8);
}

/* === ПРАВАЯ КОЛОНКА — Контент вкладок === */
.lobby-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.lobby-tab-content { display: none; }
.lobby-tab-content.active { display: block; }

/* === СЕТКИ ТОВАРОВ === */
.shop-grid,
.equipment-grid,
.inventory-grid,
.combo-upgrade-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* === КАРТОЧКИ ТОВАРОВ === */
.shop-item,
.equipment-item,
.inventory-item,
.combo-upgrade-item {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    transform: none;
    box-shadow: none;
}

/* Убираем старый блик */
.shop-item::after,
.equipment-item::after,
.inventory-item::after {
    display: none;
}

.shop-item:hover,
.equipment-item:hover,
.inventory-item:hover,
.combo-upgrade-item:hover {
    border-color: var(--color-cyan, #00ddff);
    background: rgba(0, 221, 255, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 221, 255, 0.15);
    animation: none;
}

.shop-item:active,
.equipment-item:active,
.inventory-item:active,
.combo-upgrade-item:active {
    transform: translateY(0);
    box-shadow: none;
}

/* === КАРТОЧКИ ТОВАРОВ — непрозрачные === */
.shop-item,
.equipment-item,
.inventory-item,
.combo-upgrade-item {
    background: #2d1b4e;
    border: 2px solid #4a3370;
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.shop-item::after,
.equipment-item::after,
.inventory-item::after {
    display: none;
}

.shop-item:hover,
.equipment-item:hover,
.inventory-item:hover,
.combo-upgrade-item:hover {
    background: #3a2560;
    border-color: var(--color-cyan, #00ddff);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 221, 255, 0.2);
    animation: none;
}

.shop-item:active,
.equipment-item:active,
.inventory-item:active,
.combo-upgrade-item:active {
    background: #241a3d;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Редкости */
.item-rare,
.inventory-item.rare {
    border-color: rgba(0, 221, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 221, 255, 0.15);
}

.item-rare:hover,
.inventory-item.rare:hover {
    border-color: #00ddff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 221, 255, 0.3);
}

.item-epic,
.inventory-item.epic {
    border-color: rgba(180, 80, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(180, 80, 255, 0.15);
}

.item-epic:hover,
.inventory-item.epic:hover {
    border-color: #b450ff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(180, 80, 255, 0.3);
}

.item-legendary,
.inventory-item.legendary {
    border-color: rgba(255, 204, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 204, 0, 0.15);
    animation: legendaryPulse 3s ease-in-out infinite;
}

.item-legendary:hover,
.inventory-item.legendary:hover {
    border-color: #ffcc00;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 204, 0, 0.35);
}


@keyframes legendaryPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 204, 0, 0.15); }
    50% { box-shadow: 0 0 20px rgba(255, 204, 0, 0.3); }
}

/* === КНОПКИ ПОКУПКИ === */
.buy-btn,
.unlock-combo-btn,
.equip-from-inventory-btn {
    width: 100%;
    padding: 0.7rem;
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 3px solid #000;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    transition: all 0.12s ease;

    background: var(--color-red, #ff2244);
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

.buy-btn:hover,
.unlock-combo-btn:hover,
.equip-from-inventory-btn:hover {
    background: #ff4466;
    transform: translateY(-2px);
    box-shadow: 4px 5px 0 #000, 0 0 15px rgba(255, 34, 68, 0.3);
}

.buy-btn:active,
.unlock-combo-btn:active,
.equip-from-inventory-btn:active {
    background: #cc1133;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

/* Куплено / Экипировано */
.buy-btn.equipped,
.unlock-combo-btn.unlocked {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #7a6e99);
    cursor: not-allowed;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.1);
    text-shadow: none;
}

/* Недостаточно средств */
.buy-btn:disabled:not(.equipped),
.unlock-combo-btn:disabled:not(.unlocked) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted, #7a6e99);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.06);
    text-shadow: none;
}

/* Цена */
.equipment-price {
    display: inline-block;
    background: var(--color-gold, #ffcc00);
    color: #1a1a1a;
    border: 2px solid #000;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    margin-top: 0.5rem;
    font-weight: bold;
    font-size: 0.7rem;
}

/* Кристалл */
.crystal-icon {
    font-size: 1rem;
    color: var(--color-cyan, #00ddff);
}

/* === КОМБО ПОСЛЕДОВАТЕЛЬНОСТЬ === */
.combo-sequence {
    display: flex;
    gap: 4px;
    margin-bottom: 0.8rem;
    justify-content: center;
}

.combo-key {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: var(--font-pixel, 'PixeloidMono', monospace);
    font-size: 0.6rem;
    font-weight: bold;
    color: #fff;
}

/* === ЗАГОЛОВКИ СЕКЦИЙ === */
.shop-title,
.inventory-title,
.combo-upgrade-title {
    font-family: var(--font-heading, 'Press Start 2P', monospace);
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 10px var(--color-red-glow, rgba(255, 34, 68, 0.5)), 3px 3px 0 #000;
    text-align: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

/* === КНОПКА НАЗАД === */
/* Общий стиль определен в base.css */

/* === МОБИЛА === */
@media (max-width: 768px) {
    .lobby-content-wrapper {
        flex-direction: column;
    }

    .character-container {
        flex: none;
        width: 100%;
        margin-bottom: 1rem;
    }

    .lobby-tabs { gap: 0.4rem; }
    .lobby-tab { font-size: 0.6rem; padding: 0.6rem 0.8rem; }
    .lobby-title { font-size: 1.4rem; }

    .shop-grid,
    .equipment-grid,
    .inventory-grid,
    .combo-upgrade-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .lobby-container { padding: 1rem 0.5rem; }
    .lobby-title { font-size: 1.1rem; }
    .lobby-tab { font-size: 0.55rem; padding: 0.5rem 0.6rem; border-width: 2px; box-shadow: 2px 2px 0 #000; }

    .character-container { padding: 0.8rem; }
    .character-stats-title { font-size: 0.75rem; }
    .stat-card { padding: 0.4rem 0.5rem; }

    .shop-item,
    .equipment-item,
    .inventory-item,
    .combo-upgrade-item {
        padding: 0.8rem;
    }

    .shop-item h3,
    .combo-upgrade-item h3 { font-size: 0.75rem; }
    .shop-item p,
    .combo-upgrade-item p { font-size: 0.6rem; }

    .buy-btn,
    .unlock-combo-btn { font-size: 0.65rem; padding: 0.6rem; border-width: 2px; box-shadow: 2px 2px 0 #000; }

    .shop-grid,
    .equipment-grid,
    .inventory-grid,
    .combo-upgrade-grid {
        grid-template-columns: 1fr;
    }
}
