/* ========== ОБЩИЕ СТИЛИ (RESET, BODY, APP) ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #1a1f2b;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: #1a1f2b;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========== ФОН ПРИЛОЖЕНИЯ ========== */
#app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/backapp.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* ========== КОНТЕЙНЕРЫ ПОВЕРХ ФОНА ========== */
.top-bar,
.content,
.bottom-menu,
.modal-content,
.battle-screen,
.battle-result,
.equip-layout,
.forge-container,
.chest-list,
.market-container,
.inventory-container,
.skills-list,
.battle-log,
.class-selector,
.filters,
.stats-table,
.advent-grid,
.round-button {
    position: relative;
    z-index: 1;
}

/* ========== ВЕРХНЯЯ ПАНЕЛЬ ========== */
.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #232833;
    border-bottom: 2px solid #00aaff;
    color: white;
    font-weight: bold;
    font-size: 16px;
    z-index: 1;
}
.top-bar i {
    color: #00aaff;
    margin-right: 5px;
}

/* ========== КОНТЕНТНАЯ ОБЛАСТЬ ========== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 5px 10px !important;
    scrollbar-width: thin;
    scrollbar-color: #00aaff #232833;
    z-index: 1;
    overflow: hidden;
}

/* ========== НИЖНЕЕ МЕНЮ ========== */
.bottom-menu {
    display: flex;
    justify-content: space-around;
    background-color: #232833;
    padding: 8px 0;
    border-top: 2px solid #00aaff;
    z-index: 1;
}
.menu-item {
    color: #aaa;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
}
.menu-item.active {
    color: #00aaff;
}

/* ========== КНОПКИ ========== */
.btn {
    background-color: #2f3542;
    color: #aaa;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.btn.active {
    background-color: #00aaff;
    color: white;
}
.btn-outline {
    background: transparent;
    border: 2px solid #00aaff;
    color: #00aaff;
}
.claim-task-btn.active {
    background-color: #00aaff;
    color: white;
}
.claim-task-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== ПОЛОСКИ HP/МАНЫ ========== */
.stat-bar {
    position: relative;
    background-color: #2f3542;
    border-radius: 5px;
    overflow: hidden;
    height: 18px;
    width: 100px;
    margin: 3px auto;
}
.stat-fill {
    transition: width 0.3s ease;
    height: 100%;
}
.hp-fill {
    background-color: #e74c3c;
}
.mana-fill {
    background-color: #00aaff;
}
.stat-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 0 3px black;
    background-color: rgba(0,0,0,0.3);
    border-radius: 5px;
    pointer-events: none;
    z-index: 2;
}

/* ========== ПЕРЕКЛЮЧАТЕЛЬ КЛАССОВ (ОСНОВНОЙ) ========== */
.class-selector {
    display: flex;
    background-color: #2f3542;
    border-radius: 30px;
    padding: 4px;
    margin-bottom: 5px;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
}

.class-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background-color: #2f3542;
    color: #aaa;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: center;
    outline: none;
    border-radius: 25px;
    position: relative;
    margin: 0;
    line-height: 1.2;
    box-sizing: border-box;
}

.class-btn.active {
    background-color: #00aaff;
    color: white;
}

.class-btn:not(.active):hover {
    background-color: #3a4050;
}

.class-icon {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* ========== ВКЛАДКИ ПРОФИЛЯ (Скины, Бонусы, Улучшить) ========== */
.profile-tabs-container {
    display: flex;
    background-color: #2a303c;
    border-radius: 12px 12px 0 0;
    padding: 2px;
    gap: 2px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.profile-tabs-container .btn.profile-tab {
    flex: 1;
    padding: 10px 0;
    border: none;
    background-color: #232833;
    color: #aaa;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: center;
    border-radius: 0;
    margin: 0;
    line-height: 1.2;
    box-sizing: border-box;
}

.profile-tabs-container .btn.profile-tab:first-child {
    border-radius: 10px 0 0 0;
}

.profile-tabs-container .btn.profile-tab:last-child {
    border-radius: 0 10px 0 0;
}

.profile-tabs-container .btn.profile-tab.active {
    background-color: #00aaff;
    color: white;
}

.profile-tabs-container .btn.profile-tab:not(.active):hover {
    background-color: #3a4050;
}

.profile-tabs-container .btn.profile-tab[data-tab="upgrade"] {
    padding: 10px 0;
}

.upgrade-tab-icon {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* ========== СТРАНИЦА ПРОФИЛЯ (КОНТЕЙНЕР) ========== */
#profileContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

/* Кнопки выбора классов (Воин, Ассасин, Маг) */
#profileContent .class-selector {
    background-color: #2a303c;
    border-radius: 0;
    padding: 2px;
    gap: 2px;
    margin: 0;
    display: flex;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

#profileContent .class-btn {
    background-color: #232833;
    color: #aaa;
    border-radius: 0;
    padding: 10px 0;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
    border: none;
}

#profileContent .class-btn.active {
    background-color: #00aaff;
    color: white;
}

#profileContent .class-btn:not(.active):hover {
    background-color: #3a4050;
}

/* ========== ИСПРАВЛЕНИЕ БЛОКА СТАТИСТИКИ (БАРЫ) ========== */
.stats-block {
    background-color: #2a303c !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    overflow: hidden !important;
}
.stat-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 16px !important;
    border-bottom: 1px solid #1a1f2b !important;
    background-color: #2a303c !important;
}
.stat-row:last-child {
    border-bottom: none !important;
}
.stat-label {
    font-weight: bold !important;
    color: #fff !important;
    font-size: 14px !important;
    min-width: 100px !important;
}
.stat-bar-container {
    flex: 1 !important;
    position: relative !important;
    background-color: #1a1f2b !important;
    border-radius: 20px !important;
    height: 24px !important;
    margin-left: 15px !important;
    overflow: hidden !important;
}
.stat-bar-fill {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    background-color: #00aaff !important;
    border-radius: 20px !important;
    transition: width 0.3s ease !important;
}
.stat-value {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-shadow: 0 0 2px black !important;
    z-index: 1 !important;
}

/* ========== УБИРАЕМ ОТСТУПЫ МЕЖДУ КНОПКАМИ И БЛОКОМ СТАТИСТИКИ ========== */
#profileContent .class-selector {
    margin-bottom: 0 !important;
}
.stats-block {
    margin-top: 0 !important;
}

/* Таблица характеристик (страница Бонусы) */
.bonuses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background-color: #2a303c;
}

.bonuses-table th,
.bonuses-table td {
    padding: 8px 6px;
    text-align: center;
    border: none;
}

.bonuses-table th:first-child,
.bonuses-table td:first-child {
    text-align: left;
    padding-left: 12px;
}

.bonuses-table thead tr {
    background-color: #1a1f2b;
    color: #00aaff;
}

.bonuses-table thead th {
    font-weight: bold;
    padding: 10px 6px;
}

.bonuses-table tbody tr:nth-child(odd) {
    background-color: #232833;
}

.bonuses-table tbody tr:nth-child(even) {
    background-color: #2a303c;
}

/* Список навыков (страница Улучшить) */
.skills-list {
    overflow-y: auto;
    flex: 1;
    border-radius: 0;
    margin-top: 0;
}

.skills-header {
    background-color: #1a1f2b;
    padding: 12px 16px;
    color: #00aaff;
    font-weight: bold;
    font-size: 14px;
    text-align: left;
    border-radius: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #232833;
    margin: 0;
}

.skill-item:nth-child(even) {
    background-color: #2a303c;
}

.skill-info {
    flex: 1;
}

.skill-name {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
}

.skill-desc {
    font-size: 11px;
    color: #aaa;
    line-height: 1.3;
}

.skill-value {
    font-size: 16px;
    font-weight: bold;
    color: #00aaff;
    min-width: 45px;
    text-align: center;
}

.skill-btn {
    background-color: #00aaff;
    color: white;
    border: none;
    width: 80px;
    height: 40px;
    border-radius: 20px;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-btn:disabled {
    background-color: #444;
    cursor: not-allowed;
    opacity: 0.5;
}

.skill-btn:not(:disabled):hover {
    opacity: 0.8;
}

/* ========== ОПИСАНИЯ (МОДАЛЬНЫЕ ОКНА) ========== */
.passive {
    color: #2ecc71;
    font-weight: bold;
}
.active {
    color: #e74c3c;
    font-weight: bold;
}
.modal .role-card {
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: #2a303c;
    border-radius: 12px;
}
.modal .role-card h3 {
    font-size: 1.1rem;
    margin: 0 0 6px 0;
    color: #fff;
    border-left: none;
    padding-left: 0;
}
.modal .feature-desc {
    font-size: 0.85rem;
    color: #ddd;
    line-height: 1.4;
}
.modal .skill {
    margin-bottom: 8px;
}
.modal .skill-name {
    font-weight: bold;
    font-size: 0.9rem;
}
.modal .skill-name.passive {
    color: #2ecc71;
}
.modal .skill-name.active {
    color: #e74c3c;
}
.modal .skill-type {
    font-size: 0.7rem;
    color: #aaa;
    margin-left: 5px;
}
.modal .skill-desc {
    font-size: 0.8rem;
    color: #ddd;
    margin-top: 3px;
    line-height: 1.4;
}

/* ========== КУЗНИЦА ========== */
.smelt-table tr {
    background-color: #2a303c;
}
.smelt-table tr:nth-child(even) {
    background-color: #232833;
}
.smelt-table td, .smelt-table th {
    border-bottom: 1px solid #1a1f2b;
}
.smelt-table .rarity-common td:first-child { color: #aaa; }
.smelt-table .rarity-uncommon td:first-child { color: #2ecc71; }
.smelt-table .rarity-rare td:first-child { color: #2e86de; }
.smelt-table .rarity-epic td:first-child { color: #9b59b6; }
.smelt-table .rarity-legendary td:first-child { color: #f1c40f; }

.rarity-block {
    margin-bottom: 8px;
    padding: 4px 0;
}
.rarity-name {
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    width: 90px;
}
.rarity-block .reward-desc {
    font-size: 0.8rem;
    color: #ddd;
    margin-left: 95px;
}
.rarity-common .rarity-name { color: #aaa; }
.rarity-uncommon .rarity-name { color: #2ecc71; }
.rarity-rare .rarity-name { color: #2e86de; }
.rarity-epic .rarity-name { color: #9b59b6; }
.rarity-legendary .rarity-name { color: #f1c40f; }

.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.reward-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8rem;
    padding: 4px 0;
    border-bottom: 1px solid #3a4050;
}
.reward-row span:first-child {
    font-weight: bold;
    font-size: 0.9rem;
}
.reward-value {
    color: #ddd;
    text-align: right;
    font-size: 0.8rem;
}
.modal-content {
    max-height: 85vh;
    overflow-y: auto;
}
.rewards-list .reward-row,
.rewards-list .reward-value {
    font-size: 0.8rem !important;
}

/* ========== ЭКРАН БОЯ ========== */
.battle-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 5px;
    background-color: #1a1f2b;
    border: none;
}
.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #1a1f2b;
    border-radius: 12px 12px 0 0;
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: bold;
    border: none;
}
.battle-header > div:first-child,
.battle-header > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.battle-header .role-text {
    font-size: 11px;
    color: #aaa;
}
.battle-arena {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 0;
    background-color: #232833;
    margin: 0;
    border: none;
    width: 100%;
}
.hero-card,
.enemy-card {
    flex: 0 0 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
    background-color: transparent;
}
.hero-card > div:first-child,
.enemy-card > div:first-child {
    width: 100px !important;
    height: 150px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    background: none !important;
    box-shadow: none !important;
}
.hero-avatar-img,
.enemy-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    border: none !important;
}
.hp-bar,
.mana-bar {
    width: 100px;
    margin: 3px auto;
    background-color: transparent !important;
    border: none !important;
}
.hp-bar .stat-fill {
    background-color: #e74c3c;
}
.mana-bar .stat-fill {
    background-color: #00aaff;
}
.stat-text {
    font-size: 11px;
    font-weight: bold;
    text-shadow: 0 0 2px black;
}
.player-debuffs,
.enemy-debuffs {
    flex: 0 0 45px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    background-color: transparent;
}
.debuff-slot {
    position: relative;
    width: 40px;
    height: 33px;
    margin: 0 auto;
    background: none;
}
.negative-icon,
.positive-icon,
.rage-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    object-fit: contain;
    z-index: 5;
}
.debuff-slot[data-side="player"] .negative-icon { left: 0; }
.debuff-slot[data-side="enemy"] .negative-icon { right: 0; }
.debuff-slot[data-side="player"] .positive-icon,
.debuff-slot[data-side="player"] .rage-icon { right: 0; }
.debuff-slot[data-side="enemy"] .positive-icon,
.debuff-slot[data-side="enemy"] .rage-icon { left: 0; }
.battle-center {
    flex: 0 0 55px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: #2a303c;
    margin: 5px 0;
    border-radius: 12px;
    padding: 12px 0;
}
.battle-timer {
    width: 44px;
    height: 44px;
    font-size: 14px;
    line-height: 44px;
    padding: 0;
    background-color: #2a303c;
    border: 2px solid white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin: 0;
}
.speed-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.speed-label {
    font-size: 9px;
    color: #aaa;
    text-align: center;
}
.speed-btn {
    width: 44px;
    height: 44px;
    background-color: #2a303c;
    border: 1px solid #aaa;
    border-radius: 12px;
    color: #aaa;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px 6px;
}
.speed-btn:hover {
    border-color: #00aaff;
    color: #00aaff;
}
.speed-btn.active {
    border-color: #00aaff;
    color: #00aaff;
}
.battle-log-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 5px;
}
.log-header {
    background-color: #1a1f2b;
    padding: 8px 12px;
    text-align: center;
    font-weight: bold;
    color: #ccc;
    font-size: 14px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}
.battle-log {
    flex: 1;
    overflow-y: auto;
    background-color: #232833;
    padding: 0;
    margin: 0;
    border-radius: 0 0 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: #00aaff #1a1f2b;
}
.battle-log::-webkit-scrollbar {
    width: 6px;
}
.battle-log::-webkit-scrollbar-track {
    background: #1a1f2b;
}
.battle-log::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 3px;
}
.log-entry {
    padding: 8px 12px;
    margin: 0;
    line-height: 1.4;
    font-size: 12px;
}
.log-entry:nth-child(odd) {
    background-color: #232833;
}
.log-entry:nth-child(even) {
    background-color: #2a303c;
}
.log-entry .damage-number {
    color: #ff4444;
    font-weight: bold;
}
.log-entry .heal-number {
    color: #44ff44;
    font-weight: bold;
}
.ice-text {
    color: #00aaff;
}
.log-entry.ice-message {
    color: #00aaff;
}
.log-entry.fire-message {
    color: #ff4444;
}
.log-entry.poison-message {
    color: #88ff88;
}
.log-entry.ult-message {
    color: #ffaa00;
}
.log-entry.dodge-message {
    color: #2ecc71;
}

/* ========== СТРАНИЦА ЭКИПИРОВКИ ========== */
.equip-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.equip-top {
    background-color: #2a303c;
    margin: 0;
    padding: 10px 0;
    margin-bottom: 0;
}
.equip-top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.equip-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 78px;
}
.equip-slot {
    position: relative;
    width: 78px;
    height: 78px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.equip-slot:hover {
    transform: scale(1.05);
}
.slot-icon {
    width: 58px;
    height: 58px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.hero-center {
    width: 160px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
}
.hero-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #00aaff;
}
.equip-container .class-selector {
    background-color: #2f3542;
    border-radius: 12px 12px 0 0;
    padding: 2px;
    gap: 2px;
    margin-bottom: 0;
    display: flex;
}
.equip-container .class-btn {
    background-color: #232833 !important;
    color: #aaa;
    border-radius: 0 !important;
    margin: 0;
    padding: 10px 0;
    flex: 1;
}
.equip-container .class-btn:first-child {
    border-radius: 10px 0 0 0 !important;
}
.equip-container .class-btn:last-child {
    border-radius: 0 10px 0 0 !important;
}
.equip-container .class-btn.active {
    background-color: #00aaff !important;
    color: white;
}
.equip-container .class-btn:not(.active):hover {
    background-color: #3a4050;
}
.inventory-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-top: 0px;
}
.inventory-header {
    background-color: #1a1f2b;
    border-radius: 0;
    margin: 0;
    padding: 12px 16px;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
}
.inventory-list {
    flex: 1;
    overflow-y: auto;
    background-color: #232833;
    border-radius: 0 0 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: #00aaff #1a1f2b;
    max-height: 280px;
}
.inventory-list::-webkit-scrollbar {
    width: 6px;
}
.inventory-list::-webkit-scrollbar-track {
    background: #1a1f2b;
}
.inventory-list::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 10px;
}
.inventory-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 16px;
    border-bottom: 1px solid #1a1f2b;
    background-color: #232833;
    min-height: 64px;
}
.inventory-row:nth-child(even) {
    background-color: #2a303c;
}
.inventory-row.empty-row {
    background-color: #232833;
    border-bottom: 1px solid #1a1f2b;
}
.inventory-row.empty-row:nth-child(even) {
    background-color: #2a303c;
}
.inventory-row:last-child {
    border-bottom: none;
}
.inv-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background-color: #1a1f2b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    box-sizing: border-box;
    position: relative;
}
.inv-icon-img {
    width: 46px;
    height: 46px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.inventory-row.rarity-common .inv-icon { border-color: #aaa; }
.inventory-row.rarity-uncommon .inv-icon { border-color: #2ecc71; }
.inventory-row.rarity-rare .inv-icon { border-color: #2e86de; }
.inventory-row.rarity-epic .inv-icon { border-color: #9b59b6; }
.inventory-row.rarity-legendary .inv-icon { border-color: #f1c40f; }
.inv-info {
    flex: 1;
    min-width: 0;
}
.inv-name {
    font-weight: bold;
    margin-bottom: 2px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}
.inv-name-text {
    font-weight: bold;
}
.inv-class {
    font-size: 11px;
    font-weight: normal;
    color: #aaa;
}
.inv-stats {
    font-size: 10px;
    color: #aaa;
    word-break: break-word;
}
.inventory-row.empty-row .inv-icon {
    border: none;
    background: none;
}
.inv-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.inv-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background-color: #1a1f2b;
    border: 2px solid #aaa;
    color: #ccc;
    font-size: 9px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 4px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    text-transform: none;
}
.inv-action-btn:hover {
    background-color: #2a2f3a;
    border-color: #00aaff;
    color: #00aaff;
}
.sale-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    font-size: 8px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    line-height: 1.2;
    padding: 0 2px;
    box-sizing: border-box;
}

/* ========== МАГАЗИН СУНДУКОВ ========== */
.chest-table {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #232833;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}
.chest-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    border-bottom: 1px solid #2a303c;
    flex: 1;
    background-color: #232833;
}
.chest-row:nth-child(odd) {
    background-color: #232833;
}
.chest-row:nth-child(even) {
    background-color: #2a303c;
}
.chest-row:first-child {
    border-radius: 0;
}
.chest-row:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}
.chest-icon-col {
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chest-icon-col img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.chest-info-col {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.chest-name {
    font-weight: bold;
    font-size: 16px;
    color: white;
}
.chest-desc {
    font-size: 11px;
    color: #aaa;
    line-height: 1.3;
}
.chest-price-col {
    flex: 0 0 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.chest-buy-btn {
    background-color: #1a1f2b;
    border: 2px solid #aaa;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.chest-buy-btn i {
    color: #aaa;
    font-size: 14px;
}
.chest-buy-btn:hover {
    border-color: #00aaff;
    color: #00aaff;
}
.chest-buy-btn:hover i {
    color: #00aaff;
}

/* ========== МАРКЕТ ========== */
.market-page {
    background-color: #2a303c;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.market-filters-panel {
    background-color: #2a303c;
    padding: 12px;
    border-radius: 0;
    margin: 0;
    flex-shrink: 0;
}
.market-header {
    background-color: #2a303c;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 12px;
    color: white;
    border-radius: 0;
    margin: 0;
}
.market-items-header {
    background-color: #1a1f2b;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    padding: 12px;
    color: white;
    flex-shrink: 0;
    border-top: 1px solid #2a303c;
    border-bottom: 1px solid #2a303c;
}
.filters-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.filter-group {
    flex: 1;
    position: relative;
}
.filter-button {
    width: 100%;
    padding: 10px 12px;
    background-color: #2f3542;
    border: 1px solid #aaa;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-button:hover {
    background-color: #3a4050;
    border-color: #00aaff;
}
.filter-button i {
    color: #aaa;
    font-size: 12px;
}
.filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1f2b;
    border: 1px solid #aaa;
    border-radius: 8px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}
.filter-option {
    padding: 10px 12px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}
.filter-option:hover {
    background-color: #00aaff;
}
.apply-button-container {
    display: flex;
    justify-content: center;
    margin: 16px 0 8px 0;
}
.apply-filters-btn {
    background-color: #1a1f2b;
    border: 2px solid #aaa;
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: normal;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    width: 120px;
    display: block;
    margin: 0 auto;
}
.apply-filters-btn:hover {
    border-color: #00aaff;
    color: #00aaff;
}
.market-divider {
    height: 20px;
    background-color: #1a1f2b;
    margin: 0;
    flex-shrink: 0;
}
.market-items-container {
    flex: 1;
    overflow-y: auto;
    background-color: #232833;
    border-radius: 0;
    padding: 0;
}
.market-items-list {
    display: flex;
    flex-direction: column;
}
.market-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #2a303c;
    background-color: #232833;
    min-height: 70px;
}
.market-item-row:nth-child(even) {
    background-color: #2a303c;
}
.market-item-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background-color: #1a1f2b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}
.market-item-row.rarity-common .market-item-icon { border-color: #aaa; }
.market-item-row.rarity-uncommon .market-item-icon { border-color: #2ecc71; }
.market-item-row.rarity-rare .market-item-icon { border-color: #2e86de; }
.market-item-row.rarity-epic .market-item-icon { border-color: #9b59b6; }
.market-item-row.rarity-legendary .market-item-icon { border-color: #f1c40f; }
.item-icon-img {
    width: 46px;
    height: 46px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.market-item-info {
    flex: 1;
    min-width: 0;
}
.market-item-name {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 2px;
    color: white;
}
.item-class {
    font-size: 11px;
    font-weight: normal;
    color: #aaa;
}
.market-item-stats {
    font-size: 10px;
    color: #aaa;
    word-break: break-word;
}
.market-item-price {
    font-size: 14px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
    margin-right: 8px;
}
.market-item-price i {
    color: white;
    margin-left: 4px;
}
.market-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.market-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #1a1f2b;
    border: 2px solid #aaa;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.market-action-btn.view-btn {
    width: 88px;
}
.market-action-btn:hover {
    background-color: #2a2f3a;
    border-color: #00aaff;
    color: #00aaff;
}

/* ========== МОДАЛЬНЫЕ ОКНА (ПРЕДМЕТЫ) ========== */
.item-modal-content {
    text-align: center;
}
.item-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    background-color: #1a1f2b;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}
.item-modal-icon.common { border-color: #aaa; }
.item-modal-icon.uncommon { border-color: #2ecc71; }
.item-modal-icon.rare { border-color: #2e86de; }
.item-modal-icon.epic { border-color: #9b59b6; }
.item-modal-icon.legendary { border-color: #f1c40f; }
.item-modal-icon .item-icon {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.item-modal-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}
.item-modal-name.common { color: #aaa; }
.item-modal-name.uncommon { color: #2ecc71; }
.item-modal-name.rare { color: #2e86de; }
.item-modal-name.epic { color: #9b59b6; }
.item-modal-name.legendary { color: #f1c40f; }
.item-modal-class {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 8px;
}
.item-modal-stats {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 12px;
}
.item-modal-price {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
}
.item-modal-price i {
    color: white;
}
.item-modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.item-modal-btn {
    background-color: #2f3542;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}
.item-modal-btn:hover {
    background-color: #3a4050;
}
.edit-price-modal {
    text-align: center;
}
.edit-price-modal .item-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: white;
}
.edit-price-modal .current-price {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 16px;
}
.price-input {
    width: 80%;
    padding: 10px;
    background-color: #2f3542;
    border: 1px solid #aaa;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
}
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.modal-btn {
    background-color: #2f3542;
    border: none;
    padding: 8px 24px;
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}
.modal-btn:hover {
    background-color: #3a4050;
}

/* ========== ВКЛАДКИ ТОРГОВЛИ ========== */
.trade-tabs-container {
    background-color: #2a303c;
    border-radius: 12px 12px 0 0;
    padding: 2px;
    margin-bottom: 0;
    display: flex;
    gap: 2px;
}
.trade-tab {
    flex: 1;
    background-color: #232833;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0;
}
.trade-tab:first-child {
    border-radius: 12px 0 0 0;
}
.trade-tab:last-child {
    border-radius: 0 12px 0 0;
}
.trade-tab.active {
    background-color: #00aaff;
    color: white;
}
.trade-tab:not(.active):hover {
    background-color: #2f3542;
    color: #ccc;
}

/* ========== ФИЛЬТРЫ МАРКЕТА ========== */
.market-filters-container {
    margin-bottom: 20px;
}
.filters-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
}
.filter-group {
    flex: 1;
    position: static;
}
.filter-button {
    width: 100%;
    padding: 12px 10px;
    background-color: #232833;
    border: 1px solid #00aaff;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
}
.filter-button:hover {
    background-color: #2f3542;
}
.filter-button i {
    color: #00aaff;
    font-size: 12px;
}
.filter-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    width: auto;
    top: auto;
    background-color: #1a1f2b;
    border: 1px solid #00aaff;
    border-radius: 8px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,170,255,0.2);
    display: none;
}
.filter-option {
    padding: 12px 15px;
    color: white;
    cursor: pointer;
    border-bottom: 1px solid #2f3542;
    transition: background-color 0.2s;
}
.filter-option:last-child {
    border-bottom: none;
}
.filter-option:hover {
    background-color: #00aaff;
    color: white;
}
.stat-filter-btn {
    background-color: #2f3542;
    color: #aaa;
    border: 1px solid #00aaff;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.stat-filter-btn.active {
    background-color: #00aaff;
    color: white;
    border-color: #00aaff;
}

/* Уведомление (тост) */
.market-toast {
    position: fixed;
    top: 60px;
    left: 10px;
    right: 10px;
    background-color: #2a303c;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-left: 4px solid #00aaff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    word-break: break-word;
}
.market-toast.show {
    opacity: 1;
}

/* ========== РЕЙТИНГ ========== */
.rating-page {
    background-color: #2a303c;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.rating-tabs-container {
    background-color: #2a303c;
    border-radius: 12px 12px 0 0;
    padding: 2px;
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}
.rating-tab {
    flex: 1;
    background-color: #232833;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0;
}
.rating-tab:first-child {
    border-radius: 12px 0 0 0;
}
.rating-tab:last-child {
    border-radius: 0 12px 0 0;
}
.rating-tab.active {
    background-color: #00aaff;
    color: white;
}
.rating-tab:not(.active):hover {
    background-color: #2f3542;
    color: #ccc;
}
.rating-content-container {
    flex: 1;
    overflow-y: auto;
    background-color: #232833;
    border-radius: 0 0 12px 12px;
    padding: 0;
}
#ratingContent {
    padding: 0;
}
#ratingContent .stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}
#ratingContent .stats-table th {
    background-color: #1a1f2b;
    color: white;
    font-weight: bold;
    padding: 12px 8px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 2;
}
#ratingContent .stats-table th:first-child {
    text-align: center;
}
#ratingContent .stats-table td {
    padding: 10px 8px;
    text-align: left;
}
#ratingContent .stats-table td:first-child {
    text-align: center;
}
#ratingContent .stats-table tbody tr:nth-child(odd) {
    background-color: #232833;
}
#ratingContent .stats-table tbody tr:nth-child(even) {
    background-color: #2a303c;
}

/* ========== АДВЕНТ-КАЛЕНДАРЬ ========== */
.advent-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin: 15px 0;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}
.advent-day {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    font-size: 10px;
    border: none;
    background-color: transparent;
}
.advent-day > div:first-child {
    font-size: 10px;
    margin-bottom: 2px;
}
.advent-day > div:last-child {
    font-size: 14px;
    line-height: 1;
}
.advent-day.available {
    background-image: url('/assets/icons/advent_available.png');
    color: white;
}
.advent-day.locked {
    background-image: url('/assets/icons/advent_locked.png');
    color: #aaa;
}
.advent-day.claimed {
    background-image: url('/assets/icons/advent_claimed.png');
    cursor: default;
    color: #aaa;
}
@media (max-width: 400px) {
    .advent-day > div:last-child {
        font-size: 12px;
    }
}

/* ========== КРУГЛЫЕ КНОПКИ ========== */
.round-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #232833;
    border: 2px solid #00aaff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.round-button:hover {
    transform: scale(1.05);
}
.round-button i {
    font-size: 30px;
    color: #00aaff;
    margin-bottom: 4px;
}
.round-button span {
    font-size: 10px;
    color: white;
    text-align: center;
}

/* ========== КУЗНИЦА (продолжение) ========== */
.forge-container {
    background-color: #232833;
    border-radius: 12px;
    overflow: hidden;
    padding: 5px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
.forge-banner {
    width: 100%;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-bottom: 5px;
    flex-shrink: 0;
}
.forge-banner img {
    width: 100%;
    height: auto;
    display: block;
}
.forge-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    flex-shrink: 0;
}
.forge-tab {
    flex: 1;
    background-color: #2f3542;
    color: #aaa;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: none;
}
.forge-tab.active {
    background-color: #00aaff;
    color: white;
}
#forgeHelpBtn {
    color: #00aaff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
}
.forge-slots-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-shrink: 0;
}
.forge-slot {
    width: 60px;
    height: 60px;
    background-color: #2f3542;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #aaa;
    cursor: pointer;
    overflow: hidden;
}
.forge-slot img {
    max-width: 100%;
    max-height: 100%;
}
.forge-slot span {
    color: #aaa;
    font-size: 11px;
}
.forge-slot[data-rarity="common"] { border-color: #aaa; }
.forge-slot[data-rarity="uncommon"] { border-color: #2ecc71; }
.forge-slot[data-rarity="rare"] { border-color: #2e86de; }
.forge-slot[data-rarity="epic"] { border-color: #9b59b6; }
.forge-slot[data-rarity="legendary"] { border-color: #f1c40f; }
#forgeActionBtn {
    width: 100%;
    background-color: #2f3542;
    color: #aaa;
    border: none;
    padding: 12px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 5px;
    transition: none;
    flex-shrink: 0;
}
#forgeActionBtn:not(:disabled):hover {
    background-color: #3a4050;
}
#forgeActionBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.forge-inventory-header {
    background-color: #1a1f2b;
    padding: 8px 0;
    text-align: center;
    font-weight: bold;
    color: white;
    margin: 0 0 5px 0;
    border-radius: 0;
    width: 100%;
    flex-shrink: 0;
}
#forgeInventory {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    margin-top: 0;
}
#forgeInventory::-webkit-scrollbar {
    width: 6px;
}
#forgeInventory::-webkit-scrollbar-track {
    background: #1a1f2b;
}
#forgeInventory::-webkit-scrollbar-thumb {
    background: #00aaff;
    border-radius: 3px;
}
#forgeInventory .inventory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background-color: #232833;
    border-left: none;
    transition: none;
    flex-shrink: 0;
}
#forgeInventory .inventory-item:nth-child(even) {
    background-color: #2a303c;
}
#forgeInventory .inventory-item:hover {
    background-color: inherit !important;
    transform: none !important;
    cursor: default !important;
}
#forgeInventory .inventory-item.empty-row .item-icon,
#forgeInventory .inventory-item.empty-row .item-content,
#forgeInventory .inventory-item.empty-row .inv-action-btn {
    display: none;
}
#forgeInventory .item-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background-color: #1a1f2b;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 2px solid;
}
#forgeInventory .inventory-item.rarity-common .item-icon { border-color: #aaa; }
#forgeInventory .inventory-item.rarity-uncommon .item-icon { border-color: #2ecc71; }
#forgeInventory .inventory-item.rarity-rare .item-icon { border-color: #2e86de; }
#forgeInventory .inventory-item.rarity-epic .item-icon { border-color: #9b59b6; }
#forgeInventory .inventory-item.rarity-legendary .item-icon { border-color: #f1c40f; }
#forgeInventory .item-content {
    flex: 1;
    text-align: left;
}
#forgeInventory .item-name {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 2px;
}
#forgeInventory .item-name .rarity-badge {
    font-size: 11px;
    font-weight: normal;
    color: #aaa;
    margin-left: 5px;
}
#forgeInventory .item-stats {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 2px;
}
#forgeInventory .item-rarity {
    display: none;
}
#forgeInventory .inv-action-btn {
    flex-shrink: 0;
    width: 70px;
    height: 52px;
    background-color: #2f3542;
    border: 2px solid #aaa;
    border-radius: 8px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
#forgeInventory .inv-action-btn:hover {
    background-color: #3a4050;
    border-color: #00aaff;
    color: #00aaff;
}

/* ========== ЕЖЕДНЕВНЫЕ ЗАДАНИЯ ========== */
.tasks-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    margin: 0 !important;
    width: 100% !important;
    background-color: #2a303c;
    min-height: 100%;
}
.tasks-header {
    background-color: #1a1f2b;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    margin: 0;
    flex-shrink: 0;
}
.tasks-container > .task-card:first-child {
    flex-shrink: 0;
}
#referralPlaceholder {
    flex-shrink: 0;
}
.task-card {
    transition: background-color 0.2s;
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid #1a1f2b;
}
.task-card:hover {
    background-color: #2f3542 !important;
}
.claim-task-btn {
    background-color: transparent;
    border: 2px solid #7f8c8d;
    color: #7f8c8d;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.claim-task-btn.active {
    background-color: #00aaff;
    border-color: #00aaff;
    color: white;
}
.claim-task-btn:not(.active):hover {
    background-color: #3a4050;
    border-color: #aaa;
    color: #aaa;
}
.advent-eye-btn {
    background-color: transparent;
    border: 2px solid #7f8c8d;
    border-radius: 30px;
    color: #7f8c8d;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    width: 100%;
    font-size: 14px;
}
.advent-eye-btn:hover {
    background-color: #3a4050;
    border-color: #aaa;
    color: #aaa;
}
.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a303c;
    border-radius: 0 0 12px 12px;
    margin: 0;
    padding: 0;
    flex: 0 0 auto !important;
    margin-top: 0 !important;
   }
.countdown-card {
    background-color: #2a303c;
    padding: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border: none;
    border-radius: 0;
}
.countdown-message {
    font-size: 18px;
    font-weight: bold;
    color: #00aaff;
    margin-bottom: 20px;
}
.countdown-timer-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.countdown-label {
    font-size: 14px;
    color: #aaa;
}
.countdown-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.digit-box {
    background-color: #1a1f2b;
    border: 1px solid #aaa;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}
.digit-value {
    font-size: 38px;
    font-weight: bold;
    color: #aaa;
    line-height: 1;
    margin-bottom: 4px;
}
.digit-unit {
    font-size: 12px;
    font-weight: normal;
    color: #aaa;
    text-transform: lowercase;
}
.colon {
    font-size: 38px;
    font-weight: bold;
    color: #aaa;
    line-height: 1;
    margin: 0;
}

/* ========== БАШНЯ ========== */
.tower-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.tower-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #1a1f2b;
    padding: 10px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    box-shadow: none;
}
.header-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 10px;
}
.grid-left, .grid-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.grid-item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.grid-item .header-label {
    font-size: 14px;
    color: #aaa;
}
.grid-item .header-value {
    font-size: 18px;
    font-weight: bold;
    color: white;
}
.tower-floors {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    background-color: #232833;
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}
.tower-floor {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 70px;
    background-color: rgba(35,40,51,0.9);
    border: none;
    margin: 0;
    padding: 0;
}
.tower-floor.first-floor {
    height: 117px;
}
.tower-floor.active {
    border: 2px solid #00aaff;
    box-sizing: border-box;
    border-radius: 12px;
}
.tower-floor.active .floor-number {
    color: white;
}
.floor-left {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
}
.floor-number {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}
.floor-number.small {
    font-size: 18px;
}
.floor-text {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
}
.floor-center {
    width: 300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.floor-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.start-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
}
.floor-right {
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.floor-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: white;
}
.coins-reward i {
    font-size: 20px;
    margin-bottom: 2px;
}
.coins-reward .reward-amount {
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.skin-reward .reward-icon {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 2px;
}
.skin-reward .reward-label {
    font-size: 9px;
    color: white;
    text-transform: uppercase;
}
.tower-floor:not(.active) .floor-center img {
    filter: grayscale(1);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.tower-floor.active .floor-center img {
    filter: none;
    opacity: 1;
}
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}
.tutorial-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0;
    width: 100%;
    max-width: 400px;
    align-items: end;
    margin: 0 auto;
}
.tutorial-left {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100%;
}
.tutorial-cat {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
}
.tutorial-right {
    background-color: rgba(35,40,51,0.95);
    border-radius: 10px;
    padding: 15px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.dialog-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.dialog-text {
    color: white;
    font-size: 14px;
    line-height: 1.4;
}
.dialog-text p {
    margin: 5px 0;
}
.tutorial-btn {
    background-color: #2f3542;
    border: 2px solid #00aaff;
    color: white;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    text-align: center;
}
.tutorial-btn:hover:not(:disabled) {
    background-color: #3a4050;
}
.tutorial-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tutorial-btn.selected {
    background-color: #00aaff;
    border-color: white;
}
.next-btn {
    align-self: flex-end;
    min-width: 100px;
}
.class-buttons, .role-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.class-buttons .tutorial-btn, .role-buttons .tutorial-btn {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.dialog-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.back-btn, .confirm-btn {
    flex: 1;
}
.tower-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}
.tower-result-btn {
    background-color: #2f3542;
    border: 2px solid #00aaff;
    color: white;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    width: 100%;
    text-align: center;
}
.tower-result-btn:hover:not(:disabled) {
    background-color: #3a4050;
}
.tower-result-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.tower-result-btn.active {
    background-color: #00aaff;
    border-color: white;
}
.reward-line {
    text-align: center;
    font-size: 18px;
    margin: 10px 0;
    line-height: 1.5;
}
.reward-line span {
    display: block;
}
.reward-value {
    font-size: 20px;
    font-weight: bold;
    margin-top: 5px;
}
#towerHelpBtn {
    color: #00aaff;
    font-size: 28px;
    cursor: pointer;
    transition: opacity 0.2s;
}
#towerHelpBtn:hover {
    opacity: 0.8;
}
.battle-timer {
    font-size: 14px;
    font-weight: normal;
}

/* ========== МОДАЛЬНЫЕ ОКНА (ОСНОВНЫЕ) ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background-color: #1a1f2b;
    margin: auto;
    padding: 20px;
    border: 1px solid #00aaff;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
    position: relative;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00aaff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.modal-header h2 {
    margin: 0;
    color: #00aaff;
    text-align: center;
    width: 100%;
    font-size: 1.3rem;
}
.modal-body {
    padding: 15px 20px 20px 20px;
    max-height: 70vh;
    overflow-y: auto;
}
.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 15px;
}
.close:hover,
.close:focus {
    color: #00aaff;
    text-decoration: none;
}

/* ========== ЗАТЕМНЕНИЕ ДЛЯ КАРТОЧЕК НА ФОНЕ ========== */
.chest-card,
.inventory-item,
.market-item,
.skill-item,
.role-card,
.equip-slot,
.forge-slot,
.round-button,
.btn {
    background-color: rgba(35, 40, 51, 0.9);
    backdrop-filter: blur(2px);
    transition: background-color 0.2s;
}
.chest-card:hover,
.inventory-item:hover,
.market-item:hover,
.role-card:hover,
.equip-slot:hover,
.forge-slot:hover,
.round-button:hover,
.btn:hover {
    background-color: rgba(45, 50, 61, 0.95);
}
.top-bar,
.bottom-menu,
.battle-log {
    background-color: rgba(35, 40, 51, 0.9);
    backdrop-filter: blur(2px);
}

/* ========== ДОПОЛНИТЕЛЬНО (ПРОЧЕЕ) ========== */
#tasksList {
    display: block;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
}
#countdownContainer {
    flex-shrink: 0;
}
.power {
    display: flex;
    align-items: center;
    gap: 5px;
}
.power i {
    color: #00aaff;
    margin-right: 5px;
}
.power span {
    font-weight: bold;
    color: white;
}
.result-tab {
    background-color: #2f3542;
    color: #aaa;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}
.result-tab.active {
    background-color: #00aaff;
    color: white;
}
.hp-bar, .mana-bar {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
.battle-result .stats-battle {
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
    width: 100%;
}
.battle-result .stats-battle th {
    background-color: #1a1f2b;
    color: white;
    font-weight: bold;
    padding: 10px 5px;
    text-align: center;
}
.battle-result .stats-battle td {
    width: 33.33%;
    text-align: center;
}
.battle-result .stats-battle tbody tr:nth-child(odd) {
    background-color: #232833;
}
.battle-result .stats-battle tbody tr:nth-child(even) {
    background-color: #2a303c;
}
.stats-battle .player-col {
    color: #00aaff;
    font-weight: bold;
}
.stats-battle .enemy-col {
    color: #e74c3c;
    font-weight: bold;
}

/* ========== ЗАСТАВКА ЗАГРУЗКИ ========== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/splash-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
#splash-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}
.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 15vh;
    color: white;
    max-width: 80%;
}
.splash-title {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.splash-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ========== АНИМАЦИИ БОЯ ========== */
.animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    z-index: 10;
}
.animation-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.floating-numbers-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}
.floating-number {
    font-family: 'Titillium Web', sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.5);
    opacity: 1;
    animation: floatFade 2s ease-out forwards;
}
.floating-number.red {
    color: #ff4444 !important;
}
.floating-number.green {
    color: #44ff44 !important;
}
.floating-number .floating-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-left: 2px;
}
@keyframes floatFade {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%) scale(1);
    }
}

/* ========== РЕЗУЛЬТАТ БОЯ ========== */
.battle-result {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #232833;
    overflow: hidden;
}
.battle-result-header {
    background-color: #1a1f2b;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    margin: 0;
    flex-shrink: 0;
    color: white !important;
}
.battle-result-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    background-color: #2a303c;
    padding: 16px 20px;
    align-items: center;
    font-size: 16px;
    flex-shrink: 0;
}
.reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    line-height: 1.4;
}
.reward-item i {
    color: #00aaff;
    width: 24px;
    text-align: center;
    font-size: 18px;
}
.reward-item span {
    font-weight: normal;
    color: white;
}
.reward-item span strong {
    font-weight: bold;
    color: #ffaa00;
}
.battle-result-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #2a303c;
    padding: 5px;
    gap: 2px;
    flex-shrink: 0;
}
.result-btn {
    background-color: #232833;
    border: none;
    padding: 14px 0;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: none;
    pointer-events: auto;
    z-index: 2;
}
.result-btn:first-child {
    border-radius: 12px 0 0 0;
}
.result-btn:nth-child(2) {
    border-radius: 0 12px 0 0;
}
.result-btn:nth-child(3) {
    border-radius: 0 0 0 12px;
}
.result-btn:last-child {
    border-radius: 0 0 12px 0;
}
.result-btn.active {
    background-color: #00aaff;
    color: white;
}
.result-btn:not(.active):hover {
    background-color: #2f3542;
    color: #ccc;
}
.battle-result-content {
    flex: 1;
    overflow-y: auto;
    background-color: #232833;
    padding: 0;
    margin: 0;
}
.battle-result-content .log-entry {
    padding: 8px 12px;
    border-bottom: 1px solid #2a303c;
}
.stats-battle {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
    padding: 0;
    background-color: #232833;
}
.stats-battle thead tr {
    background-color: #1a1f2b;
}
.stats-battle th {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    color: white;
    border-bottom: 1px solid #2a303c;
}
.stats-battle tbody tr {
    background-color: #232833;
}
.stats-battle tbody tr:nth-child(even) {
    background-color: #2a303c;
}
.stats-battle td {
    padding: 10px 8px;
    text-align: center;
    border: none;
}
.stats-battle .player-col {
    color: #00aaff;
    font-weight: bold;
}
.stats-battle .enemy-col {
    color: #e74c3c;
    font-weight: bold;
}

/* ========== ГЛАВНАЯ СТРАНИЦА ========== */
.main-top-container {
    background-color: transparent;
    padding: 0;
    margin-bottom: 10px;
}
.main-top-inner {
    background-color: #2a303c;
    border-radius: 16px;
    display: flex;
    gap: 2px;
    padding: 2px;
    height: 180px;
}
.main-buttons-col {
    flex: 1;
    display: flex;
}
.btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 2px;
    background-color: #2a303c;
    width: 100%;
    height: 100%;
}
.main-buttons-col.left {
    border-radius: 12px 0 0 12px;
    overflow: hidden;
}
.main-buttons-col.left .btn-grid {
    overflow: visible;
    border-radius: 0;
}
.main-buttons-col.right {
    border-radius: 0 12px 12px 0;
    overflow: hidden;
}
.main-buttons-col.right .btn-grid {
    overflow: visible;
    border-radius: 0;
}
.main-icon-btn {
    background-color: #232833;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #aaa;
    font-size: 11px;
    font-weight: normal;
    padding: 0;
    border-radius: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.main-icon-btn i {
    font-size: 20px;
    color: #aaa;
}
.main-icon-btn span {
    font-size: 10px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}
.main-icon-btn:hover {
    background-color: #2f3542;
}
.main-icon-btn:hover i {
    color: #00aaff;
}
.main-icon-btn:hover span {
    color: white;
}
.main-icon-btn.empty-btn {
    background-color: #232833;
    cursor: default;
}
.main-icon-btn.empty-btn:hover {
    background-color: #232833;
}
.main-icon-btn.empty-btn i,
.main-icon-btn.empty-btn span {
    display: none;
}
.main-avatar-col {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a303c;
}
.hero-avatar {
    width: 100%;
    height: 100%;
    position: relative;
}
.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.main-username-header {
    background-color: #1a1f2b;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 12px;
    border-radius: 12px 12px 0 0;
    margin: 0;
    color: white;
}
.main-content-container {
    background-color: #232833;
    border-radius: 0 0 12px 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Убираем растяжение таймера, чтобы он шёл сразу после контента */
.countdown-container {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
}

/* ========== СТРАНИЦА НАСТРОЕК ========== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}
.settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #2a303c;
    padding: 12px;
    border-radius: 12px;
}
.settings-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.settings-username {
    font-size: 18px;
    font-weight: bold;
    color: white;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2a303c;
    padding: 12px;
    border-radius: 12px;
}
.settings-row span {
    color: white;
    font-size: 16px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #00aaff;
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.settings-section {
    background-color: #2a303c;
    padding: 12px;
    border-radius: 12px;
}
.settings-section h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #00aaff;
}
.connections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.connection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #3a4050;
}
.connection-row span:first-child {
    font-weight: bold;
}
.connection-row button {
    background-color: #2f3542;
    border: 1px solid #aaa;
    border-radius: 20px;
    padding: 4px 12px;
    color: #aaa;
    cursor: pointer;
}
.connection-row button:hover {
    border-color: #00aaff;
    color: #00aaff;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* ========== ОКНО ВХОДА (СТИЛИ ДЛЯ КНОПОК) ========== */
.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background-color: #2a303c;
    border: 1px solid #aaa;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-btn i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.auth-btn:hover {
    background-color: #3a404e;
    border-color: #00aaff;
}

/* Цветные иконки (опционально) */
.telegram-btn i { color: #26A5E4; }
.google-btn i { color: #DB4437; }
.vk-btn i { color: #4680C2; }
.email-btn i { color: #00aaff; }

/* Поля ввода и кнопки в email-форме */
.auth-input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    background-color: #2a303c;
    border: 1px solid #aaa;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.auth-submit-btn {
    background-color: #00aaff;
    border: none;
    border-radius: 30px;
    padding: 10px 16px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.auth-submit-btn:hover {
    background-color: #0088cc;
}


/* Изменить имя пользователя */

.nickname-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2a303c;
    padding: 12px;
    border-radius: 12px;
}
.nickname-value {
    flex: 1;
    text-align: center;
    color: white;
    font-weight: bold;
}
.edit-nickname-btn {
    background-color: #2f3542;
    border: 1px solid #aaa;
    border-radius: 20px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: #aaa;
    transition: all 0.2s;
}
.edit-nickname-btn:hover {
    border-color: #00aaff;
    color: #00aaff;
}
