/* ============================================
   DARK FANTASY MMO — БАРДОВО-КРАСНАЯ ВЕРСИЯ
   Атмосферная RPG с элементами мистики и крови
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800;900&family=MedievalSharp&family=Uncial+Antiqua&display=swap');

/* ==================== КЛЮЧЕВЫЕ КАДРЫ ДЛЯ АНИМАЦИЙ ==================== */
@keyframes bloodPulse {
    0%, 100% {
        text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
        filter: drop-shadow(0 0 3px rgba(139, 0, 0, 0.3));
    }
    50% {
        text-shadow: 0 0 20px rgba(139, 0, 0, 0.9), 0 0 10px rgba(200, 0, 0, 0.6);
        filter: drop-shadow(0 0 8px rgba(139, 0, 0, 0.6));
    }
}

@keyframes runeGlow {
    0%, 100% {
        opacity: 0.1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
    25% {
        opacity: 0.4;
        transform: scale(1.05) rotate(2deg);
        filter: blur(1px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1) rotate(5deg);
        filter: blur(2px);
        text-shadow: 0 0 15px rgba(139, 0, 0, 0.8);
    }
    75% {
        opacity: 0.4;
        transform: scale(1.05) rotate(3deg);
        filter: blur(1px);
    }
}

@keyframes emberFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.6;
        transform: translateY(50vh) translateX(20px) rotate(180deg);
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes bloodDrip {
    0% {
        transform: translateY(0) scaleY(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(100px) scaleY(1.5);
        opacity: 0.4;
    }
    100% {
        transform: translateY(200px) scaleY(2);
        opacity: 0;
    }
}

@keyframes skullRotate {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.03;
    }
    25% {
        transform: translate(10px, -15px) rotate(5deg);
        opacity: 0.08;
    }
    50% {
        transform: translate(-5px, -30px) rotate(10deg);
        opacity: 0.12;
    }
    75% {
        transform: translate(-15px, -15px) rotate(5deg);
        opacity: 0.08;
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.03;
    }
}

@keyframes portalGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(139, 0, 0, 0.3), inset 0 0 5px rgba(139, 0, 0, 0.2);
        border-color: rgba(139, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 0, 0, 0.7), inset 0 0 15px rgba(200, 0, 0, 0.3);
        border-color: rgba(200, 0, 0, 0.7);
    }
}

@keyframes bloodSplatter {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.4;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(139, 0, 0, 0.4);
        border-color: rgba(139, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(139, 0, 0, 0.8), 0 0 10px rgba(200, 0, 0, 0.5);
        border-color: rgba(200, 0, 0, 0.9);
    }
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 3px rgba(139, 0, 0, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(139, 0, 0, 0.8));
    }
}

@keyframes fogDrift {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-2%) translateY(1%);
    }
    50% {
        transform: translateX(0) translateY(2%);
    }
    75% {
        transform: translateX(2%) translateY(1%);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

@keyframes tapRipple {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes damageNumber {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.5);
    }
}

@keyframes critFlash {
    0%, 100% {
        filter: brightness(1);
    }
    25% {
        filter: brightness(1.5);
    }
    50% {
        filter: brightness(2);
        background: radial-gradient(ellipse at center, rgba(200, 0, 0, 0.3) 0%, transparent 70%);
    }
    75% {
        filter: brightness(1.5);
    }
}

@keyframes levelUp {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes victoryPulse {
    0%, 100% {
        filter: brightness(1);
        background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    }
    50% {
        filter: brightness(1.3);
        background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.3) 0%, transparent 70%);
    }
}

@keyframes deathFade {
    0% {
        filter: brightness(1) grayscale(0);
    }
    50% {
        filter: brightness(0.3) grayscale(1);
    }
    100% {
        filter: brightness(0.1) grayscale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== ПЕРЕМЕННЫЕ ==================== */
:root {
    /* Бардово-красная палитра */
    --blood-dark: #1a0000;
    --blood-deep: #2a0000;
    --blood-mid: #3a0000;
    --blood: #5a0000;
    --blood-bright: #8b0000;
    --blood-glow: #cc0000;
    --blood-pulse: #ff3333;
    --blood-light: #ff4444;

    /* Золотые акценты */
    --gold-dim: #3a2800;
    --gold: #6b4c00;
    --gold-bright: #b8860b;
    --gold-glow: #d4af37;
    --gold-light: #ffd700;

    /* Фоновые */
    --void: #020005;
    --abyss: #050510;
    --deep: #0a0a15;
    --panel: #0f0f1c;
    --panel-light: #151525;
    --panel-hover: #1a1a2e;

    /* Текст */
    --text-primary: #d0c8d8;
    --text-secondary: #9a9098;
    --text-muted: #5a5058;
    --text-blood: #ff5555;
    --text-gold: #d4af37;

    /* Редкости */
    --rarity-common: #a89f91;
    --rarity-uncommon: #44ff44;
    --rarity-rare: #4488ff;
    --rarity-epic: #aa44ff;
    --rarity-legendary: #ffaa44;
    --rarity-mythical: #ff66cc;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    --font-cinzel: 'Cinzel', 'MedievalSharp', serif;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== СБРОС ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    font-family: var(--font-cinzel);
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--void);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
}

input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
    font-family: var(--font-cinzel);
}

/* ==================== АТМОСФЕРНЫЙ СЛОЙ ==================== */
.atmosphere-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Фоновые руны и иероглифы */
.rune-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.rune-element {
    position: absolute;
    font-family: 'Uncial Antiqua', serif;
    font-size: 1.5rem;
    pointer-events: none;
    animation: runeGlow 6s ease-in-out infinite;
    color: rgba(139, 0, 0, 0.15);
    transition: all 0.5s ease;
}

.rune-element:hover {
    color: rgba(200, 0, 0, 0.4);
    text-shadow: 0 0 15px rgba(200, 0, 0, 0.6);
    animation-play-state: paused;
}

/* Символы для рун */
.rune-element::before {
    content: attr(data-rune);
}

/* Плавающие искры/эмберы */
.ember {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, var(--blood-glow), var(--blood));
    border-radius: 50%;
    pointer-events: none;
    animation: emberFloat 6s linear infinite;
    box-shadow: 0 0 6px var(--blood-glow);
}

.ember::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 100, 100, 0.8), transparent);
    filter: blur(2px);
}

/* Летучие мыши и тени */
.shadow-creature {
    position: absolute;
    font-size: 1.2rem;
    pointer-events: none;
    animation: shadowFly 12s ease-in-out infinite;
    opacity: 0.08;
    filter: blur(2px);
}

@keyframes shadowFly {
    0% {
        transform: translateX(-10%) translateY(10%) scale(1);
        opacity: 0.05;
    }
    25% {
        transform: translateX(20%) translateY(-20%) scale(1.2);
        opacity: 0.1;
    }
    50% {
        transform: translateX(50%) translateY(5%) scale(0.8);
        opacity: 0.08;
    }
    75% {
        transform: translateX(80%) translateY(-15%) scale(1.1);
        opacity: 0.12;
    }
    100% {
        transform: translateX(100%) translateY(10%) scale(1);
        opacity: 0.05;
    }
}

/* Капли крови */
.blood-drip {
    position: absolute;
    width: 2px;
    height: 8px;
    background: linear-gradient(180deg, var(--blood-bright), transparent);
    border-radius: 1px;
    pointer-events: none;
    animation: bloodDrip 3s ease-in infinite;
    top: -10px;
}

/* Черепа на фоне */
.bg-skull {
    position: absolute;
    font-size: 4rem;
    opacity: 0.04;
    pointer-events: none;
    animation: skullRotate 20s ease-in-out infinite;
    filter: blur(3px);
}

.bg-skull:nth-child(1) { top: 10%; left: 5%; font-size: 5rem; animation-duration: 25s; }
.bg-skull:nth-child(2) { top: 70%; right: 10%; font-size: 4rem; animation-duration: 18s; }
.bg-skull:nth-child(3) { bottom: 20%; left: 20%; font-size: 3rem; animation-duration: 30s; }
.bg-skull:nth-child(4) { top: 40%; right: 25%; font-size: 6rem; animation-duration: 22s; }

/* Туман */
.fog {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(80, 0, 0, 0.06) 0%, transparent 70%);
    animation: fogDrift 40s linear infinite;
}

.fog-1 { top: -30%; left: -50%; animation-duration: 45s; }
.fog-2 { top: -20%; left: -30%; animation-duration: 60s; animation-delay: -15s; }
.fog-3 { top: -40%; left: -20%; animation-duration: 50s; animation-delay: -30s; }
.fog-4 { top: -10%; left: -60%; animation-duration: 70s; animation-delay: -10s; }

/* Свечение по краям экрана */
.vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 1;
}

.blood-vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(80, 0, 0, 0.15) 100%);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.blood-vignette.active {
    opacity: 1;
}

/* ==================== ОСНОВНОЙ КОНТЕЙНЕР ==================== */
#game-app {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    position: relative;
    background: radial-gradient(ellipse at center, #1a0508 0%, var(--void) 100%);
    border-left: 1px solid var(--blood-dark);
    border-right: 1px solid var(--blood-dark);
    box-shadow: 0 0 100px rgba(80, 0, 0, 0.3), inset 0 0 100px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2;
}

@media (min-width: 768px) {
    #game-app { max-width: 800px; }
}

@media (min-width: 1024px) {
    #game-app { max-width: 1000px; }
}

/* ==================== ХЕДЕР ==================== */
.game-header {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(10, 0, 5, 0.98) 0%, rgba(15, 5, 10, 0.95) 100%);
    border-bottom: 2px solid var(--blood);
    padding: 8px 12px;
    padding-top: calc(var(--safe-top) + 8px);
    backdrop-filter: blur(10px);
}

.header-glow-line {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blood-bright), var(--blood-glow), var(--blood-bright), transparent);
    animation: bloodPulse 2s ease-in-out infinite;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Аватар игрока */
.player-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.player-identity:active {
    transform: scale(0.98);
}

.avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
}

.avatar-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--blood-bright);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
    background: linear-gradient(135deg, var(--blood-dark), var(--deep));
}

.avatar-pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--blood-glow);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.player-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    display: flex;
    flex-direction: column;
}

.player-name {
    color: var(--gold-bright);
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.player-level-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.level-badge {
    background: linear-gradient(135deg, var(--blood-mid), var(--blood));
    color: var(--text-gold);
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid var(--blood-bright);
}

.profession-badge {
    color: var(--text-secondary);
    font-size: 0.55rem;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}

/* Ресурсы */
.resource-pills {
    display: flex;
    gap: 8px;
}

.resource-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid;
    backdrop-filter: blur(4px);
}

.resource-pill.gold {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(107, 76, 0, 0.3), rgba(0, 0, 0, 0.3));
}

.resource-pill.gold .pill-value {
    color: var(--gold-glow);
}

.resource-pill.blood {
    border-color: var(--blood-dim);
    background: linear-gradient(135deg, rgba(90, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
}

.resource-pill.blood .pill-value {
    color: var(--blood-light);
}

.pill-icon {
    font-size: 0.8rem;
}

/* Полоса опыта */
.exp-ribbon {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.6);
    margin-top: 8px;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.exp-ribbon-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright), var(--gold-glow));
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
    z-index: 1;
}

.exp-ribbon-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    animation: expGlow 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes expGlow {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.exp-ribbon-text {
    position: absolute;
    top: -16px;
    right: 4px;
    font-size: 0.55rem;
    color: var(--text-muted);
    z-index: 3;
}

/* ==================== ОСНОВНОЙ КОНТЕНТ ==================== */
.game-viewport {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
    padding: 12px;
    padding-bottom: calc(var(--safe-bottom) + 12px);
    -webkit-overflow-scrolling: touch;
}

.game-viewport::-webkit-scrollbar {
    width: 4px;
}

.game-viewport::-webkit-scrollbar-track {
    background: transparent;
}

.game-viewport::-webkit-scrollbar-thumb {
    background: var(--blood-dark);
    border-radius: 4px;
}

/* ==================== ЭКРАНЫ ==================== */
.game-screen {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.game-screen.active {
    display: block;
}

/* ==================== БАННЕР ЛОКАЦИИ (ВАУ-ЭФФЕКТ) ==================== */
.location-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--blood);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.location-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 0, 0, 0.4);
}

.banner-image-wrapper {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
}

.banner-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.3) brightness(0.6) contrast(1.2);
    transition: transform 8s ease;
}

.location-banner:hover .banner-bg {
    transform: scale(1.05);
}

.banner-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

.banner-blood-drips {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(180deg, transparent, var(--blood-dark));
}

.banner-info {
    position: absolute;
    bottom: 12px;
    left: 15px;
    right: 15px;
    z-index: 2;
}

.location-name {
    color: var(--gold-bright);
    font-size: 1.6rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 10px rgba(139, 0, 0, 0.5);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.floor-indicator {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--blood-light);
    border-left: 2px solid var(--blood-bright);
}

.floor-indicator.safe {
    color: var(--gold-bright);
    border-left-color: var(--gold-dim);
}

/* ==================== СЕТКА ДЕЙСТВИЙ ==================== */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.action-tile {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 16px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(5px);
}

.action-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.15), transparent);
    transition: left 0.5s ease;
}

.action-tile:hover::before {
    left: 100%;
}

.action-tile:hover {
    border-color: var(--blood-mid);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(139, 0, 0, 0.2);
}

.action-tile:active {
    transform: scale(0.96);
}

.tile-icon {
    font-size: 2rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.action-tile:hover .tile-icon {
    transform: scale(1.1);
    animation: iconPulse 0.5s ease;
}

.tile-label {
    font-size: 0.8rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.tile-sub {
    font-size: 0.6rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Специфические цвета для разных кнопок */
.action-tile.hunt {
    border-color: var(--blood);
    background: linear-gradient(135deg, rgba(90, 0, 0, 0.3), rgba(15, 15, 25, 0.95));
}

.action-tile.hunt .tile-icon {
    animation: bloodPulse 1.5s ease-in-out infinite;
}

.action-tile.character { border-color: rgba(212, 175, 55, 0.3); }
.action-tile.character:hover { border-color: var(--gold-dim); }

.action-tile.teleport { border-color: rgba(68, 136, 255, 0.3); }
.action-tile.teleport:hover { border-color: #4488ff; box-shadow: 0 0 20px rgba(68, 136, 255, 0.2); }

.action-tile.guild { border-color: rgba(212, 175, 55, 0.3); }
.action-tile.guild:hover { border-color: var(--gold-bright); }

.action-tile.quests { border-color: rgba(68, 255, 68, 0.3); }
.action-tile.quests:hover { border-color: #44ff44; }

.action-tile.npc { border-color: rgba(255, 136, 68, 0.3); }
.action-tile.npc:hover { border-color: #ff8844; }

.action-tile.daily { border-color: rgba(212, 175, 55, 0.3); }
.action-tile.daily:hover { border-color: var(--gold-glow); }

.action-tile.auction { border-color: rgba(200, 100, 255, 0.3); }
.action-tile.auction:hover { border-color: #c864ff; }

.action-tile.secret { border-color: rgba(160, 50, 255, 0.3); }
.action-tile.secret:hover { border-color: #a032ff; box-shadow: 0 0 25px rgba(160, 50, 255, 0.3); }

.action-tile.storage { border-color: rgba(100, 150, 100, 0.3); }
.action-tile.storage:hover { border-color: #88ff88; }

/* ==================== МИНИ-БАННЕР ГИЛЬДИИ ==================== */
.guild-mini-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(20, 15, 20, 0.95));
    border: 1px solid var(--blood-dark);
    border-radius: 14px;
    padding: 10px 15px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guild-mini-banner:hover {
    border-color: var(--gold-dim);
    transform: translateY(-2px);
}

.guild-mini-tag {
    color: var(--blood-light);
    font-weight: 700;
    font-size: 0.8rem;
}

.guild-mini-name {
    color: var(--text-primary);
    flex: 1;
    font-size: 0.8rem;
}

.guild-mini-level {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ==================== ЗАГОЛОВКИ ЭКРАНОВ ==================== */
.screen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 0 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--blood-dark);
    position: relative;
}

.screen-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--blood-bright);
    box-shadow: 0 0 10px var(--blood-glow);
}

.screen-header h2 {
    color: var(--gold-bright);
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.back-btn {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid var(--blood-dark);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-btn:hover {
    border-color: var(--blood-mid);
    background: linear-gradient(135deg, rgba(25, 15, 25, 0.9), rgba(15, 10, 20, 0.95));
    transform: translateX(-2px);
}

.back-arrow {
    font-size: 1rem;
    color: var(--blood-light);
}

/* ==================== ВКЛАДКИ ПЕРСОНАЖА ==================== */
.char-tabs-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.char-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.char-tab {
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.7), rgba(10, 10, 20, 0.8));
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-weight: 600;
}

.char-tab:hover {
    color: var(--text-primary);
    border-color: var(--blood-dark);
    transform: translateY(-1px);
}

.char-tab.active {
    color: var(--gold-bright);
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.15), rgba(15, 15, 25, 0.9));
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.char-tab-content {
    display: none;
    animation: fadeInUp 0.3s ease;
}

.char-tab-content.active {
    display: block;
}

/* ==================== КАРТОЧКИ ДЛЯ СТАТУСА ==================== */
.character-status-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.character-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--blood-bright), var(--gold-dim), var(--blood-bright));
    animation: bloodPulse 2s ease-in-out infinite;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.avatar-large {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--blood-mid), var(--blood-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 2px solid var(--blood-bright);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
}

.avatar-large.admin-glow {
    border-color: var(--gold-glow);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

.status-info {
    flex: 1;
}

.username {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 4px;
}

.username.admin-name {
    color: var(--blood-light);
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.user-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.user-level {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Ресурсные карточки */
.resource-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.resource-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.8), rgba(10, 10, 20, 0.85));
    border: 1px solid var(--blood-dark);
    border-radius: 14px;
    padding: 12px;
}

.resource-card .rc-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resource-card .rc-value {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    margin: 5px 0;
    color: var(--text-primary);
}

.resource-card .rc-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.rc-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.rc-fill.hp {
    background: linear-gradient(90deg, var(--blood), var(--blood-glow));
    box-shadow: 0 0 8px rgba(200, 0, 0, 0.3);
}

.rc-fill.mp {
    background: linear-gradient(90deg, #003366, #0066cc);
    box-shadow: 0 0 8px rgba(0, 100, 200, 0.3);
}

/* Сетка статов */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid rgba(139, 0, 0, 0.2);
}

.stat-card:hover {
    border-color: var(--blood-dim);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.achievement {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    transition: all 0.2s;
}

.achievement:hover {
    background: rgba(139, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ach-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

/* ==================== РАСПРЕДЕЛЕНИЕ СТАТОВ ==================== */
.stats-upgrade-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 20px;
    padding: 18px;
}

.points-display {
    text-align: center;
    padding: 15px;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(139, 0, 0, 0.3);
    animation: bloodPulse 2s ease-in-out infinite;
}

.points-icon {
    font-size: 2rem;
}

.points-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold-glow);
    display: block;
}

.points-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.upgrade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.upgrade-item:hover {
    border-color: var(--blood-dim);
    background: rgba(15, 15, 25, 0.5);
}

.upgrade-icon {
    font-size: 1.4rem;
}

.upgrade-info {
    flex: 1;
    margin-left: 10px;
}

.upgrade-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.upgrade-current {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.upgrade-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--blood-bright), var(--blood));
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, var(--blood-glow), var(--blood-bright));
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(200, 0, 0, 0.4);
}

.upgrade-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

/* ==================== НАВЫКИ ==================== */
.skills-section {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 20px;
    padding: 18px;
}

.equipped-skills-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.skill-card {
    flex: 1;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid var(--blood-dark);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    transform: translateY(-2px);
    border-color: var(--blood-mid);
}

.skill-card.equipped {
    border-color: var(--blood-bright);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.3);
}

.skill-card.empty {
    opacity: 0.6;
}

.skill-icon {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.skill-name {
    font-size: 0.7rem;
    font-weight: 700;
}

.skill-level {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.learned-skills-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-detail-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    padding: 12px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.skill-detail-card:hover {
    background: rgba(15, 15, 25, 0.5);
}

.skill-detail-card.equipped {
    border-left-color: var(--blood-bright);
    background: rgba(139, 0, 0, 0.05);
}

.skill-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.skill-detail-icon {
    font-size: 1.6rem;
}

.skill-detail-title {
    flex: 1;
}

.skill-detail-title h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.skill-equipped-badge {
    padding: 3px 10px;
    background: rgba(68, 255, 68, 0.15);
    border-radius: 20px;
    color: #88ff88;
    font-size: 0.65rem;
}

.skill-detail-stats {
    display: flex;
    gap: 15px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 8px 0;
}

/* Скрытые навыки */
.hidden-skills-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hidden-skill-card {
    background: linear-gradient(135deg, rgba(75, 0, 130, 0.15), rgba(40, 0, 60, 0.1));
    border: 1px solid rgba(160, 50, 255, 0.3);
    border-radius: 14px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    animation: portalGlow 3s ease-in-out infinite;
}

.hidden-skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(160, 50, 255, 0.1), transparent);
    animation: hiddenGlow 4s ease-in-out infinite;
}

@keyframes hiddenGlow {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.hidden-skill-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px #a032ff);
}

/* ==================== ИНВЕНТАРЬ ==================== */
.inventory-controls {
    margin-bottom: 15px;
}

.inv-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.inv-header-row h3 {
    font-size: 0.9rem;
    color: var(--gold-bright);
}

.inv-sort-select {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid var(--blood-dark);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    cursor: pointer;
}

.inv-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.inv-filter-btn {
    padding: 5px 12px;
    border-radius: 25px;
    border: 1px solid transparent;
    background: rgba(15, 15, 25, 0.7);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.2s;
}

.inv-filter-btn:hover {
    border-color: var(--blood-dark);
    color: var(--text-primary);
}

.inv-filter-btn.active {
    border-color: var(--gold-dim);
    color: var(--gold-bright);
    background: rgba(139, 105, 20, 0.15);
}

.inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.inv-item {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid var(--blood-dark);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.inv-item:hover {
    border-color: var(--blood-mid);
    transform: translateY(-2px);
}

.inv-icon {
    font-size: 1.6rem;
    display: block;
}

.inv-qty {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 0.55rem;
    color: var(--gold-bright);
    font-weight: 700;
}

.inv-name {
    font-size: 0.55rem;
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
}

.inv-rarity-bar {
    width: 100%;
    height: 2px;
    margin-top: 6px;
    border-radius: 2px;
}

.inv-rarity-bar.rarity-common { background: var(--rarity-common); }
.inv-rarity-bar.rarity-uncommon { background: var(--rarity-uncommon); }
.inv-rarity-bar.rarity-rare { background: var(--rarity-rare); }
.inv-rarity-bar.rarity-epic { background: var(--rarity-epic); }
.inv-rarity-bar.rarity-legendary { background: var(--rarity-legendary); }
.inv-rarity-bar.rarity-mythical { background: var(--rarity-mythical); }

.inv-equipped-badge {
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 0.6rem;
}

.inv-quest-badge {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 0.6rem;
}

.inventory-footer {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ==================== ЭКИПИРОВКА ==================== */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
}

.equipment-slot {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid var(--blood-dark);
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.equipment-slot:hover {
    border-color: var(--blood-mid);
    transform: translateY(-2px);
}

.equipment-slot.filled {
    border-color: var(--gold-dim);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.slot-icon {
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.slot-name {
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.slot-item {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.equipment-slot.filled .slot-item {
    color: var(--gold-bright);
}

/* Слоты зелий */
.potion-equip-slots {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.potion-equip-slot {
    flex: 1;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px dashed var(--blood-dark);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.potion-equip-slot:hover {
    border-color: var(--blood-mid);
}

.potion-equip-slot.filled {
    border-style: solid;
    border-color: var(--gold-dim);
}

/* ==================== КВЕСТЫ ==================== */
.quests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quest-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 18px;
    padding: 16px;
    transition: all 0.2s;
    animation: fadeInUp 0.3s ease;
}

.quest-card:hover {
    border-color: var(--blood-mid);
    transform: translateY(-2px);
}

.quest-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.quest-icon {
    font-size: 2rem;
}

.quest-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.quest-type-badge {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.6rem;
    font-weight: 700;
}

.quest-type-badge.story { background: rgba(212, 175, 55, 0.2); color: var(--gold-glow); }
.quest-type-badge.normal { background: rgba(150, 150, 150, 0.2); color: #ccc; }
.quest-type-badge.daily { background: rgba(68, 136, 255, 0.2); color: #88aaff; }

.quest-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.quest-progress-bar {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 12px 0;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blood-bright), var(--blood-glow));
    transition: width 0.3s;
    border-radius: 10px;
}

.quest-objectives-list {
    margin: 12px 0;
}

.objective-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
}

.objective-completed {
    color: #44ff44;
    text-decoration: line-through;
    opacity: 0.7;
}

.quest-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* ==================== NPC ==================== */
.npcs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.npc-card {
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 20px;
    padding: 15px;
    transition: all 0.2s;
}

.npc-card:hover {
    border-color: var(--blood-mid);
    transform: translateX(5px);
}

.npc-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--blood-mid), var(--blood-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid var(--blood-bright);
    flex-shrink: 0;
}

.npc-info {
    flex: 1;
}

.npc-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 4px;
}

.npc-description {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.npc-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.6rem;
    background: rgba(139, 0, 0, 0.2);
    color: var(--blood-light);
}

.npc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

/* ==================== АУКЦИОН ==================== */
.auction-listings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auction-listing-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 16px;
    padding: 15px;
    transition: all 0.2s;
}

.auction-listing-card:hover {
    border-color: var(--blood-mid);
}

.auction-item-info {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.auction-item-icon {
    font-size: 2rem;
}

.auction-item-details h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.auction-price-info {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.auction-bid-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.auction-time-left {
    font-size: 0.7rem;
    color: var(--blood-light);
}

/* ==================== ГИЛЬДИЯ ==================== */
.guild-info-wrapper {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 20px;
    padding: 18px;
}

.guild-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.guild-emblem {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--blood-mid), var(--blood-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-bright);
    border: 2px solid var(--gold-dim);
}

.guild-details h2 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.guild-tag {
    color: var(--blood-light);
    font-size: 0.7rem;
}

.guild-stats-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.guild-stat-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.member-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    transition: all 0.2s;
}

.member-card:hover {
    background: rgba(139, 0, 0, 0.1);
}

/* ==================== МОДАЛЬНЫЕ ОКНА ==================== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    border: 2px solid var(--blood-bright);
    border-radius: 24px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(139, 0, 0, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--blood-dark);
    padding-bottom: 12px;
}

.modal-header h2 {
    color: var(--gold-bright);
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--blood-light);
    transform: scale(1.1);
}

/* ==================== УВЕДОМЛЕНИЯ ==================== */
.system-toasts {
    position: fixed;
    top: calc(var(--safe-top) + 15px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 350px;
}

.system-toast {
    padding: 12px 20px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    animation: slideInRight 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.toast-success {
    background: rgba(26, 77, 46, 0.9);
    border: 2px solid #44ff44;
}

.toast-error {
    background: rgba(107, 0, 0, 0.9);
    border: 2px solid #ff4444;
}

.toast-warning {
    background: rgba(77, 58, 0, 0.9);
    border: 2px solid #ffaa00;
}

.toast-info {
    background: rgba(26, 42, 77, 0.9);
    border: 2px solid #4488ff;
}

/* ==================== ОБЩИЕ КНОПКИ ==================== */
.action-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--blood-bright), var(--blood));
    border: 2px solid var(--blood-mid);
    border-radius: 14px;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-align: center;
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--blood-glow), var(--blood-bright));
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(200, 0, 0, 0.4);
}

.action-btn:active {
    transform: scale(0.97);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #2a2a3a, #1a1a2a);
    border-color: #3a3a4a;
    color: var(--text-primary);
}

.action-btn.gold {
    background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    border-color: var(--gold-dim);
    color: #1a1a2e;
}

.action-btn.danger {
    background: linear-gradient(135deg, #ff2222, #880000);
    border-color: #ff0000;
}

/* ==================== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--blood-dark);
    border-top-color: var(--blood-glow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== АДАПТАЦИЯ ==================== */
@media (max-width: 480px) {
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .inv-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .upgrade-grid {
        grid-template-columns: 1fr;
    }

    .guild-stats-cards {
        grid-template-columns: 1fr;
    }

    .npc-card {
        flex-direction: column;
        text-align: center;
    }

    .npc-avatar {
        margin: 0 auto;
    }

    .npc-actions {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .inv-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* ==================== СТИЛИ ДЛЯ СТРАНИЦЫ РЕГИСТРАЦИИ И ЛОГИНА ==================== */

/* Экран авторизации */
.auth-screen {
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(ellipse at 50% 30%, #1a0508 0%, var(--void) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Фоновые эффекты */
.auth-bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auth-bg-skull, .auth-bg-shield, .auth-bg-sword, .auth-bg-book, .auth-bg-candle {
    position: absolute;
    opacity: 0.06;
    animation: authFloat 15s ease-in-out infinite;
}

.auth-bg-1 { top: 8%; left: 5%; font-size: 4rem; }
.auth-bg-2 { bottom: 12%; right: 8%; font-size: 4rem; animation-delay: 4s; }
.auth-bg-3 { top: 40%; left: 80%; font-size: 3rem; animation-delay: 6s; }
.auth-bg-4 { top: 60%; left: 10%; font-size: 3rem; animation-delay: 9s; }
.auth-bg-5 { bottom: 15%; right: 20%; font-size: 2.5rem; animation-delay: 12s; }

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.03; }
    25% { transform: translate(15px, -20px) rotate(5deg); opacity: 0.08; }
    50% { transform: translate(-10px, -35px) rotate(-3deg); opacity: 0.12; }
    75% { transform: translate(-20px, -15px) rotate(8deg); opacity: 0.06; }
}

/* Контейнер */
.auth-container {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.97), rgba(10, 10, 20, 0.98));
    border: 2px solid var(--blood-dark);
    border-radius: 24px;
    padding: 35px 30px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease;
}

.auth-container.auth-register {
    max-width: 480px;
}

/* Заголовок */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo {
    margin-bottom: 15px;
}

.logo-ring {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--blood-mid), var(--blood-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--blood-bright);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(139, 0, 0, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 25px rgba(139, 0, 0, 0.7); transform: scale(1.05); }
}

.logo-icon {
    font-size: 2.5rem;
}

.auth-header h1 {
    color: var(--blood-bright);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
    letter-spacing: 2px;
}

.auth-subtitle {
    color: var(--gold-bright);
    font-size: 0.85rem;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.divider-line {
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b0000, #c9a03d, #8b0000, transparent);
}

.divider-skull {
    font-size: 1rem;
    animation: skullPulse 2s ease-in-out infinite;
}

@keyframes skullPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Форма */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.label-icon {
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--blood-dark);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-cinzel);
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--blood-bright);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.form-group input::placeholder {
    color: #3a3040;
}

.input-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blood-bright), var(--blood-glow));
    transition: width 0.3s;
}

.form-group input:focus + .input-glow {
    width: 100%;
}

.form-hint {
    color: #4a4050;
    font-size: 0.7rem;
}

/* Пароль с кнопкой показа */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px !important;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.5;
    transition: opacity 0.3s;
    padding: 5px;
}

.password-toggle:hover {
    opacity: 1;
}

/* Опции */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--blood-dark);
    border-radius: 5px;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--blood-bright);
    border-color: var(--blood-bright);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.forgot-link {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--blood-light);
}

/* Сообщения */
.auth-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-message-error {
    background: rgba(107, 0, 0, 0.2);
    border: 1px solid var(--blood-bright);
    color: var(--blood-light);
}

.auth-message-success {
    background: rgba(26, 77, 46, 0.2);
    border: 1px solid #1a4d2e;
    color: #44ff44;
}

.auth-message-warning {
    background: rgba(77, 58, 0, 0.2);
    border: 1px solid #4d3a00;
    color: #ffaa00;
}

.auth-message-info {
    background: rgba(26, 42, 77, 0.2);
    border: 1px solid #1a2a4d;
    color: #4488ff;
}

/* Кнопка */
.auth-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--blood-bright), var(--blood));
    border: 2px solid var(--blood-mid);
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover {
    background: linear-gradient(135deg, var(--blood-glow), var(--blood-bright));
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(139, 0, 0, 0.5);
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

/* Подвал */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(139, 0, 0, 0.2);
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 8px 0;
}

.auth-link {
    color: var(--blood-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-link:hover {
    color: var(--blood-glow);
    text-decoration: underline;
}

.auth-link-secondary {
    color: #4a4050;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.auth-link-secondary:hover {
    color: #8a8090;
}

/* Сила пароля */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.strength-bar {
    flex: 1;
    height: 5px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background 0.3s;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Валидация */
.validation-indicator {
    font-size: 0.7rem;
    min-height: 18px;
    transition: color 0.3s;
    margin-top: 4px;
}

.validation-indicator.valid {
    color: #44ff44;
}

.validation-indicator.invalid {
    color: #ff4444;
}

/* Адаптация */
@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .password-strength {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .strength-bar {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 25px 15px;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }
}

/* ==================== СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ ==================== */

.welcome-screen {
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(ellipse at 50% 30%, #1a0508 0%, var(--void) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    padding: 30px 20px;
}

.welcome-bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.welcome-skull {
    position: absolute;
    font-size: 4rem;
    opacity: 0.04;
    animation: skullFloat 20s ease-in-out infinite;
}

.skull-1 { top: 10%; left: 5%; animation-duration: 25s; }
.skull-2 { top: 60%; right: 8%; font-size: 5rem; animation-duration: 18s; animation-delay: 5s; }
.skull-3 { bottom: 15%; left: 15%; font-size: 3rem; animation-duration: 30s; animation-delay: 10s; }

@keyframes skullFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.03; }
    25% { transform: translate(15px, -20px) rotate(5deg); opacity: 0.08; }
    50% { transform: translate(-10px, -35px) rotate(-3deg); opacity: 0.12; }
    75% { transform: translate(-20px, -15px) rotate(8deg); opacity: 0.06; }
}

.welcome-sword {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.05;
    animation: swordFloat 15s ease-in-out infinite;
    transform: rotate(-15deg);
}

@keyframes swordFloat {
    0%, 100% { transform: rotate(-15deg) translate(0, 0); opacity: 0.04; }
    50% { transform: rotate(-5deg) translate(15px, -15px); opacity: 0.1; }
}

.welcome-fire {
    position: absolute;
    font-size: 2rem;
    opacity: 0.06;
    animation: fireFlicker 3s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% { opacity: 0.04; transform: scale(1); text-shadow: none; }
    50% { opacity: 0.12; transform: scale(1.05); text-shadow: 0 0 10px rgba(200, 100, 0, 0.3); }
}

.welcome-castle {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8rem;
    opacity: 0.03;
    filter: blur(8px);
}

.welcome-container {
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease;
}

.game-logo {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(139, 0, 0, 0.2), transparent);
    filter: blur(30px);
    pointer-events: none;
}

.game-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.title-blood {
    color: #8b0000;
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.6), 0 0 40px rgba(139, 0, 0, 0.3);
}

.title-gold {
    color: var(--gold-bright);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.divider-icon {
    font-size: 1rem;
    opacity: 0.7;
    animation: bloodPulse 2s ease-in-out infinite;
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--gold-bright);
    letter-spacing: 6px;
    font-weight: 600;
}

.game-version {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.game-description {
    text-align: center;
    margin: 25px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(139, 0, 0, 0.2);
}

.server-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.server-stats .stat-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: 20px;
    border: 1px solid rgba(139, 0, 0, 0.3);
    min-width: 100px;
}

.server-stats .stat-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.server-stats .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-bright);
    display: block;
}

.server-stats .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Меню карточек */
.main-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 25px 0;
}

.menu-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 16px;
    padding: 18px 10px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 0, 0, 0.15), transparent);
    transition: left 0.5s ease;
}

.menu-card:hover::before {
    left: 100%;
}

.menu-card:hover {
    transform: translateY(-4px);
    border-color: var(--blood-bright);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
}

.menu-card.menu-play {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.2), rgba(15, 15, 25, 0.98));
}

.menu-card.menu-play .menu-title {
    color: var(--gold-glow);
}

.menu-icon {
    font-size: 2rem;
}

.menu-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.menu-desc {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.menu-arrow {
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.menu-card:hover .menu-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* Кнопки для неавторизованных */
.welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.welcome-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid;
    border-radius: 14px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login {
    border-color: var(--blood-bright);
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(90, 0, 0, 0.3));
    color: var(--blood-light);
}

.btn-register {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(107, 76, 0, 0.2), rgba(15, 15, 25, 0.3));
    color: var(--gold-bright);
}

.welcome-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Ссылки для гостей */
.guest-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.guest-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.guest-link:hover {
    color: var(--gold-bright);
}

/* Админ-панель */
.admin-panel-link {
    margin-top: 15px;
    text-align: center;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(139, 0, 0, 0.2);
    border: 1px solid var(--blood-bright);
    border-radius: 30px;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--blood-light);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(139, 0, 0, 0.4);
    transform: translateY(-2px);
}

.admin-badge {
    background: var(--blood-bright);
    color: white;
    padding: 2px 8px;
    border-radius: 15px;
    font-size: 0.6rem;
}

/* Серверная информация */
.server-info {
    margin-top: 25px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    text-align: center;
}

.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #44ff44;
    box-shadow: 0 0 10px #44ff44;
    animation: pulse 2s infinite;
}

.server-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.server-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.3s;
}

.server-link:hover {
    color: var(--gold-bright);
}

/* Адаптация главной */
@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
    }

    .main-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .server-stats {
        gap: 15px;
    }

    .server-stats .stat-item {
        padding: 8px 15px;
    }

    .server-stats .stat-value {
        font-size: 1.4rem;
    }

    .game-description p {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .main-menu-grid {
        grid-template-columns: 1fr;
    }

    .game-title {
        font-size: 1.5rem;
    }
}


/* Анимации для навыков */
@keyframes magicFloat {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(0); opacity: 0; }
}

@keyframes healGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(68, 255, 68, 0.3); }
    50% { box-shadow: 0 0 40px rgba(68, 255, 68, 0.8); }
}

.magic-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 20010;
}

.skill-slot {
    transition: transform 0.1s, opacity 0.3s;
}

.skill-slot:active {
    transform: scale(0.95);
}

/* ==================== ИНВЕНТАРЬ ==================== */
.inventory-header {
    margin-bottom: 15px;
}

.inv-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.inv-header-row h3 {
    font-size: 0.9rem;
    color: var(--gold-bright);
}

.inv-sort-select {
    background: rgba(15, 15, 25, 0.8);
    border: 1px solid var(--blood-dark);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    cursor: pointer;
}

.inv-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.inv-filter-btn {
    padding: 5px 12px;
    border-radius: 25px;
    border: 1px solid transparent;
    background: rgba(15, 15, 25, 0.7);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.2s;
}

.inv-filter-btn:hover {
    border-color: var(--blood-dark);
    color: var(--text-primary);
}

.inv-filter-btn.active {
    border-color: var(--gold-dim);
    color: var(--gold-bright);
    background: rgba(139, 105, 20, 0.15);
}

.category-section {
    margin-bottom: 20px;
}

.category-title {
    font-size: 0.8rem;
    color: var(--gold-bright);
    margin-bottom: 10px;
    border-left: 3px solid var(--blood-bright);
    padding-left: 10px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.inventory-item {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9), rgba(10, 10, 20, 0.95));
    border: 1px solid var(--blood-dark);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.inventory-item:hover {
    border-color: var(--blood-mid);
    transform: translateY(-2px);
}

.inventory-item.equipped {
    border-color: var(--gold-dim);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.item-icon {
    font-size: 1.6rem;
    display: block;
}

.item-quantity {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 0.55rem;
    color: var(--gold-bright);
    font-weight: 700;
}

.item-name {
    font-size: 0.55rem;
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
}

.item-rarity-bar {
    width: 100%;
    height: 2px;
    margin-top: 6px;
    border-radius: 2px;
}

.rarity-common .item-rarity-bar { background: var(--rarity-common); }
.rarity-uncommon .item-rarity-bar { background: var(--rarity-uncommon); }
.rarity-rare .item-rarity-bar { background: var(--rarity-rare); }
.rarity-epic .item-rarity-bar { background: var(--rarity-epic); }
.rarity-legendary .item-rarity-bar { background: var(--rarity-legendary); }
.rarity-mythical .item-rarity-bar { background: var(--rarity-mythical); }

.equipped-badge, .quest-badge {
    position: absolute;
    font-size: 0.6rem;
}

.equipped-badge {
    top: 5px;
    left: 8px;
}

.quest-badge {
    bottom: 5px;
    right: 8px;
}

.inventory-footer {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.pending-notice {
    margin-top: 15px;
    padding: 12px;
    background: rgba(139, 0, 0, 0.2);
    border: 1px solid var(--blood-bright);
    border-radius: 12px;
    text-align: center;
}

/* Детали предмета */
.item-detail-modal {
    max-width: 400px;
}

.item-detail-icon {
    text-align: center;
    font-size: 3rem;
    margin: 15px 0;
}

.item-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 15px;
}

.item-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
    margin: 10px 0;
}

.item-stats h4 {
    color: var(--gold-bright);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
}

.stat-positive {
    color: var(--gold-bright);
}

.item-properties {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
    margin: 10px 0;
    font-size: 0.75rem;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.action-btn.small {
    padding: 8px 15px;
    font-size: 0.7rem;
}

.quest-lock {
    color: var(--blood-light);
    margin-top: 5px;
}

@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Экипировка */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.equipment-slot {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 14px;
    padding: 15px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.equipment-slot:hover {
    border-color: var(--blood-mid);
    transform: translateY(-2px);
}

.equipment-slot.filled {
    border-color: var(--gold-dim);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.slot-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.slot-name {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.slot-item {
    font-size: 0.65rem;
    margin-top: 5px;
}

.equipment-slot.filled .slot-item {
    color: var(--gold-bright);
}

.unequip-btn {
    position: absolute;
    bottom: 5px;
    right: 8px;
    background: rgba(139, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.unequip-btn:hover {
    background: rgba(139, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Выбор предметов для экипировки */
.equip-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.equip-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-item-card:hover {
    background: rgba(139, 0, 0, 0.15);
    transform: translateX(5px);
}

.equip-item-icon {
    font-size: 2rem;
}

.equip-item-info {
    flex: 1;
}

.equip-item-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.equip-item-stats {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.equip-item-select {
    color: var(--gold-bright);
    font-size: 0.8rem;
    opacity: 0.7;
}

.equip-item-card:hover .equip-item-select {
    opacity: 1;
}

@media (max-width: 480px) {
    .equipment-grid {
        grid-template-columns: 1fr;
    }
}
/* В game.css добавьте или исправьте */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equip-items-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Иконки предметов */
.item-image, .equipment-image, .equip-select-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.item-icon-emoji, .equipment-icon-emoji, .equip-select-emoji {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Карточка предмета в инвентаре */
.item-stats-mini {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 4px;
    font-size: 0.6rem;
}

.item-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Слот экипировки */
.equipment-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 2px solid;
    border-radius: 16px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.equipment-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.equipment-slot-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.equipment-slot-info {
    flex: 1;
}

.equipment-slot-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.equipment-slot-item {
    font-size: 0.85rem;
    font-weight: 600;
}

.equipment-slot-stats {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    font-size: 0.7rem;
}

.equipment-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
}

.unequip-btn {
    background: rgba(139, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.unequip-btn:hover {
    background: rgba(139, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Карточка выбора предмета */
.equip-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.equip-item-card:hover {
    background: rgba(139, 0, 0, 0.15);
    transform: translateX(5px);
}

.equip-item-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.equip-item-info {
    flex: 1;
}

.equip-item-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.equip-item-stats {
    display: flex;
    gap: 8px;
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.equip-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.equip-item-select {
    color: var(--gold-bright);
    font-size: 0.8rem;
    opacity: 0.7;
}

.equip-item-card:hover .equip-item-select {
    opacity: 1;
}
/* Слот экипировки */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
}

.equipment-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 2px solid;
    border-radius: 16px;
    padding: 15px;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.equipment-slot:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.equipment-slot.filled {
    background: linear-gradient(135deg, rgba(25, 20, 35, 0.98), rgba(15, 15, 25, 0.95));
}

.equipment-slot-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    margin-bottom: 10px;
    position: relative;
}

.equipment-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
}

.equipment-icon-emoji {
    font-size: 2rem;
}

.equipment-slot-info {
    width: 100%;
    margin-top: 5px;
}

.equipment-slot-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.equipment-slot-item {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    word-break: break-word;
}

.equipment-slot-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
}

.equipment-stat {
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.equipment-stat.positive {
    color: #88ff88;
}

.equipment-stat.crit {
    color: #ffaa44;
}

.equipment-stat.speed {
    color: #88aaff;
}

.unequip-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(139, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unequip-btn:hover {
    background: rgba(139, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Карточка выбора предмета */
.equip-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.equip-item-card:hover {
    background: rgba(139, 0, 0, 0.2);
    border-color: var(--blood-bright);
    transform: translateX(5px);
}

.equip-item-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    flex-shrink: 0;
}

.equip-select-image {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 8px;
}

.equip-select-emoji {
    font-size: 1.8rem;
}

.equip-item-info {
    flex: 1;
}

.equip-item-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.equip-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
}

.equip-select-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}

.equip-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.equip-item-select {
    color: var(--gold-bright);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 15px;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.2s;
}

.equip-item-card:hover .equip-item-select {
    background: rgba(139, 0, 0, 0.4);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .equipment-grid {
        grid-template-columns: 1fr;
    }

    .equip-item-card {
        flex-direction: column;
        text-align: center;
    }

    .equip-item-select {
        margin-top: 8px;
    }
}
/* Детали предмета */
.item-detail-modal {
    max-width: 450px;
}

.item-detail-icon {
    text-align: center;
    margin: 15px 0;
}

.item-detail-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.item-detail-emoji {
    font-size: 4rem;
}

.item-rarity-text {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.item-stats {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0;
}

.item-stats h4 {
    color: var(--gold-bright);
    font-size: 0.85rem;
    margin-bottom: 10px;
    border-left: 3px solid var(--blood-bright);
    padding-left: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
}

.stat-positive {
    color: #88ff88;
}

.item-properties {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0;
}

.quest-lock {
    color: var(--blood-light);
    text-align: center;
    margin-top: 8px;
    font-size: 0.75rem;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.action-btn.danger {
    background: linear-gradient(135deg, #8b0000, #4a0000);
    border-color: #6b0000;
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, #a00000, #6b0000);
}
/* Модальное окно подтверждения */
#confirm-modal .modal-content {
    animation: fadeInUp 0.3s ease;
}

#confirm-modal .modal-body {
    padding: 10px 0;
}

.confirm-details {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.confirm-details img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

#confirm-btn {
    background: linear-gradient(135deg, #8b0000, #4a0000);
    border: 2px solid #6b0000;
    transition: all 0.3s;
}

#confirm-btn:hover {
    background: linear-gradient(135deg, #a00000, #6b0000);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4);
}
/* Инвентарь в виде списка */
.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inventory-item-card {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 14px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.inventory-item-card:hover {
    border-color: var(--blood-mid);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.inventory-item-card.equipped {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(25, 20, 35, 0.98), rgba(15, 15, 25, 0.95));
}

.inventory-item-card.quest-item {
    border-color: rgba(200, 150, 200, 0.5);
}

.inventory-item-content {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.inventory-item-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    flex-shrink: 0;
}

.inventory-item-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

.inventory-item-icon .item-emoji {
    font-size: 2.5rem;
}

.inventory-item-info {
    flex: 1;
    min-width: 200px;
}

.inventory-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.inventory-item-name {
    font-size: 1rem;
    font-weight: 700;
}

.inventory-item-quantity {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--gold-bright);
}

.inventory-item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.inventory-item-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.item-stat-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.item-stat-badge.attack { color: #ff8888; }
.item-stat-badge.defense { color: #88ff88; }
.item-stat-badge.hp { color: #ff6666; }
.item-stat-badge.mp { color: #6699ff; }
.item-stat-badge.crit { color: #ffaa44; }
.item-stat-badge.speed { color: #88aaff; }

.inventory-item-rarity {
    width: 100%;
    height: 3px;
    margin-top: 10px;
    border-radius: 2px;
}

.inventory-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-width: 100px;
}

.inventory-item-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-equip {
    background: linear-gradient(135deg, #4488ff, #0044cc);
    color: white;
}

.btn-equip:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(68, 136, 255, 0.4);
}

.btn-use {
    background: linear-gradient(135deg, #44ff44, #00cc00);
    color: #1a1a2e;
}

.btn-use:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(68, 255, 68, 0.4);
}

.btn-sell {
    background: linear-gradient(135deg, #ffaa44, #cc8800);
    color: #1a1a2e;
}

.btn-sell:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(255, 170, 68, 0.4);
}

.btn-delete-item {
    background: linear-gradient(135deg, #8b0000, #4a0000);
    color: white;
}

.btn-delete-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.4);
}

.btn-unequip {
    background: linear-gradient(135deg, #ff6666, #cc0000);
    color: white;
}

@media (max-width: 768px) {
    .inventory-item-content {
        flex-direction: column;
    }

    .inventory-item-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .inventory-item-header {
        flex-direction: column;
        gap: 5px;
    }
}
/* Инвентарь в виде списка (строчки) */
.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inventory-item-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 12px;
    padding: 10px 15px;
    transition: all 0.2s ease;
    width: 100%;
}

.inventory-item-row:hover {
    border-color: var(--blood-mid);
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98), rgba(15, 15, 25, 0.95));
    transform: translateX(3px);
}

.inventory-item-row.equipped {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(30, 25, 40, 0.98), rgba(20, 20, 30, 0.95));
}

.inventory-item-row.quest-item {
    border-color: rgba(200, 150, 200, 0.5);
}

/* Иконка */
.inventory-row-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    flex-shrink: 0;
}

.inventory-row-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.inventory-row-icon .item-emoji {
    font-size: 1.8rem;
}

/* Информация о предмете (растягивается) */
.inventory-row-info {
    flex: 1;
    min-width: 0;
}

.inventory-row-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.inventory-row-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.inventory-row-quantity {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    color: var(--gold-bright);
}

.inventory-row-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.inventory-row-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.row-stat-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
}

.row-stat-badge.attack { color: #ff8888; }
.row-stat-badge.defense { color: #88ff88; }
.row-stat-badge.hp { color: #ff6666; }
.row-stat-badge.mp { color: #6699ff; }
.row-stat-badge.crit { color: #ffaa44; }

/* Кнопки действий */
.inventory-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.inventory-row-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-row-equip {
    background: linear-gradient(135deg, #4488ff, #0044cc);
    color: white;
}

.btn-row-equip:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(68, 136, 255, 0.4);
}

.btn-row-use {
    background: linear-gradient(135deg, #44ff44, #00cc00);
    color: #1a1a2e;
}

.btn-row-use:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(68, 255, 68, 0.4);
}

.btn-row-sell {
    background: linear-gradient(135deg, #ffaa44, #cc8800);
    color: #1a1a2e;
}

.btn-row-sell:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(255, 170, 68, 0.4);
}

.btn-row-delete {
    background: linear-gradient(135deg, #8b0000, #4a0000);
    color: white;
}

.btn-row-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
}

.btn-row-unequip {
    background: linear-gradient(135deg, #ff6666, #cc0000);
    color: white;
}

.btn-row-unequip:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(255, 102, 102, 0.4);
}

/* Редкость в виде полоски слева */
.inventory-item-row {
    position: relative;
    overflow: hidden;
}

.inventory-item-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--rarity-color, #666);
}

.rarity-common::before { --rarity-color: #9d9d9d; }
.rarity-uncommon::before { --rarity-color: #1eff00; }
.rarity-rare::before { --rarity-color: #0070dd; }
.rarity-epic::before { --rarity-color: #a335ee; }
.rarity-legendary::before { --rarity-color: #ff8000; }
.rarity-mythical::before { --rarity-color: #e6cc80; }

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .inventory-item-row {
        flex-wrap: wrap;
        padding: 12px;
    }

    .inventory-row-actions {
        margin-top: 8px;
        justify-content: flex-end;
        width: 100%;
    }

    .inventory-row-info {
        min-width: 150px;
    }
}
/* Инвентарь в виде списка (строчки) */
.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inventory-item-row {
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.95), rgba(10, 10, 20, 0.98));
    border: 1px solid var(--blood-dark);
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.2s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.inventory-item-row:hover {
    border-color: var(--blood-mid);
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98), rgba(15, 15, 25, 0.95));
}

.inventory-item-row.equipped {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, rgba(30, 25, 40, 0.98), rgba(20, 20, 30, 0.95));
}

/* Полоска редкости слева */
.inventory-item-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--rarity-color, #666);
}

.rarity-common::before { --rarity-color: #9d9d9d; }
.rarity-uncommon::before { --rarity-color: #1eff00; }
.rarity-rare::before { --rarity-color: #0070dd; }
.rarity-epic::before { --rarity-color: #a335ee; }
.rarity-legendary::before { --rarity-color: #ff8000; }
.rarity-mythical::before { --rarity-color: #e6cc80; }

/* Иконка */
.inventory-row-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    flex-shrink: 0;
}

.inventory-row-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.inventory-row-icon .item-emoji {
    font-size: 2rem;
}

/* Информация о предмете */
.inventory-row-info {
    flex: 1;
    min-width: 0;
}

.inventory-row-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.inventory-row-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.inventory-row-quantity {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--gold-bright);
}

/* Описание */
.inventory-row-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Характеристики в одну строку */
.inventory-row-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.row-stat-badge {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.row-stat-badge.attack { color: #ff8888; }
.row-stat-badge.defense { color: #88ff88; }
.row-stat-badge.hp { color: #ff6666; }
.row-stat-badge.mp { color: #6699ff; }
.row-stat-badge.crit { color: #ffaa44; }
.row-stat-badge.speed { color: #88aaff; }
.row-stat-badge.dodge { color: #aaffaa; }
.row-stat-badge.accuracy { color: #ffaa88; }

/* Кнопки вертикально */
.inventory-row-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    min-width: 95px;
}

.inventory-row-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
    width: 100%;
}

.btn-row-equip {
    background: linear-gradient(135deg, #4488ff, #0044cc);
    color: white;
}

.btn-row-equip:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(68, 136, 255, 0.4);
}

.btn-row-use {
    background: linear-gradient(135deg, #44ff44, #00cc00);
    color: #1a1a2e;
}

.btn-row-use:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(68, 255, 68, 0.4);
}

.btn-row-sell {
    background: linear-gradient(135deg, #ffaa44, #cc8800);
    color: #1a1a2e;
}

.btn-row-sell:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(255, 170, 68, 0.4);
}

.btn-row-delete {
    background: linear-gradient(135deg, #8b0000, #4a0000);
    color: white;
}

.btn-row-delete:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.4);
}

.btn-row-unequip {
    background: linear-gradient(135deg, #ff6666, #cc0000);
    color: white;
}

.btn-row-unequip:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 8px rgba(255, 102, 102, 0.4);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .inventory-item-row {
        flex-wrap: wrap;
    }

    .inventory-row-actions {
        flex-direction: row;
        width: 100%;
        margin-top: 10px;
    }

    .inventory-row-actions button {
        flex: 1;
    }
}
/* Список выбора предметов */
.equip-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.equip-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.equip-item-card:hover {
    background: rgba(139, 0, 0, 0.15);
    border-color: var(--blood-bright);
    transform: translateX(5px);
}

.equip-item-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    flex-shrink: 0;
}

.equip-item-info {
    flex: 1;
}

.equip-item-name {
    font-size: 0.9rem;
    font-weight: 700;
}

.equip-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.equip-item-select {
    color: var(--gold-bright);
    font-size: 0.8rem;
    padding: 6px 12px;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 20px;
    white-space: nowrap;
}
/* Модальное окно подтверждения - должно быть поверх всех */
#confirm-modal {
    z-index: 30000 !important;
}

#confirm-modal .modal-content {
    z-index: 30001 !important;
}

/* Модальное окно деталей предмета */
#item-detail-modal {
    z-index: 20000 !important;
}

#item-detail-modal .modal-content {
    z-index: 20001 !important;
}

/* Модальное окно выбора предмета для экипировки */
#equip-select-modal {
    z-index: 25000 !important;
}

#equip-select-modal .modal-content {
    z-index: 25001 !important;
}

/* Общие стили для всех модальных окон */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    border: 2px solid var(--blood-bright);
    border-radius: 20px;
    padding: 25px;
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(139, 0, 0, 0.4);
    position: relative;
}
/* ==================== СТРАНИЦА ПЕРСОНАЖА ==================== */
.character-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.character-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
}

.character-stat-card .stat-icon {
    font-size: 2rem;
}

.character-stat-card .stat-info {
    flex: 1;
}

.character-stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.character-stat-card .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.stat-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.stat-fill.hp-fill {
    background: linear-gradient(90deg, var(--blood), var(--blood-glow));
}

.stat-fill.mp-fill {
    background: linear-gradient(90deg, #003366, #0066cc);
}

.stat-percent {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

.character-section-title {
    font-size: 1rem;
    color: var(--gold-bright);
    margin: 20px 0 12px;
    padding-left: 10px;
    border-left: 3px solid var(--blood-bright);
}

.character-info-grid {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Боевые параметры */
.combat-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.combat-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
}

.combat-stat-card .stat-icon {
    font-size: 1.5rem;
}

.combat-stat-card .stat-info {
    flex: 1;
}

.combat-stat-card .stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.combat-stat-card .stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #88ff88;
}

/* Достижения */
.achievements-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.achievement-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
}

/* PvP */
.pvp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.pvp-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 12px;
}

.pvp-rank-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
    border: 1px solid var(--blood-bright);
    border-radius: 16px;
    padding: 20px;
}

.rank-icon {
    font-size: 4rem;
}

.rank-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-bottom: 5px;
}

.rank-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .character-stats-grid {
        grid-template-columns: 1fr;
    }

    .combat-stats-grid {
        grid-template-columns: 1fr;
    }

    .pvp-rank-card {
        flex-direction: column;
        text-align: center;
    }
}

