/* ========== БАЗОВЫЕ НАСТРОЙКИ ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #14142e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-1: #ff6b6b;
    --accent-2: #ffd93d;
    --accent-3: #6bcbff;
    --accent-4: #a29bfe;
    --gradient-1: linear-gradient(135deg, #ff6b6b, #ee5a24);
    --gradient-2: linear-gradient(135deg, #6bcbff, #0984e3);
    --gradient-3: linear-gradient(135deg, #a29bfe, #6c5ce7);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== СКРОЛЛБАР ========== */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 10px;
}

/* ========== ЭКРАНЫ ========== */
.screen {
    display: none;
    width: 100%;
    min-height: 100vh;
}
.screen.active {
    display: block;
}

/* ========== АВТОРИЗАЦИЯ ========== */
.auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(106, 203, 255, 0.1) 0%, transparent 50%),
        var(--bg-primary);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.logo-icon {
    font-size: 48px;
    margin-bottom: 8px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-title {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.logo-title span {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
    letter-spacing: 2px;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}
.input-group:focus-within {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}
.input-icon {
    padding: 0 14px;
    font-size: 18px;
    color: var(--text-secondary);
}
.input-group input {
    flex: 1;
    padding: 14px 14px 14px 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
}
.input-group input::placeholder {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-btn {
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--gradient-1);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.35);
}
.auth-btn:active {
    transform: translateY(0);
}

.auth-switch {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}
.auth-switch span {
    color: var(--accent-1);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.auth-switch span:hover {
    color: var(--accent-2);
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
}
.anime-text {
    color: var(--text-secondary);
    font-size: 13px;
    letter-spacing: 3px;
    opacity: 0.6;
}

/* ========== ИГРОВОЙ ИНТЕРФЕЙС ========== */
.game-header {
    background: var(--bg-secondary);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.user-details {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-weight: 700;
    font-size: 15px;
}
.user-level {
    font-size: 12px;
    color: var(--accent-2);
}

.resources {
    display: flex;
    align-items: center;
    gap: 16px;
}
.resource-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}
.resource-item .icon {
    font-size: 16px;
}
.resource-item .label {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 12px;
}
.resource-item.money {
    color: var(--accent-2);
}
.resource-item.energy {
    color: var(--accent-3);
}

.bonus-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-2);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bonus-btn:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 0 20px rgba(107, 203, 255, 0.4);
}
.bonus-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== НАВИГАЦИЯ ========== */
.game-nav {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    gap: 4px;
    position: sticky;
    top: 68px;
    z-index: 99;
    overflow-x: auto;
}

.nav-btn {
    flex: 1;
    min-width: 56px;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
}
.nav-btn .nav-icon {
    font-size: 20px;
}
.nav-btn .nav-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.nav-btn.active {
    color: var(--accent-1);
    background: rgba(255, 107, 107, 0.15);
}
.nav-btn.active .nav-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========== КОНТЕНТ ========== */
.game-content {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.tab-content {
    display: none;
    animation: fadeUp 0.3s ease;
}
.tab-content.active {
    display: block;
}

/* ========== СТАТИСТИКА (Главная) ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}
.stat-icon {
    font-size: 28px;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== СЕКЦИИ ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.section-header h2, .section-header h3 {
    font-size: 18px;
    font-weight: 700;
}
.section-header .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}
.badge {
    background: var(--accent-1);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ========== ПРОИЗВОДСТВО ========== */
.production-status {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.production-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
}
.empty-state .empty-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
}
.empty-state .empty-hint {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Прогресс-бар производства */
.prod-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.prod-item .prod-icon {
    font-size: 28px;
}
.prod-item .prod-info {
    flex: 1;
}
.prod-item .prod-name {
    font-weight: 600;
    font-size: 14px;
}
.prod-item .prod-detail {
    font-size: 12px;
    color: var(--text-secondary);
}
.prod-item .prod-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 4px;
    overflow: hidden;
}
.prod-item .prod-progress .bar {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
    transition: width 0.5s ease;
}
.prod-item .prod-action {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.prod-item .prod-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.prod-item .prod-action.ready {
    background: var(--gradient-2);
    color: white;
}
.prod-item .prod-action.ready:hover {
    transform: scale(1.05);
}
.prod-item .prod-action.waiting {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* ========== СЕТКИ ТОВАРОВ ========== */
.product-grid, .warehouse-grid, .shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-card, .warehouse-item, .shop-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.product-card:hover, .warehouse-item:hover, .shop-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}
.product-card .product-icon {
    font-size: 32px;
}
.product-card .product-name {
    font-weight: 600;
    font-size: 14px;
    margin: 6px 0 2px;
}
.product-card .product-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.product-card .product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}
.product-card .product-meta span {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
}
.product-card .product-meta .price {
    color: var(--accent-2);
}
.product-card .product-action {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gradient-1);
    color: white;
}
.product-card .product-action:hover {
    transform: scale(1.02);
}
.product-card .product-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}
.product-card .level-lock {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--accent-2);
}

/* Склад */
.warehouse-item .item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.warehouse-item .item-icon {
    font-size: 28px;
}
.warehouse-item .item-details {
    flex: 1;
}
.warehouse-item .item-name {
    font-weight: 600;
    font-size: 14px;
}
.warehouse-item .item-qty {
    font-size: 12px;
    color: var(--text-secondary);
}
.warehouse-item .item-price {
    color: var(--accent-2);
    font-weight: 600;
}
.warehouse-item .sell-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--gradient-2);
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.warehouse-item .sell-btn:hover {
    transform: scale(1.05);
}
.warehouse-item .sell-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Магазин */
.shop-item .shop-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.shop-item .shop-icon {
    font-size: 28px;
}
.shop-item .shop-details {
    flex: 1;
}
.shop-item .shop-name {
    font-weight: 600;
    font-size: 14px;
}
.shop-item .shop-price {
    font-size: 13px;
    color: var(--accent-2);
}
.shop-item .buy-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--gradient-3);
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.shop-item .buy-btn:hover {
    transform: scale(1.05);
}
.shop-item .buy-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========== РЕЙТИНГ ========== */
.rating-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}
.rating-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}
.rating-item .rank {
    font-size: 20px;
    font-weight: 800;
    min-width: 36px;
    text-align: center;
    color: var(--text-secondary);
}
.rating-item .rank.gold {
    color: #ffd93d;
}
.rating-item .rank.silver {
    color: #c0c0c0;
}
.rating-item .rank.bronze {
    color: #cd7f32;
}
.rating-item .r-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.rating-item .r-info {
    flex: 1;
}
.rating-item .r-name {
    font-weight: 600;
    font-size: 14px;
}
.rating-item .r-level {
    font-size: 12px;
    color: var(--text-secondary);
}
.rating-item .r-score {
    font-weight: 700;
    color: var(--accent-2);
    font-size: 15px;
}
.rating-item .r-score span {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 11px;
}
.rating-item .r-badge {
    font-size: 20px;
}

/* ========== TOAST УВЕДОМЛЕНИЯ ========== */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: var(--bg-secondary);
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    animation: slideUp 0.4s ease;
    pointer-events: auto;
    width: 100%;
    text-align: center;
    font-size: 14px;
    backdrop-filter: blur(20px);
}
.toast.success {
    border-color: rgba(107, 203, 255, 0.3);
}
.toast.error {
    border-color: rgba(255, 107, 107, 0.3);
}
.toast.info {
    border-color: rgba(162, 155, 254, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== АДАПТИВ ========== */
@media (max-width: 480px) {
    .auth-container {
        padding: 30px 20px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .product-grid, .warehouse-grid, .shop-grid {
        grid-template-columns: 1fr;
    }
    .game-header {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .resources {
        gap: 10px;
        font-size: 13px;
    }
    .user-name {
        font-size: 13px;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-value {
        font-size: 18px;
    }
    .nav-btn .nav-label {
        display: none;
    }
    .nav-btn {
        min-width: 44px;
        padding: 8px;
    }
    .nav-btn .nav-icon {
        font-size: 22px;
    }
    .game-nav {
        top: 62px;
        padding: 6px 8px;
    }
}

@media (min-width: 768px) {
    .product-grid, .warehouse-grid, .shop-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
}

/* ========== СКЛАД (СЫРЬЕ И ПРОДУКЦИЯ) ========== */
.warehouse-section {
    display: contents;
}

.warehouse-item.resource-item {
    background: rgba(107, 203, 255, 0.05);
    border-color: rgba(107, 203, 255, 0.15);
}

.warehouse-item.product-item {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.05);
}

.warehouse-item.resource-item .item-qty {
    color: var(--accent-3) !important;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .warehouse-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.warehouse-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.warehouse-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}
.warehouse-item .item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.warehouse-item .item-icon {
    font-size: 28px;
}
.warehouse-item .item-details {
    flex: 1;
}
.warehouse-item .item-name {
    font-weight: 600;
    font-size: 14px;
}
.warehouse-item .item-qty {
    font-size: 13px;
    color: var(--text-secondary);
}
.warehouse-item .item-price {
    color: var(--accent-2);
    font-weight: 600;
    font-size: 13px;
}
.warehouse-item .sell-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--gradient-2);
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.warehouse-item .sell-btn:hover {
    transform: scale(1.05);
}
.warehouse-item .sell-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ========== ПРОГРЕСС-БАР ОПЫТА ========== */
.exp-bar-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2px;
    margin-top: 4px;
    width: 100%;
    max-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.exp-bar {
    height: 6px;
    background: linear-gradient(90deg, #a29bfe, #6c5ce7, #fd79a8);
    border-radius: 20px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.exp-info {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ========== ПРОФИЛЬ ========== */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 12px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: var(--accent-1);
}

.profile-avatar .avatar-edit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 4px;
    opacity: 0;
    transition: var(--transition);
}

.profile-avatar:hover .avatar-edit {
    opacity: 1;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-level {
    color: var(--accent-2);
    font-size: 14px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.profile-stat {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-stat .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-3);
}

.profile-stat .label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-actions button {
    padding: 10px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.profile-actions .btn-primary {
    background: var(--gradient-1);
    color: white;
}

.profile-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.3);
}

.profile-actions .btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-actions .btn-secondary:hover {
    border-color: var(--accent-1);
}

/* ========== FAQ ========== */
.faq-container {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    user-select: none;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question .faq-icon {
    font-size: 20px;
    transition: var(--transition);
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.faq-answer.open {
    max-height: 500px;
    padding: 0 20px 16px;
}

.faq-answer ul {
    margin: 8px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 4px;
}

/* ========== ОБНОВЛЕННЫЙ СКЛАД ========== */
.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.warehouse-item {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.warehouse-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.warehouse-item .item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.warehouse-item .item-icon {
    font-size: 32px;
    min-width: 40px;
    text-align: center;
}

.warehouse-item .item-details {
    flex: 1;
}

.warehouse-item .item-name {
    font-weight: 600;
    font-size: 14px;
}

.warehouse-item .item-qty {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-3);
}

.warehouse-item .item-qty.empty {
    color: var(--text-secondary);
    opacity: 0.5;
}

.warehouse-item .item-price {
    color: var(--accent-2);
    font-weight: 600;
    font-size: 13px;
}

.warehouse-item .item-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.warehouse-item .sell-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--gradient-2);
    color: white;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-end;
}

.warehouse-item .sell-btn:hover {
    transform: scale(1.05);
}
.warehouse-item .sell-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.warehouse-item.resource-item {
    background: rgba(107, 203, 255, 0.05);
    border-color: rgba(107, 203, 255, 0.1);
}

.warehouse-item.resource-item .item-qty {
    color: var(--accent-3);
}

.warehouse-item.product-item {
    background: var(--bg-card);
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 22px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-1);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body input {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 15px;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--accent-1);
}

/* ========== АДАПТИВ ========== */
@media (max-width: 480px) {
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }
    .warehouse-grid {
        grid-template-columns: 1fr 1fr;
    }
    .profile-avatar {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
    .modal {
        padding: 20px;
    }
}

@media (min-width: 768px) {
    .warehouse-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ========== КОНТАКТЫ ========== */
.contacts-container {
    max-width: 600px;
    margin: 0 auto;
}

.contacts-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.contacts-avatar {
    font-size: 64px;
    margin-bottom: 8px;
}

.contacts-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.contacts-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.contacts-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.contact-link .contact-icon {
    font-size: 28px;
}

.contact-link .contact-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.contact-link .contact-username {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: auto;
}

.contact-link.vk:hover {
    background: rgba(68, 142, 247, 0.15);
    border-color: rgba(68, 142, 247, 0.3);
}

.contact-link.tg:hover {
    background: rgba(36, 162, 222, 0.15);
    border-color: rgba(36, 162, 222, 0.3);
}

.contacts-support {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contacts-support p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ========== КНОПКА МУЗЫКИ ========== */
.music-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-1);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5);
}

.music-btn:active {
    transform: scale(0.95);
}

/* Кнопка в профиле */
#musicToggleProfileBtn {
    background: var(--gradient-2) !important;
    color: white !important;
}

#musicToggleProfileBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 203, 255, 0.3);
}

/* В style.css */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}