/* ======================================================================
   redesign.css - Sahel Market theme (Banani-generated)
   Loads LAST - overrides existing styles
   DO NOT TOUCH: inventory modals, auction, mail
   ====================================================================== */

/* ----------------------------------------------------------------------
   GLOBAL OVERRIDES
   ---------------------------------------------------------------------- */
.app-container {
    background-color: var(--primary-color, #0e0d0c);
    color: var(--text-primary, #f6e2c9);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ----------------------------------------------------------------------
   SCREEN HEADER (all screens)
   ---------------------------------------------------------------------- */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}
.screen-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    width: 32px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 99px;
}
.screen-header h2 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin: 0;
}

/* Close button */
.btn-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--card-bg, #161515);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.15s, border-color 0.15s;
}
.btn-close:active {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

/* ----------------------------------------------------------------------
   GLOBAL HUD (top bar: HP + Energy)
   ---------------------------------------------------------------------- */
.global-hud {
    display: flex;
    flex-flow: row nowrap;
    gap: 32px;
    align-items: center;
    justify-content: flex-start;
    background: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.hud-stat {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.hud-health { color: #ff4757; }
.hud-energy { color: #ffa502; }
.hud-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    position: absolute;
    right: 16px;
}
.hud-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-md);
    transition: color 0.2s, background 0.2s;
}
.hud-icon-btn:active {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

/* ----------------------------------------------------------------------
   BOTTOM NAVBAR
   ---------------------------------------------------------------------- */
.bottom-navbar {
    position: fixed;
    bottom: var(--statusbar-height, 32px);
    left: 0;
    right: 0;
    height: 64px;
    background: var(--card-bg, #161515);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 999;
}
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    position: relative;
    padding-top: 4px;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}
.nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-btn.active { color: var(--accent-color); }
.nav-btn.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 0 0 4px 4px;
}

/* ----------------------------------------------------------------------
   SERVER STATUS BAR
   ---------------------------------------------------------------------- */
.server-status-bar {
    background: var(--primary-color);
    border-top: 1px solid var(--border-color);
}
#serverStatusText {
    color: var(--text-muted);
}
.players-online {
    color: var(--text-primary);
}

/* ======================================================================
   MAIN MENU
   ====================================================================== */

/* Hero banner */
.menu-hero {
    height: 220px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin: 6px 0 12px;
}
.menu-hero-bg {
    opacity: 0.5;
    object-fit: cover;
    object-position: center 70%;
    filter: saturate(0.8) brightness(0.7);
}
.menu-hero-gradient {
    background: linear-gradient(
        to bottom,
        rgba(14,13,12,0.05) 0%,
        rgba(14,13,12,0.4) 40%,
        rgba(14,13,12,0.98) 100%
    );
}
.menu-hero-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.9), 0 0 40px rgba(255,176,46,0.25);
    margin: 0 0 2px;
    line-height: 1;
}
.menu-hero-sub {
    font-size: 0.65rem;
    color: rgba(255,176,46,0.75);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* Menu sections */
.menu-section-icon { color: var(--text-muted); }
.menu-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Menu cards */
.menu-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 7px 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.menu-card:active {
    background: var(--elevated-color);
    border-color: var(--accent-color);
}
.menu-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--elevated-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--text-secondary);
}
.menu-card--combat .menu-card-icon {
    background: rgba(255,176,46,0.1);
    color: var(--accent-color);
}
.menu-card--rare .menu-card-icon {
    background: rgba(96,165,250,0.1);
    color: #60a5fa;
}
.menu-card--secret .menu-card-icon {
    background: rgba(192,132,252,0.1);
    color: #c084fc;
}
.menu-card--disabled {
    opacity: 0.35;
    border-style: dashed;
    cursor: default;
    pointer-events: none;
}

/* ======================================================================
   SHOP (Banani Tactical Menu)
   ====================================================================== */

/* Currency display */
#shopScreen .currency-display {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 0;
    margin: 0 0 10px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    justify-content: flex-end;
}
#shopScreen .currency {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(14,13,12,0.9);
    border: 1px solid var(--border-color);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 0;
}
#shopScreen .currency:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
#shopScreen .currency:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
#shopScreen .currency-icon { font-size: 0.85rem; color: var(--accent-color); }

/* Segmented control (Buy / Sell) */
.shop-tabs {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
    gap: 0;
}
.shop-tabs .tab-btn {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: none;
    transition: all 0.15s;
}
.shop-tabs .tab-btn.active {
    background: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    border-bottom: none;
}

/* Vendor tabs (underline style) */
.shop-traders {
    display: flex;
    overflow-x: auto;
    padding: 0 0 8px;
    gap: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
    flex-wrap: nowrap;
}
.shop-traders::-webkit-scrollbar { display: none; }
.shop-trader-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap;
    padding: 0 0 10px !important;
    margin-bottom: -1px;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    cursor: pointer;
    background: transparent !important;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}
.shop-trader-btn.active {
    color: var(--accent-color) !important;
    border-bottom-color: var(--accent-color) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Category (sub) tabs */
.shop-subtabs {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 0 0 6px;
    margin-bottom: 16px;
    border-bottom: none;
    scrollbar-width: none;
    flex-wrap: nowrap;
}
.shop-subtabs::-webkit-scrollbar { display: none; }
.shop-subtabs .tab-btn {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding: 0 0 6px;
    cursor: pointer;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    flex-shrink: 0;
    transition: color 0.15s;
}
.shop-subtabs .tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: transparent;
}

/* Filter chips (Rarity) */
.shop-filters-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
}
.shop-filters-bar::-webkit-scrollbar { display: none; }
.shop-filter-btn {
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.shop-filter-btn.active {
    background: rgba(255,176,46,0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Shop items grid */
#shopItemsContainer.inventory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-bottom: 80px;
}

/* Shop background */
#shopScreen {
    background-image: url('../../assets/bg-shop.webp');
    background-size: cover;
    background-position: center top;
    background-attachment: local;
}
#shopScreen::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(14,13,12,0.9);
    pointer-events: none;
    z-index: 0;
}
#shopScreen > * { position: relative; z-index: 1; }

/* ======================================================================
   CHARACTER
   ====================================================================== */

.char-page {
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 100px;
}

.char-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
}
.char-section-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}
.char-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(37,42,54,0.3);
    font-size: 0.85rem;
}
.char-stat-row:last-child { border-bottom: none; }
.char-stat-label { color: var(--text-secondary); }
.char-stat-value { font-weight: 700; color: var(--text-primary); }

.char-equip-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-equip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--elevated-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: border-color 0.15s;
}
.btn-equip:active { border-color: var(--accent-color); }
.equip-count {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

/* Exp bar */
.char-exp-bar-wrap {
    height: 6px;
    background: rgba(0,0,0,0.4);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.char-exp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent-color));
    border-radius: 3px;
    transition: width 0.5s ease;
}
.char-exp-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Currency rows */
.char-currencies {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.char-currency-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(37,42,54,0.3);
    font-size: 0.85rem;
}
.char-currency-row:last-child { border-bottom: none; }
.char-currency-icon { font-size: 1rem; }
.char-currency-icon.rare { color: #60a5fa; }
.char-currency-icon.unique { color: var(--accent-color); }
.char-currency-label { flex: 1; color: var(--text-secondary); }
.char-currency-amount { font-weight: 700; color: var(--text-primary); }

/* ======================================================================
   EQUIPMENT (Armor/Weapon slots)
   ====================================================================== */

.subpanel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    flex-shrink: 0;
    margin-bottom: 4px;
}

/* === NEW EQUIPMENT LAYOUT v2 === */
.equip-new-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
}

/* Big avatar with gear overlays */
.equip-avatar-big {
    position: relative;
    width: min(280px, 72vw);
    height: min(360px, 92vw);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid rgba(255,176,46,0.25);
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(20,18,16,0.9) 100%);
    box-shadow: 0 4px 32px rgba(0,0,0,0.6), 0 0 24px rgba(255,176,46,0.06);
    flex-shrink: 0;
}
.equip-avatar-big .equip-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    display: block;
}
.equip-avatar-big .equip-avatar-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.equip-avatar-big .equip-avatar-overlay .gear-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    opacity: 0.8;
    mix-blend-mode: screen;
}
.equip-avatar-big .equip-avatar-overlay .gear-weapon {
    inset: auto;
    bottom: 8px;
    right: -4px;
    width: 65%;
    height: auto;
    object-fit: contain;
    object-position: center;
    opacity: 0.92;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.8));
    mix-blend-mode: normal;
}

/* Row of slot icons below avatar */
.equip-slots-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 360px;
}
.equip-slot-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: rgba(14,13,12,0.85);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.equip-slot-icon img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    filter: brightness(1.1);
}
.equip-slot-icon .slot-emoji {
    font-size: 1.4rem;
    opacity: 0.4;
}
.equip-slot-icon.has-item {
    border-color: rgba(255,176,46,0.35);
    box-shadow: 0 0 8px rgba(255,176,46,0.1);
}
.equip-slot-icon.has-item:active {
    transform: scale(0.95);
    border-color: rgba(255,176,46,0.6);
}
.equip-slot-icon.is-empty {
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.01),
        rgba(255,255,255,0.01) 3px,
        transparent 3px,
        transparent 8px
    );
    border: 1px dashed rgba(37,42,54,0.8);
    opacity: 0.5;
}
.equip-slot-icon.is-empty:active {
    border-color: rgba(255,176,46,0.4);
    opacity: 1;
}
.equip-slot-icon .slot-label {
    position: absolute;
    bottom: 1px;
    left: 0; right: 0;
    text-align: center;
    font-size: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(138,130,121,0.6);
    pointer-events: none;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 4px 0 1px;
}
/* Rarity glow on slot icons */
.equip-slot-icon.rarity-cell-rare { border-color: rgba(96,165,250,0.5); box-shadow: 0 0 6px rgba(96,165,250,0.15); }
.equip-slot-icon.rarity-cell-epic { border-color: rgba(168,85,247,0.5); box-shadow: 0 0 6px rgba(168,85,247,0.15); }
.equip-slot-icon.rarity-cell-legendary { border-color: rgba(255,176,46,0.5); box-shadow: 0 0 6px rgba(255,176,46,0.15); }
.equip-slot-icon .item-enhance-badge {
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.55rem;
    font-weight: 800;
}
.equip-slot-icon .item-mech-star {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 0.55rem;
}

/* Legacy compat - keep old avatar styles for backward compat */
.equip-avatar-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.equip-avatar-icon { font-size: 2rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }

/* Slot cell */
.equip-slot-cell {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border-color);
    background: rgba(14,13,12,0.8);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.18s ease;
    padding: 4px;
    overflow: hidden;
}
.equip-slot-cell::before,
.equip-slot-cell::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.equip-slot-cell::before {
    top: 2px; left: 2px;
    border-top: 1.5px solid var(--accent-color);
    border-left: 1.5px solid var(--accent-color);
    border-radius: 2px 0 0 0;
}
.equip-slot-cell::after {
    bottom: 2px; right: 2px;
    border-bottom: 1.5px solid var(--accent-color);
    border-right: 1.5px solid var(--accent-color);
    border-radius: 0 0 2px 0;
}
.equip-slot-cell:hover:not(.is-empty) {
    transform: scale(1.04);
    border-color: rgba(255,176,46,0.45);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.equip-slot-cell:hover:not(.is-empty)::before,
.equip-slot-cell:hover:not(.is-empty)::after { opacity: 1; }

.equip-slot-cell.is-empty {
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.01),
        rgba(255,255,255,0.01) 3px,
        transparent 3px,
        transparent 8px
    );
    border: 1px dashed rgba(37,42,54,0.8);
    opacity: 0.6;
}
.equip-slot-cell.is-empty:active {
    border-color: rgba(255,176,46,0.4);
    opacity: 1;
}
.equip-slot-cell .item-icon {
    width: min(54px, 14vw);
    height: min(54px, 14vw);
    font-size: 1.6rem;
    border: none;
    background: transparent;
}
.equip-slot-cell .item-name {
    font-size: 0.6rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    color: var(--text-secondary);
    margin-top: 1px;
}
.equip-slot-type-label {
    position: absolute;
    bottom: 4px;
    left: 0; right: 0;
    text-align: center;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(138,130,121,0.5);
    pointer-events: none;
}
.equipment-layout { gap: 10px; margin-top: 8px; }
.equip-bottom { gap: 10px; padding-top: 4px; }

/* ======================================================================
   ARENA
   ====================================================================== */

.arena-page {
    padding: 0 var(--spacing-md);
    padding-bottom: 120px;
}
.arena-page-header {
    text-align: center;
    padding: 16px 16px 12px;
}
.arena-page-title {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    margin: 0;
}
.arena-page-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 4px 0 0;
}

/* Reputation card */
.arena-reputation-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}
.arena-reputation-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.arena-reputation-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.arena-reputation-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    margin: 4px 0 2px;
}
.arena-reputation-sub {
    font-size: 11px;
    color: var(--text-muted);
}
.arena-rank-badge {
    text-align: center;
    background: rgba(255,176,46,0.08);
    border: 1px solid rgba(255,176,46,0.25);
    border-radius: var(--radius-md);
    padding: 8px 14px;
}
.arena-rank-badge-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.arena-rank-badge-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-color);
}
.arena-rep-mini-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Divider */
.arena-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 16px;
}
.arena-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}
.arena-divider-text {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Arena cards */
.arena-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.arena-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
}
.arena-card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--elevated-color);
}
.arena-card-title-block h3 {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
}
.arena-card-title-block p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 0;
}
.arena-card-rating-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--elevated-color);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}
.arena-card-body {
    padding: 12px 14px;
}
.arena-card-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.arena-card-stat-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.arena-card-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}
.arena-card-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    min-height: 44px;
    transition: opacity 0.15s;
}
.arena-card-btn:active { opacity: 0.85; }

.arena-warning-footer {
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 0;
}

/* Arena lobby */
.arena-lobby-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}
.arena-lobby-status {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0;
}
.arena-lobby-count {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent-color);
}

/* ======================================================================
   SAFARI
   ====================================================================== */

.safari-container {
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}
.safari-location-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 12px;
}
.safari-progress-bar {
    height: 8px;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent-color));
    border-radius: 4px;
    transition: width 0.4s ease;
}
.safari-step-counter {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 6px;
    letter-spacing: 0.5px;
}
.safari-event {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
}
.event-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.event-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 12px;
}
.event-image {
    text-align: center;
    padding: 16px;
    margin-bottom: 12px;
}
#eventEmoji {
    font-size: 48px;
}
.safari-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-safari-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--elevated-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-height: 44px;
    transition: border-color 0.15s;
}
.btn-safari-option:active {
    border-color: var(--accent-color);
}
.option-chance {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
}

/* Safari outcome banner */
.safari-outcome-banner {
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

/* Reward screen */
.reward-container {
    text-align: center;
    padding: 40px var(--spacing-md);
}
.reward-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 8px;
}
.reward-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.reward-details {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 32px;
}
.reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
}
.reward-icon { font-size: 20px; }
.reward-value { color: var(--accent-color); }

/* Locations grid */
.locations-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}

/* ======================================================================
   RAID
   ====================================================================== */

.raid-tabs {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}
.raid-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    transition: all 0.15s;
}
.raid-tab.active {
    background: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.raid-boss-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    padding-bottom: 100px;
}
.raid-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
}

/* ======================================================================
   TASKS
   ====================================================================== */

.tasks-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}
.tasks-header-icon { font-size: 24px; }
.tasks-header-text h2 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin: 0;
}
.tasks-header-text p {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 2px 0 0;
}
.tasks-timer {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}
.tasks-tabs {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin: 0 var(--spacing-md) 16px;
}
.tasks-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    transition: all 0.15s;
}
.tasks-tab.active {
    background: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ======================================================================
   TAVERN
   ====================================================================== */

.tavern-tabs {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 0 var(--spacing-md) 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
}
.tavern-tabs::-webkit-scrollbar { display: none; }
.tavern-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    padding-bottom: 10px;
    margin-bottom: -1px;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    background: transparent;
    transition: color 0.15s;
}
.tavern-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.tavern-section-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding: 0 var(--spacing-md);
}

/* ======================================================================
   CLAN
   ====================================================================== */

/* Hero header */
.clan-page-header {
    text-align: center;
    padding: 20px 16px 14px;
    position: relative;
    margin-bottom: 4px;
}
.clan-page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px; right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,176,46,0.3), transparent);
}
.clan-page-title {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 20px rgba(255,176,46,0.12);
}
.clan-page-subtitle {
    font-size: 11px;
    color: var(--accent-color);
    margin-top: 4px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Create clan */
.clan-create-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 18px 16px;
    margin: 12px 12px 10px;
    position: relative;
    overflow: hidden;
}
.clan-create-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
}
.clan-create-card h3 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 4px;
    color: var(--text-primary);
}
.clan-create-cost {
    font-size: 12px;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 600;
}
.clan-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--elevated-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 8px;
    min-height: 44px;
}

/* Clan list items */
.clan-list-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.clan-list-item:active { border-color: var(--accent-color); }
.clan-list-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.clan-list-tag { color: var(--accent-color); font-size: 12px; font-weight: 700; }
.clan-list-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Clan info card */
.clan-info-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,176,46,0.2);
    border-radius: var(--radius-xl);
    padding: 16px;
    margin: 0 12px 10px;
    position: relative;
    overflow: hidden;
}
.clan-info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), rgba(255,176,46,0.4), transparent);
}
.clan-info-icon { font-size: 2.2rem; }
.clan-info-title h2 {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0;
}
.clan-tag {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 12px;
    opacity: 0.85;
}
.clan-level-badge {
    text-align: center;
    background: rgba(255,176,46,0.08);
    border: 1px solid rgba(255,176,46,0.3);
    border-radius: var(--radius-lg);
    padding: 6px 12px;
    min-width: 52px;
}
.clan-level-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.clan-level-value { font-size: 22px; font-weight: 900; color: var(--accent-color); line-height: 1; }

/* XP bar */
.clan-xp-bar {
    height: 16px;
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    margin-top: 10px;
}
.clan-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent-color), #fbbf24);
    border-radius: var(--radius-lg);
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(255,176,46,0.25);
}
.clan-xp-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

/* Clan tabs */
.clan-tabs {
    display: flex;
    gap: 0;
    padding: 0 12px;
    margin-bottom: 12px;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
}
.clan-tab {
    flex: 1;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-align: center;
}
.clan-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Clan cards */
.clan-bank-card,
.clan-stats-card,
.clan-actions-card,
.clan-settings-card,
.clan-notify-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 10px;
}
.clan-bank-card h3 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0 0 10px;
    color: var(--accent-color);
    text-transform: uppercase;
}
.clan-bank-row,
.clan-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(37,42,54,0.3);
}
.clan-bank-row:last-of-type,
.clan-stat-row:last-child { border-bottom: none; }

/* Clan members */
.clan-member-row {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.12s;
}
.clan-member-row:active { border-color: var(--accent-color); }
.clan-member-me { border-color: rgba(255,176,46,0.25) !important; }
.clan-member-info { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.clan-member-name { font-weight: 700; font-size: 14px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clan-member-rank-icon { font-size: 14px; flex-shrink: 0; }
.clan-member-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.clan-member-xp { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.clan-member-boss { font-size: 14px; }
.clan-member-arrow { font-size: 16px; color: var(--text-muted); opacity: 0.5; }

/* Base sub-tabs */
.clan-base-subtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.clan-base-subtab {
    flex: 1;
    padding: 8px 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s, color 0.15s;
}
.clan-base-subtab.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255,176,46,0.08);
}

/* Clan boss cards */
.clan-boss-list { display: flex; flex-direction: column; gap: 10px; }
.clan-boss-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    transition: border-color 0.15s;
}
.clan-boss-card.clan-boss-locked { opacity: 0.55; }
.clan-boss-card-header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.clan-boss-card-icon { font-size: 28px; flex-shrink: 0; }
.clan-boss-card-info { flex: 1; min-width: 0; }
.clan-boss-card-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.clan-boss-card-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.clan-boss-card-stats {
    display: flex; gap: 12px; font-size: 12px; color: var(--text-muted);
    margin-bottom: 8px; padding: 6px 0; border-top: 1px solid var(--border-color);
}
.clan-boss-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.clan-boss-status { font-size: 12px; font-weight: 600; }
.clan-boss-status.ready { color: #4ade80; }
.clan-boss-status.cooldown { color: var(--text-muted); }
.clan-boss-status.locked { color: #f87171; }

/* Rank badges */
.clan-rank-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,176,46,0.25);
    background: rgba(255,176,46,0.08);
    color: var(--accent-color);
    white-space: nowrap;
}
.rank-leader  { background: rgba(255,176,46,0.18); border-color: rgba(255,176,46,0.5); color: #ffb02e; }
.rank-general { background: rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.35); color: #c084fc; }
.rank-deputy  { background: rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.3);  color: #60a5fa; }
.rank-officer { background: rgba(47,160,90,0.1);   border-color: rgba(47,160,90,0.3);   color: #4ade80; }

/* Divider */
.clan-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 14px;
}
.clan-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}
.clan-divider-text {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Clan background */
#clanScreen {
    background-image: url('../../assets/bg-clan.webp');
    background-size: cover;
    background-position: center top;
    background-attachment: local;
}
#clanScreen::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(14,13,12,0.88);
    pointer-events: none;
    z-index: 0;
}
#clanScreen > * { position: relative; z-index: 1; }

/* ======================================================================
   WORKSHOP
   ====================================================================== */

.workshop-page {
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}
.workshop-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}
.workshop-masters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-workshop-master {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    min-height: 44px;
    text-align: left;
    transition: border-color 0.15s;
}
.btn-workshop-master:active { border-color: var(--accent-color); }
.workshop-master-icon { font-size: 20px; }
.workshop-master-name { font-size: 14px; font-weight: 700; }
.workshop-master-desc { font-size: 12px; color: var(--text-muted); }

/* ======================================================================
   SKILLS
   ====================================================================== */

.skills-page {
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}
.skills-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.skills-currency-bar {
    font-size: 13px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 12px;
}
.skills-tabs {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}
.skills-tab-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    transition: all 0.15s;
}
.skills-tab-btn.active {
    background: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ======================================================================
   ARENA SHOP + RARE TRADER
   ====================================================================== */

.arena-shop-balance {
    padding: 12px var(--spacing-md);
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 700;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin: 0 var(--spacing-md) 12px;
}
.arena-shop-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}

.rare-trader-page {
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}
.rare-trader-tabs {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}
.rare-trader-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    transition: all 0.15s;
}
.rare-trader-tab--active {
    background: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.rare-trader-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}
.rare-trader-currency {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 16px;
}

/* ======================================================================
   DONATE
   ====================================================================== */

.donate-page {
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}
.donate-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.donate-balance {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 700;
    background: var(--card-bg);
    border: 1px solid rgba(255,176,46,0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}
.donate-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.5;
}

/* ======================================================================
   SHELTER
   ====================================================================== */

.shelter-page {
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}
.shelter-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ======================================================================
   STORY
   ====================================================================== */

.story-npc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 var(--spacing-md);
    padding-bottom: 100px;
}

/* ======================================================================
   SETTINGS
   ====================================================================== */

.settings-container {
    padding-bottom: 100px !important;
}

/* ======================================================================
   MODALS (general)
   ====================================================================== */

.modal {
    background: rgba(0,0,0,0.88);
    background-image: url('../../assets/bg-modal.webp');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}
.modal-content {
    background: linear-gradient(160deg, rgba(22,21,21,0.97) 0%, rgba(14,13,12,0.99) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(0,0,0,0.9);
    backdrop-filter: blur(2px);
}

/* ======================================================================
   BUTTONS (global overrides)
   ====================================================================== */

.btn-primary {
    background: var(--accent-color) !important;
    color: var(--primary-color) !important;
    border-color: var(--accent-color) !important;
    font-weight: 800;
}
.btn-primary:active { opacity: 0.85; }

.btn-danger {
    background: var(--danger-color) !important;
    border-color: var(--danger-color) !important;
    color: #fff !important;
}

.btn-secondary {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* ======================================================================
   AUTH SCREEN
   ====================================================================== */

#authScreen .game-title {
    color: var(--accent-color);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
}
#authScreen .game-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 2px;
}
#authScreen .tabs {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px;
}
#authScreen .tab-btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: none;
}
#authScreen .tab-btn.active {
    background: var(--secondary-color);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    border-bottom: none;
}

/* ======================================================================
   DROPDOWNS
   ====================================================================== */

.inv-dropdown {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
}
.inv-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    min-height: 44px;
    transition: background 0.15s;
    border-radius: var(--radius-sm);
}
.inv-dropdown-item:active { background: var(--elevated-color); }
.inv-dropdown-icon { font-size: 18px; width: 24px; text-align: center; }
.inv-dropdown-chevron { margin-left: auto; color: var(--text-muted); font-size: 16px; }

/* ======================================================================
   MOBILE COMPACT (max 430px) — глобальный zoom + точечные фиксы
   zoom: 0.9 уменьшает ВСЕ элементы на 10%, поэтому индивидуальные
   уменьшения здесь умеренные (иначе двойное сжатие)
   ====================================================================== */
@media (max-width: 430px) {
    /* --- Глобальный масштаб: уменьшаем ВСЁ на 10% --- */
    html {
        zoom: 0.9;
    }

    /* --- CSS-переменные высот (до зума, рендерятся × 0.9) --- */
    :root {
        --hud-height: 44px;          /* рендер: 39.6px */
        --statusbar-height: 28px;    /* рендер: 25.2px */
        --bottom-navbar-height: 56px;/* рендер: 50.4px */
        --navbar-height: 84px;       /* рендер: 75.6px */
    }

    /* --- HUD сверху --- */
    .global-hud {
        gap: 14px;
        padding: 8px 14px;
    }
    .hud-stat {
        font-size: 14px;
        gap: 5px;
    }
    .hud-actions {
        gap: 6px;
        right: 10px;
    }
    .hud-icon-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 2px;
    }

    /* --- Screen headers --- */
    .screen-header {
        padding: 10px 14px 8px;
        margin-bottom: 8px;
    }
    .screen-header h2 {
        font-size: 17px;
        letter-spacing: 1px;
    }
    .btn-close {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    /* --- Навбар — touch targets ≥ 44px до зума --- */
    .bottom-navbar {
        height: var(--bottom-navbar-height, 56px);
    }
    .nav-btn {
        gap: 3px;
        padding-top: 2px;
    }
    .nav-icon-box {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1.15rem;
    }
    .nav-label {
        font-size: 9px;
        letter-spacing: 0.3px;
    }

    /* --- Статус-бар --- */
    .server-status-bar {
        height: calc(var(--statusbar-height, 28px) + env(safe-area-inset-bottom, 0px));
        padding: 0 10px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    #serverStatusText,
    .players-online,
    .server-time {
        font-size: 11px !important;
    }

    /* --- Главное меню --- */
    .menu-hero {
        height: 170px;
        margin: 4px 0 8px;
        padding: 16px 12px;
    }
    .menu-hero-title {
        font-size: 1.3rem;
        letter-spacing: 3px;
    }
    .menu-hero-sub {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }
    .menu-sections {
        padding: 0 10px;
        gap: 20px;
    }
    .menu-section-header {
        margin-bottom: 10px;
    }
    .menu-grid {
        gap: 8px;
    }
    .menu-card {
        padding: 6px 8px;
        font-size: 13px;
    }
    .menu-card-icon {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }
    .menu-main {
        padding-bottom: 100px;
    }

    /* --- Общие элементы --- */
    .screen {
        padding: 6px;
    }

    /* --- Awards --- */
    .reward-container {
        padding: 20px 12px;
    }
    .reward-details {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .reward-item {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        padding: 14px;
    }
    .reward-text {
        word-wrap: break-word;
    }

    /* --- Дропдауны --- */
    .inv-dropdown {
        bottom: calc(var(--bottom-navbar-height, 56px) + var(--statusbar-height, 28px) + 8px);
    }
}

/* ======================================================================
   DESKTOP FRAME
   ====================================================================== */
@media (min-width: 431px) {
    .server-status-bar,
    .bottom-navbar,
    .global-hud {
        max-width: 430px;
        left: 50%;
        transform: translateX(-50%);
    }
}
