* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    min-height: 100vh;
}

/* Статусные сообщения для ваучеров */
.voucher-status-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.voucher-status-message.loading {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.5);
    color: #4a9eff;
}

.voucher-status-message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.voucher-status-message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #f44336;
}

/* Навигация */
.nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(20, 20, 40, 0.95);
    padding: 12px 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-btn.active {
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

.nav-icon {
    font-size: 20px;
}

.nav-text {
    font-size: 11px;
}

/* Контент */
.content {
    padding: 20px 16px;
    padding-bottom: 80px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Заголовок персонажа */
.character-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.character-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2) 0%, rgba(255, 107, 53, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(74, 158, 255, 0.5);
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.character-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.character-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.avatar-icon {
    font-size: 64px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.character-name {
    font-size: 28px;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 8px;
}

.character-class {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 12px;
}

.character-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 20px;
    font-size: 14px;
    color: #ff6b35;
}

#premium-status-text {
    white-space: nowrap;
}

.premium-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,140,0,0.1));
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 8px;
    min-width: 220px;
    justify-content: center;
    font-size: 14px;
    color: #ffd700;
}

.status-icon {
    font-size: 16px;
}

/* Уровень и опыт */
.level-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.level-label {
    font-size: 14px;
    color: #aaa;
}

.level-value {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b35;
}

.exp-info {
    margin-top: 12px;
}

.exp-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}

.exp-bar-container {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.exp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff 0%, #6bb6ff 100%);
    border-radius: 12px;
    transition: width 0.5s ease;
    width: 0%;
}

.exp-text {
    font-size: 12px;
    color: #888;
    text-align: right;
}

/* Секции */
.stats-section,
.inventory-section,
.equipment-section,
.current-equipment-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.section-icon {
    font-size: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.section-subtitle {
    font-size: 12px;
    color: #888;
    width: 100%;
    margin-top: -8px;
    margin-left: 32px;
}

.hide-btn,
.show-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.3);
    color: #4a9eff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.hide-btn:hover,
.show-btn:hover {
    background: rgba(74, 158, 255, 0.3);
}

.arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.filter-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.3);
    color: #4a9eff;
}

/* Статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-name {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.stat-sub-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    justify-content: center;
}

.stat-sub-icon {
    font-size: 16px;
}

.stat-sub-name {
    font-size: 10px;
    color: #aaa;
}

.stat-sub-value {
    font-size: 14px;
    font-weight: 600;
    color: #4a9eff;
}

/* Инвентарь */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.inventory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.item-name {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 4px;
    text-align: center;
}

.item-value {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

/* Экипировка */
.equipment-content {
    margin-top: 16px;
}

.equipment-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sort-controls,
.filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 150px;
}

.sort-controls label,
.filter-controls label {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.equipment-select {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-select:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.skills-container {
    margin-top: 20px;
}

.skills-header h1 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.equipped-skills-section {
    margin-bottom: 30px;
}

.equipped-skills-section h2 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 16px;
}

.equipped-active-skills,
.equipped-passive-skills {
    margin-bottom: 16px;
}

#equipped-active-skills-grid,
#equipped-passive-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 100%;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-item.equipped {
    border-color: rgba(90, 255, 196, 0.5);
    box-shadow: 0 0 12px rgba(90, 255, 196, 0.2);
}

.skill-item.active {
    border-color: rgba(255, 60, 60, 0.4);
}

.skill-item.active.equipped {
    border-color: rgba(255, 60, 60, 0.8);
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.4);
}

.skill-item.passive {
    border-color: rgba(74, 158, 255, 0.4);
}

.skill-item.passive.equipped {
    border-color: rgba(74, 158, 255, 0.8);
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.4);
}

.all-skills-section {
    margin-top: 30px;
}

.all-skills-section .section-header {
    cursor: pointer;
    user-select: none;
}

.all-skills-section .section-header h2 {
    font-size: 18px;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.all-skills-content {
    margin-top: 16px;
}

.skill-item:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.skill-icon.placeholder,
.skill-icon.empty {
    font-size: 26px;
    color: #8ce5ff;
    text-shadow: 0 0 10px rgba(140, 229, 255, 0.7);
}

.skill-icon.empty {
    border-style: dashed;
    color: #666;
    text-shadow: none;
}

.skill-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: #fff;
}

.skill-level {
    margin-top: 6px;
    font-size: 11px;
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.15);
    padding: 2px 8px;
    border-radius: 999px;
}

.skill-item-profile.locked {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.7;
    cursor: pointer;
}

.skill-item-profile.locked:hover {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.05);
    opacity: 1;
    transform: translateY(-2px);
}

.skill-icon-profile.locked {
    border-style: solid;
    border-color: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.skill-name-profile.locked {
    color: #ffd700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Стили для скиллов на вкладке Профиль (уменьшенные) */
.skills-section {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-skills-content {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equipped-active-skills-profile,
.equipped-passive-skills-profile {
    margin-bottom: 12px;
    width: fit-content;
    max-width: 100%;
}

/* Ограничиваем ширину контейнеров экипированных навыков */
#equipped-active-skills-profile-grid,
#equipped-passive-skills-profile-grid {
    width: fit-content;
    margin: 0 auto;
}

.skills-grid-profile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

#equipped-active-skills-profile-grid,
#equipped-passive-skills-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 4px;
    width: fit-content;
    margin: 0 auto;
}

/* Десктопная версия - расстояние между навыками */
@media (min-width: 300px) {
    #equipped-active-skills-profile-grid,
    #equipped-passive-skills-profile-grid {
        gap: 6px;
    }
}

#equipped-active-skills-profile-grid .skill-item-profile,
#equipped-passive-skills-profile-grid .skill-item-profile {
    width: 100px;
    height: 100px;
    min-height: 100px;
    aspect-ratio: 1;
    padding: 8px;
    justify-content: space-between;
}

#equipped-active-skills-profile-grid .skill-icon-profile,
#equipped-passive-skills-profile-grid .skill-icon-profile {
    width: 80px;
    height: 80px;
    margin-bottom: 4px;
    border-radius: 12px;
}

#equipped-active-skills-profile-grid .skill-icon-profile.placeholder,
#equipped-passive-skills-profile-grid .skill-icon-profile.placeholder,
#equipped-active-skills-profile-grid .skill-icon-profile.empty,
#equipped-passive-skills-profile-grid .skill-icon-profile.empty {
    font-size: 32px;
}

#equipped-active-skills-profile-grid .skill-name-profile,
#equipped-passive-skills-profile-grid .skill-name-profile {
    display: none;
}

#equipped-active-skills-profile-grid .skill-level-profile,
#equipped-passive-skills-profile-grid .skill-level-profile {
    margin-top: 0;
    font-size: 10px;
    padding: 2px 6px;
}

.all-skills-section-profile {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.all-skills-section-profile .section-header {
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
}

.all-skills-section-profile .section-header h2 {
    font-size: 16px;
    color: #fff;
    margin: 0;
}

.all-skills-content-profile {
    margin-top: 12px;
}

/* Стили для навыков в секции "Все навыки" */
#all-skills-grid-profile .skill-item-profile {
    padding: 10px 8px;
    justify-content: space-between;
}

#all-skills-grid-profile .skill-icon-profile {
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    border-radius: 12px;
}

#all-skills-grid-profile .skill-icon-profile.placeholder,
#all-skills-grid-profile .skill-icon-profile.empty {
    font-size: 28px;
}

#all-skills-grid-profile .skill-name-profile {
    display: none;
}

#all-skills-grid-profile .skill-level-profile {
    margin-top: 0;
    font-size: 10px;
    padding: 2px 6px;
}

/* Стили для выбора навыков в модальном окне */
.skill-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.skill-selection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-selection-item:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.35);
}

.skill-selection-item.current {
    border-color: rgba(90, 255, 196, 0.5);
    box-shadow: 0 0 12px rgba(90, 255, 196, 0.2);
}

.skill-selection-item.equipped {
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.3);
}

.skill-selection-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.skill-selection-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.skill-selection-icon .skill-icon-placeholder {
    font-size: 24px;
    color: #8ce5ff;
    text-shadow: 0 0 10px rgba(140, 229, 255, 0.7);
}

.skill-selection-name {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    line-height: 1.2;
    word-break: break-word;
}

.skill-item-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    min-height: 80px;
}

/* Для экипированных навыков - фиксированный размер 100x100 */
#equipped-active-skills-profile-grid .skill-item-profile,
#equipped-passive-skills-profile-grid .skill-item-profile {
    width: 100px;
    height: 100px;
    min-height: 100px;
    max-width: 100px;
    max-height: 100px;
    padding: 8px;
    justify-content: space-between;
}

.skill-item-profile.equipped {
    border-color: rgba(90, 255, 196, 0.5);
    box-shadow: 0 0 8px rgba(90, 255, 196, 0.2);
}

.skill-item-profile:hover {
    transform: translateY(-2px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skill-icon-profile {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.skill-icon-profile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.skill-icon-profile.placeholder,
.skill-icon-profile.empty {
    font-size: 14px;
    color: #8ce5ff;
    text-shadow: 0 0 8px rgba(140, 229, 255, 0.7);
}

.skill-icon-profile.empty {
    border-style: dashed;
    color: #666;
    text-shadow: none;
}

.skill-name-profile {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    line-height: 1.2;
    word-break: break-word;
}

.skill-level-profile {
    margin-top: 4px;
    font-size: 9px;
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.15);
    padding: 1px 6px;
}

.skill-stats-profile {
    margin-top: 4px;
    font-size: 8px;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 480px) {
    .skills-grid-profile {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 8px;
    }
    
    .skill-icon-profile {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .skill-icon-profile.placeholder,
    .skill-icon-profile.empty {
        font-size: 18px;
    }
    
    .skill-name-profile {
        font-size: 10px;
    }
    
    .skill-level-profile {
        font-size: 9px;
        padding: 2px 5px;
    }
}

/* Модалка навыков */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-content {
    width: min(480px, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(15, 25, 45, 0.95), rgba(12, 18, 32, 0.9));
    border: 1px solid rgba(74, 158, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: modal-pop 0.18s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(74, 158, 255, 0.08);
    border-bottom: 1px solid rgba(74, 158, 255, 0.2);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.modal-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(74, 158, 255, 0.15);
    display: flex;
    gap: 12px;
}

.modal-footer .action-btn {
    flex-direction: row;
    padding: 12px 20px;
    height: 48px;
    justify-content: center;
    border-radius: 10px;
    margin: 0;
}

.modal-footer .action-btn .btn-icon {
    font-size: 20px;
}

.skill-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.skill-icon.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    flex-shrink: 0;
}

.skill-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
    font-size: 12px;
    border: 1px solid rgba(74, 158, 255, 0.25);
    width: fit-content;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.actions-grid .action-btn {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.actions-grid .action-btn.primary {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    border-color: rgba(74, 158, 255, 0.35);
}

.actions-grid .action-btn.danger {
    background: rgba(255, 99, 99, 0.12);
    border-color: rgba(255, 99, 99, 0.35);
    color: #ff8b8b;
}

.actions-grid .action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Стили для статистик скилла */
.skill-stats {
    margin: 16px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-stats .stat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-stats .stat-item:last-child {
    border-bottom: none;
}

.skill-stats .stat-item span:first-child {
    color: #aaa;
}

.skill-stats .stat-item span:last-child {
    color: #fff;
    font-weight: 600;
}

/* Стили для урона/лечения скилла */
.skill-damage-heal {
    margin: 16px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.damage-stat, .heal-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.damage-stat {
    background: rgba(255, 99, 99, 0.15);
    border: 1px solid rgba(255, 99, 99, 0.3);
    color: #ff8b8b;
}

.damage-stat.pure {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.heal-stat {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #81c784;
}

.damage-stat .label, .heal-stat .label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.damage-stat .value, .heal-stat .value {
    font-size: 16px;
    font-weight: 700;
}

/* Стили для кнопок на кристаллах/осколках в инвентаре */
.item-actions {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-btn-small {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(74, 158, 255, 0.2);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
}

.action-btn-small.primary {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    border-color: rgba(74, 158, 255, 0.35);
}

.action-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.4);
    background: linear-gradient(135deg, #5aaeff 0%, #458bcd 100%);
}

.action-btn-small:active {
    transform: translateY(0);
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Адаптация модалки для мобильных */
@media (max-width: 600px) {
    .modal {
        padding: 12px;
        align-items: flex-end;
    }
    .modal-content {
        width: 100%;
        border-radius: 14px 14px 10px 10px;
        max-height: 85vh;
    }
    .modal-body {
        padding: 14px;
    }
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

.equipment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.equipment-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(74, 158, 255, 0.3);
    transform: translateY(-2px);
}

/* Иконка экипировки в инвентаре - уменьшенная и оптимизированная */
.equipment-item-image {
    position: relative;
    width: 64px;
    height: 64px;
    border: 2px solid;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.equipment-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.equipment-image-placeholder {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Цветная точка редкости (сверху слева) */
.equipment-rarity-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.8), inset 0 0 2px rgba(255, 255, 255, 0.3);
    z-index: 2;
    pointer-events: none;
}

/* Бейдж уровня (по центру снизу) */
.equipment-level-badge-inventory {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 40, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 4px rgba(74, 158, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    z-index: 2;
    pointer-events: none;
    line-height: 1;
    white-space: nowrap;
    min-width: 20px;
    text-align: center;
}

/* Информация об экипировке в инвентаре */
.equipment-item-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.equipment-item-name {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.equipment-item-slot {
    font-size: 9px;
    color: #aaa;
    text-align: center;
    line-height: 1.2;
}

.equipment-item-stats {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2px;
}

.stat-badge {
    font-size: 9px;
    padding: 2px 5px;
    background: rgba(74, 158, 255, 0.15);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 4px;
    color: #4a9eff;
    line-height: 1;
    white-space: nowrap;
}

.item-count {
    margin-right: 8px;
    color: #4a9eff;
}

/* Детали персонажа */
.character-details {
    padding: 20px;
}

.character-details h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

/* Кнопки действий */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 12px;
    color: #4a9eff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.action-btn:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 32px;
}

.coming-soon {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.locations-container,
.rating-container,
.auction-container {
    padding: 20px;
}

.locations-container h2,
.rating-container h2,
.auction-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

/* Адаптивность для мобильных устройств */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 768px) {
    .content {
        padding: 16px 12px;
        padding-bottom: 90px;
    }

    .character-header {
        padding: 16px;
        margin-bottom: 16px;
    }

    .character-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }

    .avatar-icon {
        font-size: 56px;
    }

    .character-name {
        font-size: 24px;
    }

    .level-section,
    .stats-section,
    .inventory-section,
    .equipment-section,
    .current-equipment-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Мобильные телефоны (портретная ориентация) */
@media (max-width: 480px) {
    .content {
        padding: 12px 8px;
        padding-bottom: 90px;
    }

    /* Навигация для мобильных */
    .nav-bar {
        padding: 10px 4px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }

    .nav-btn {
        padding: 6px 8px;
        min-width: 0;
        flex: 1;
    }

    .nav-icon {
        font-size: 20px;
    }

    .nav-text {
        font-size: 10px;
        line-height: 1.2;
    }

    /* Заголовок персонажа */
    .character-header {
        padding: 14px;
        margin-bottom: 12px;
    }

    .character-avatar {
        width: 90px;
        height: 90px;
        margin-bottom: 12px;
    }

    .avatar-icon {
        font-size: 48px;
    }

    .character-name {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .character-status {
        padding: 6px 12px;
        font-size: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .status-icon {
        font-size: 14px;
    }

    /* Уровень и опыт */
    .level-section {
        padding: 14px;
        margin-bottom: 12px;
    }

    .level-value {
        font-size: 20px;
    }

    .exp-bar-container {
        height: 20px;
    }

    .exp-label,
    .exp-text {
        font-size: 11px;
    }

    /* Секции */
    .stats-section,
    .inventory-section,
    .equipment-section,
    .current-equipment-section {
        padding: 14px;
        margin-bottom: 12px;
    }

    .section-header {
        gap: 8px;
        margin-bottom: 12px;
    }

    .section-icon {
        font-size: 18px;
    }

    .section-header h2 {
        font-size: 15px;
    }

    .section-subtitle {
        font-size: 11px;
        margin-left: 26px;
    }

    .hide-btn,
    .show-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .filter-buttons {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        justify-content: flex-start;
    }

    .filter-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    /* Статистики */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-item {
        padding: 10px 6px;
    }

    .stat-icon {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .stat-name {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-sub-item {
        margin-top: 6px;
        padding-top: 6px;
    }

    .stat-sub-name {
        font-size: 9px;
    }

    .stat-sub-value {
        font-size: 12px;
    }

    /* Инвентарь */
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .inventory-item {
        padding: 12px 8px;
    }

    .item-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .item-name {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .item-value {
        font-size: 14px;
    }

    /* Экипировка */
    .equipment-content {
        margin-top: 12px;
    }
    
    .equipment-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .equipment-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .equipment-item {
        padding: 10px 8px;
    }

    /* Детали персонажа */
    .character-details {
        padding: 12px;
    }

    .character-details h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .detail-item {
        padding: 12px;
    }

    .detail-label {
        font-size: 11px;
    }

    .detail-value {
        font-size: 16px;
    }

    /* Кнопки действий */
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 16px 0;
    }

    .action-btn {
        padding: 16px;
        font-size: 13px;
    }

    .btn-icon {
        font-size: 28px;
    }

    .coming-soon {
        font-size: 12px;
        padding: 16px;
        margin-top: 16px;
    }

    .locations-container,
    .rating-container,
    .auction-container {
        padding: 12px;
    }

    .locations-container h2,
    .rating-container h2,
    .auction-container h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
}

/* Очень маленькие экраны (менее 360px) */
@media (max-width: 360px) {
    .content {
        padding: 10px 6px;
        padding-bottom: 85px;
    }

    .character-avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .avatar-icon {
        font-size: 40px;
    }

    .character-name {
        font-size: 20px;
    }

    .nav-text {
        font-size: 9px;
    }

    .nav-icon {
        font-size: 18px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-item {
        padding: 10px 6px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .stat-value {
        font-size: 16px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-bar {
        position: sticky;
        top: 0;
        bottom: auto;
        border-top: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .content {
        padding-bottom: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .inventory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Улучшение touch-интерфейса */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .hide-btn,
    .show-btn,
    .filter-btn,
    .action-btn,
    .equipment-item {
        -webkit-tap-highlight-color: rgba(74, 158, 255, 0.3);
    }

    .nav-btn:active,
    .hide-btn:active,
    .show-btn:active,
    .filter-btn:active,
    .action-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* Предотвращение горизонтальной прокрутки */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .app-container {
        overflow-x: hidden;
    }
}

/* Оптимизация для VK Mini App в мобильном приложении */
@media (max-width: 480px) {
    /* Улучшение читаемости на маленьких экранах */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Улучшение прокрутки */
    .content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Настройки */
.settings-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 12px;
    color: #4a9eff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
}

.settings-btn:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

.settings-icon {
    font-size: 24px;
    margin-right: 12px;
}

.settings-text {
    flex: 1;
    text-align: left;
}

.settings-arrow {
    font-size: 20px;
    opacity: 0.7;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.setting-description {
    font-size: 12px;
    color: #aaa;
    margin-top: -8px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-checkbox {
    width: 48px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.setting-checkbox.active {
    background: rgba(74, 158, 255, 0.8);
    border-color: rgba(74, 158, 255, 1);
}

.setting-checkbox::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.setting-checkbox.active::after {
    left: calc(100% - 22px);
}

.setting-slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.setting-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
}

.setting-slider {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4a9eff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.setting-slider::-webkit-slider-thumb:hover {
    background: #5aaeff;
    transform: scale(1.1);
}

.setting-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4a9eff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.setting-slider::-moz-range-thumb:hover {
    background: #5aaeff;
    transform: scale(1.1);
}

.setting-slider-value {
    font-size: 14px;
    font-weight: 600;
    color: #4a9eff;
    min-width: 50px;
    text-align: right;
}

.setting-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.premium-required {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #ffd700;
    font-size: 12px;
    margin-top: 8px;
}

.premium-required-icon {
    font-size: 16px;
}

.inventory-container {
    padding: 0;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Распределение очков характеристик */
.stat-allocation-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.allocation-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.allocation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.allocation-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.allocation-icon {
    font-size: 24px;
}

.allocation-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.allocation-name {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.allocation-description {
    font-size: 11px;
    color: #888;
}

.allocation-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.allocation-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.allocation-btn:hover:not(:disabled) {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.5);
}

.allocation-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.allocation-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.allocation-value {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 60px;
    justify-content: center;
}

.current-value {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.change-value {
    font-size: 14px;
    font-weight: 600;
}

.allocation-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.allocation-actions .action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.allocation-actions .action-btn.primary {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: #fff;
}

.allocation-actions .action-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5aaeff 0%, #458acd 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.allocation-actions .action-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.allocation-actions .action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.allocation-actions .action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 480px) {
    .allocation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .allocation-controls {
        width: 100%;
        justify-content: space-between;
    }

    .allocation-actions {
        flex-direction: column;
    }
}

/* Кланы */
.clan-container {
    padding: 20px;
}

.clan-no-clan {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
    padding: 20px;
    visibility: visible !important;
    opacity: 1 !important;
}


.clan-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.clan-empty-state h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #fff;
}

.clan-empty-state p {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 32px;
}

.clan-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.clan-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clan-btn.primary {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.clan-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
}

.clan-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.clan-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.clan-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.clan-header {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-header h1 {
    font-size: 28px;
    margin-bottom: 16px;
    color: #fff;
}

.clan-code {
    font-size: 18px;
    color: #4a9eff;
    font-weight: normal;
    margin-left: 8px;
    opacity: 0.8;
}

.clan-info {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.clan-level,
.clan-fund,
.clan-bonus {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.info-label {
    color: #aaa;
}

.clan-exp {
    margin-top: 16px;
}

.exp-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.exp-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff 0%, #357abd 100%);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.exp-text {
    font-size: 14px;
    color: #aaa;
    text-align: center;
}

.clan-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.clan-members-section,
.clan-statistics-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-members-section h2,
.clan-statistics-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #fff;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.clan-search-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-label {
    color: #aaa;
}

.clan-search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clan-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.clan-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clan-list-name {
    font-size: 16px;
    color: #fff;
}

.clan-list-meta {
    font-size: 14px;
    color: #aaa;
}

.clan-apply-btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}

.clan-apply-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clan-search-pagination {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.pager {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pager-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pager-info {
    color: #aaa;
}

.nav-badge {
    margin-left: 6px;
    background: #ff4d4f;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
}

.applications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.application-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.application-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.application-name {
    color: #fff;
    font-size: 16px;
}

.application-meta {
    color: #aaa;
    font-size: 14px;
}

.application-actions {
    display: flex;
    gap: 8px;
}

.approve-btn,
.reject-btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.approve-btn { border-color: rgba(76, 175, 80, 0.5); }
.reject-btn { border-color: rgba(244, 67, 54, 0.5); }

.member-reputation {
    font-size: 13px;
    color: #ffd700;
    margin-bottom: 6px;
}

.member-reputation .rep-value {
    font-weight: 700;
}

.leader-badge {
    color: #ffd700;
    font-size: 18px;
}

.you-badge {
    color: #4a9eff;
    font-size: 14px;
}

.member-level {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
}

.member-contribution {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contribution-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.contribution-item .label {
    color: #aaa;
}

.contribution-item .value {
    color: #4a9eff;
    font-weight: 600;
}

.remove-member-btn {
    background: rgba(255, 99, 99, 0.15);
    border: 1px solid rgba(255, 99, 99, 0.3);
    color: #ff8b8b;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.remove-member-btn:hover {
    background: rgba(255, 99, 99, 0.25);
    transform: scale(1.1);
}

.statistics-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-item {
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.stat-level {
    font-size: 14px;
    color: #aaa;
}

.stat-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.stat-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff 0%, #357abd 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.stat-details {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.stat-amount {
    color: #4a9eff;
    font-weight: 600;
}

.stat-percentage {
    color: #aaa;
}

.statistics-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 18px;
    color: #fff;
}

.empty-message {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
    font-size: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: #aaa;
}

.form-group input {
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.form-group small {
    font-size: 12px;
    color: #888;
}

.user-preview {
    padding: 12px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(74, 158, 255, 0.2);
    margin-top: 12px;
}

.gold-icon {
    color: #ffd700;
}

@media (max-width: 480px) {
    .clan-action-buttons {
        flex-direction: column;
    }
    
    .clan-btn {
        width: 100%;
        justify-content: center;
    }
    
    .clan-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .member-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .remove-member-btn {
        align-self: flex-end;
    }
}

/* Модальное окно детальной информации об экипировке */
.equipment-modal-content {
    max-width: 980px;
    width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
}

.equipment-modal-body {
    padding: 20px;
}

.equipment-detail-container {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    width: 100%;
}

.equipment-detail-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.equipment-image-wrapper {
    width: 200px;
    height: 200px;
    border: 3px solid;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.equipment-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.equipment-level-badge {
    padding: 6px 12px;
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
    color: #4a9eff;
    font-size: 14px;
    font-weight: 600;
}

.equipment-detail-stats-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.equipment-detail-rarity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.rarity-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.equipment-detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #4a9eff;
    margin-bottom: 12px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(74, 158, 255, 0.3);
    padding-bottom: 8px;
}

.equipment-detail-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.equipment-detail-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-name {
    font-size: 14px;
    color: #aaa;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.equipment-detail-bottom-section {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.equipment-suitable-list-container {
    grid-column: 1 / -1;
}

.equipment-detail-params {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.equipment-detail-attack-defense {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.attack-defense-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    color: #fff;
}

.attack-defense-item span:first-child {
    font-size: 18px;
}

.equipment-detail-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.equipment-detail-param-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Диффы статов/параметров */
.stat-diff {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
}
.diff-positive { color: #4ade80; }
.diff-negative { color: #f87171; }
.diff-neutral { color: #a0aec0; }

.param-icon {
    font-size: 24px;
}

.equipment-detail-param-icon-item .param-value {
    font-size: 12px;
    font-weight: 600;
    color: #4a9eff;
}

/* ============================================================================
   МАГАЗИН
   ============================================================================ */

.shop-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.shop-header {
    text-align: center;
    margin-bottom: 30px;
}

.shop-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    color: #fff;
}

.shop-subtitle {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}

.shop-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-label {
    color: #aaa;
}

.balance-value {
    font-size: 20px;
    font-weight: 600;
    color: #4a9eff;
}

.balance-currency {
    color: #aaa;
}

.refresh-btn {
    padding: 6px 12px;
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 6px;
    color: #4a9eff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: rgba(74, 158, 255, 0.3);
}

.shop-section {
    margin-bottom: 30px;
}

.platinum-card {
    background: rgba(20, 15, 10, 0.6);
    border: 1px solid rgba(184, 134, 11, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.platinum-card .shop-item-header {
    margin-bottom: 0;
    flex: 1;
    min-width: 120px;
}

.shop-item-icon {
    font-size: 32px;
}

.platinum-balance-display {
    font-size: 14px;
    color: #d4af37;
    font-weight: 500;
    white-space: nowrap;
}

.platinum-card .platinum-balance-display {
    margin-bottom: 0;
}

.platinum-input-group {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.platinum-input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

.buy-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b7355 0%, #6b5d4f 100%);
    border: 1px solid rgba(184, 134, 11, 0.4);
    border-radius: 6px;
    color: #f5deb3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.buy-btn:hover {
    background: linear-gradient(135deg, #9d8565 0%, #7b6d5f 100%);
    border-color: rgba(184, 134, 11, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.platinum-card .buy-btn {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.platinum-minimum {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.platinum-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.preset-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.preset-btn:hover,
.preset-btn.active {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
    color: #ff4444;
}

.platinum-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.shop-item-card {
    background: rgba(20, 15, 10, 0.5);
    border: 1px solid rgba(139, 69, 19, 0.4);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shop-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    border-color: rgba(184, 134, 11, 0.5);
}

.shop-item-card h3 {
    font-size: 16px;
    margin: 12px 0 8px;
    color: #d4af37;
    font-weight: 600;
}

.shop-item-card p {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 12px;
}

.shop-item-card .buy-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

.avatars-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.avatars-content {
    margin-top: 20px;
}

.avatars-info {
    margin-bottom: 20px;
}

.avatars-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.avatars-info p {
    color: #aaa;
    font-size: 14px;
}

.avatars-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}

.avatar-spin-section {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.avatar-spin-section h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.avatar-spin-section p {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 16px;
}

.spin-btn {
    width: 100%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b7355 0%, #6b5d4f 100%);
    border: 1px solid rgba(184, 134, 11, 0.4);
    border-radius: 6px;
    color: #f5deb3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.spin-btn:hover {
    background: linear-gradient(135deg, #9d8565 0%, #7b6d5f 100%);
    border-color: rgba(184, 134, 11, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.spin-note {
    font-size: 12px;
    color: #888;
}

.avatar-gallery-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.avatar-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.avatar-item {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-item:hover {
    border-color: rgba(74, 158, 255, 0.5);
    transform: scale(1.05);
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-collection-section {
    margin-top: 30px;
}

.avatar-collection-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.avatar-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.empty-collection {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    font-style: italic;
}

/* Ваучеры в инвентаре */
.voucher-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
}

.activate-voucher-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.activate-voucher-btn:hover {
    background: linear-gradient(135deg, #5aaeff 0%, #458acd 100%);
    transform: translateY(-1px);
}

/* Аватар персонажа */
.character-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Визуальное различие осколков и кристаллов памяти в инвентаре */
.skill-memory-item.shard {
    border-color: rgba(74, 158, 255, 0.5);
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.12), rgba(0, 0, 0, 0.35));
}

.skill-memory-item.crystal {
    border-color: rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.16), rgba(0, 0, 0, 0.35));
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}

.equipment-detail-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.equipment-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.equipment-action-btn.primary {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.equipment-action-btn.primary:hover {
    background: linear-gradient(135deg, #5aaeff 0%, #458acd 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 158, 255, 0.4);
}

.equipment-action-btn.danger {
    background: rgba(255, 99, 99, 0.15);
    border: 1px solid rgba(255, 99, 99, 0.3);
    color: #ff8b8b;
}

.equipment-action-btn.danger:hover {
    background: rgba(255, 99, 99, 0.25);
    transform: translateY(-2px);
}

.equipment-action-btn .btn-icon {
    font-size: 18px;
}

.empty-stat {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 12px;
    font-style: italic;
}

@media (max-width: 768px) {
    .equipment-detail-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .equipment-detail-image-section {
        align-items: center;
    }
    
    .equipment-detail-bottom-section {
        grid-column: 1;
    }
    
    .equipment-detail-params-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 100%;
    }
    
    .equipment-detail-actions {
        flex-direction: column;
    }
    
    .equipment-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Fantasy стили для экрана авторизации */
.auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(75, 0, 130, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 50%, #0a0a1a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Анимированный фон с частицами */
.auth-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 215, 0, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(139, 0, 0, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particleMove {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
    50% { background-position: 100% 100%, 0% 0%, 50% 50%; }
}

.auth-container {
    background: 
        linear-gradient(135deg, rgba(20, 10, 30, 0.95) 0%, rgba(30, 15, 40, 0.95) 100%);
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(139, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(139, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Свечение по краям */
.auth-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(139, 0, 0, 0.5),
        rgba(75, 0, 130, 0.5),
        rgba(139, 0, 0, 0.5));
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.auth-title {
    font-size: 3em;
    font-weight: 900;
    background: linear-gradient(135deg, 
        #ff6b35 0%, 
        #f7931e 30%,
        #ffd700 50%,
        #f7931e 70%,
        #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    letter-spacing: 2px;
    position: relative;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
}

.auth-subtitle {
    color: #aaa;
    font-size: 1.1em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.auth-content {
    text-align: center;
}

.auth-description {
    margin-bottom: 35px;
    color: #ddd;
    line-height: 1.8;
    font-size: 1.05em;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.vk-auth-button {
    width: 100%;
    padding: 18px 35px;
    background: linear-gradient(135deg, #0077ff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 20px rgba(0, 119, 255, 0.4),
        0 0 30px rgba(0, 119, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.vk-auth-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.vk-auth-button:hover::before {
    left: 100%;
}

.vk-auth-button:hover {
    background: linear-gradient(135deg, #0088ff 0%, #0066cc 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 119, 255, 0.5),
        0 0 40px rgba(0, 119, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.vk-auth-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 15px rgba(0, 119, 255, 0.4),
        inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.vk-auth-button svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.auth-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(139, 0, 0, 0.3);
    position: relative;
}

.auth-footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 107, 53, 0.6), 
        transparent);
}

.auth-note {
    font-size: 0.85em;
    color: #888;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Стили для VK ID One Tap виджета */
#vk-id-one-tap {
    margin-bottom: 20px;
}

/* Скрытие/показ элементов */
.app-content {
    display: block;
}

.auth-screen.hidden {
    display: none !important;
}

.app-content.hidden {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 2em;
    }
}

/* ============================================================================
   Ремесленный манускрипт + чертежи
   ============================================================================ */

.crafting-manual-item {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, rgba(160, 110, 255, 0.18), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(160, 110, 255, 0.35);
}

.crafting-manual-item:hover {
    transform: translateY(-2px);
    border-color: rgba(160, 110, 255, 0.55);
}

.crafting-manual-item .crafting-manual-hint {
    position: absolute;
    left: 10px;
    bottom: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.book-anim {
    display: inline-block;
    animation: bookFloat 3.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(160, 110, 255, 0.25));
}

@keyframes bookFloat {
    0% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-2px); }
    100% { transform: rotate(-2deg) translateY(0); }
}

.crafting-manual-subtitle {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.blueprints-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blueprint-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.25);
}

.bp-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 32px;
}

.bp-main {
    flex: 1;
    min-width: 0;
}

.bp-name {
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-meta {
    color: #9a9a9a;
    font-size: 11px;
    margin-top: 3px;
}

.bp-rarity {
    font-weight: 700;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex: 0 0 auto;
}

.blueprints-empty {
    padding: 18px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.18);
    text-align: center;
}

.blueprints-empty .empty-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 6px;
}

.blueprints-empty .empty-subtitle {
    color: #9a9a9a;
    font-size: 12px;
}

/* Цвета редкости (фон/акцент) */
.blueprint-row.rarity-common { border-left: 4px solid #bdbdbd; }
.blueprint-row.rarity-uncommon { border-left: 4px solid #5ad469; }
.blueprint-row.rarity-rare { border-left: 4px solid #4a9eff; }
.blueprint-row.rarity-epic { border-left: 4px solid #b36bff; }
.blueprint-row.rarity-legendary { border-left: 4px solid #ffb020; }

.blueprint-row.rarity-common .bp-rarity { color: #d0d0d0; }
.blueprint-row.rarity-uncommon .bp-rarity { color: #5ad469; }
.blueprint-row.rarity-rare .bp-rarity { color: #4a9eff; }
.blueprint-row.rarity-epic .bp-rarity { color: #b36bff; }
.blueprint-row.rarity-legendary .bp-rarity { color: #ffb020; }

/* Магазин: подсветка карточки манускрипта */
.shop-item-card.crafting-manual-card {
    border: 1px solid rgba(160, 110, 255, 0.35);
    background: radial-gradient(circle at 30% 20%, rgba(160, 110, 255, 0.12), rgba(255, 255, 255, 0.03));
}

/* ============================================================================
   ТАБЛИЦА РЕЙТИНГОВ (LEADERBOARD)
   ============================================================================ */
.leaderboard-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.leaderboard-filters::-webkit-scrollbar {
    height: 4px;
}

.leaderboard-filters::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-filters::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.lb-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.lb-filter-btn.active {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.4);
    color: #4a9eff;
    font-weight: 600;
}

.lb-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s;
}

.leaderboard-item.current-user {
    background: rgba(74, 158, 255, 0.1);
    border-color: rgba(74, 158, 255, 0.3);
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.1);
}

.lb-rank {
    font-size: 18px;
    font-weight: 700;
    color: #888;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.lb-rank.top-1 { color: #ffd700; font-size: 22px; }
.lb-rank.top-2 { color: #c0c0c0; font-size: 20px; }
.lb-rank.top-3 { color: #cd7f32; font-size: 20px; }

.lb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    margin-right: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.lb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lb-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

.lb-score {
    font-size: 16px;
    font-weight: 700;
    color: #4a9eff;
    margin-left: 12px;
    white-space: nowrap;
}

.lb-score.gold { color: #ffd700; }
.lb-score.br { color: #ff6b35; }

.lb-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-style: italic;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.lb-select {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.lb-select:focus {
    border-color: #4a9eff;
}

.leaderboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.lb-page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.lb-page-btn:hover:not(:disabled) {
    background: rgba(74, 158, 255, 0.2);
    border-color: rgba(74, 158, 255, 0.4);
}

.lb-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#lb-page-info {
    font-size: 14px;
    color: #aaa;
}

.leaderboard-list-header {
    display: flex;
    padding: 8px 16px;
    color: #aaa;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.lb-col-rank { width: 40px; text-align: center; margin-right: 12px; }
.lb-col-player { flex: 1; }
.lb-col-value { width: 100px; text-align: right; }


