/* ========== КНОПКА МАГАЗИНА (РАДУЖНЫЙ БОРДЕР) ========== */
.menu-nav-btn.shop-btn {
    position: relative;
    border: 3px solid transparent;
    background: 
        linear-gradient(white, white) padding-box,
        linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000) border-box;
    background-size: 100% 100%, 300% 100%;
    animation: rainbowBorder 3s linear infinite;
}

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

.menu-nav-btn.shop-btn:hover {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.menu-nav-btn.shop-btn.active {
    background: 
        linear-gradient(rgba(102, 126, 234, 0.15), rgba(102, 126, 234, 0.15)) padding-box,
        linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000) border-box;
    background-size: 100% 100%, 300% 100%;
}

/* ========== КОНТЕЙНЕР МАГАЗИНА ========== */
.shop-container {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Видимый скроллбар как в достижениях */
.shop-container::-webkit-scrollbar {
    width: 8px;
}

.shop-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.shop-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

.shop-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* ========== БАЛАНС БРИЛЛИАНТОВ ========== */
.shop-balance {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(30, 60, 114, 0.4);
}

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

.diamond-count {
    font-size: 18px;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* ========== СЕКЦИИ МАГАЗИНА ========== */
.shop-section {
    margin-bottom: 25px;
}

.shop-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.shop-items {
    display: grid;
    gap: 12px;
}

.diamonds-grid {
    grid-template-columns: repeat(5, 1fr);
}

.money-grid,
.booster-grid {
    grid-template-columns: repeat(5, 1fr);
}

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

/* ========== ПРЕВЬЮ КОСМЕТИКИ В МАГАЗИНЕ ========== */
.shop-item.cosmetic-item {
    padding: 12px;
    min-height: 180px;
    justify-content: space-between;
}

.shop-cosmetic-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 10px 0;
    align-items: center;
    flex: 1;
}

.shop-cosmetic-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shop-cosmetic-previews {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Превью рамок (миниатюрные аватары с рамками) */
.shop-cosmetic-preview {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-image: url('/images/photo.png');
    background-size: cover;
    background-position: center;
    border: 2px solid #666;
    flex-shrink: 0;
}

/* Превью эффектов ника */
.shop-effect-preview {
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
}

/* Купленный набор */
.shop-item.purchased {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
    position: relative;
}

.purchased-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.vip-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* ========== КАРТОЧКИ ТОВАРОВ ========== */
.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shop-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
}

.shop-item.popular::before {
    content: 'ХИТ';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 75, 87, 0.4);
}

html[lang="en"] .shop-item.popular::before {
    content: 'HOT';
}

.shop-item.best::before {
    content: 'ЛУЧШИЙ';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #5D4E00;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 180, 0, 0.5);
}

html[lang="en"] .shop-item.best::before {
    content: 'BEST';
}

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

.shop-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 4px;
}

.shop-item-value {
    font-size: 14px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 8px;
}

.shop-item-desc {
    font-size: 10px;
    color: #666;
    text-align: center;
    margin-bottom: 6px;
    line-height: 1.3;
}

.shop-item-price {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.shop-item-price.rubles {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* ========== VIP СЕКЦИЯ ========== */
.vip-section {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFEFD5 100%);
    border-radius: 16px;
    padding: 20px;
    border: 3px solid #FFD700;
    box-shadow: 0 4px 20px rgba(255, 180, 0, 0.3);
}

.vip-section .shop-section-title {
    color: #B8860B;
    font-size: 18px;
}

.vip-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.vip-benefit {
    font-size: 12px;
    color: #5D4E00;
    background: rgba(255, 215, 0, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 180, 0, 0.5);
}

.shop-item.vip-item {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 3px solid #FF8C00;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

.shop-item.vip-item .shop-item-name {
    color: #5D4E00;
    font-size: 14px;
    font-weight: bold;
}

.shop-item.vip-item .shop-item-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.shop-item.vip-item:hover {
    box-shadow: 0 8px 30px rgba(255, 140, 0, 0.6);
    border-color: #FF6B00;
    transform: translateY(-5px);
}

/* ========== VIP В ПРОФИЛЕ ========== */
.profile-vip-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 140, 0, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    margin-bottom: 15px;
}

.vip-badge-large {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: vipGlow 2s ease-in-out infinite;
}

@keyframes vipGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 140, 0, 0.5); }
}

.vip-time-remaining {
    font-size: 14px;
    color: #ffd700;
    opacity: 0.8;
}

/* ========== VIP ПЛАШКА НА АВАТАРЕ ========== */
/* Контейнер для аватара с VIP плашкой */
.avatar-with-vip {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-right: 8px;
}

.vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #1a1a2e;
    font-size: 7px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(255, 215, 0, 0.5);
    margin-top: 2px;
    white-space: nowrap;
}

/* VIP плашка в профиле */
.profile-vip-badge {
    font-size: 10px;
    padding: 3px 10px;
    margin-top: 8px;
}

.avatar-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

/* ========== VIP РАМКА ========== */
.frame-vip {
    border: 3px solid #FFD700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 140, 0, 0.3);
    animation: vipFrameGlow 3s linear infinite;
}

@keyframes vipFrameGlow {
    0% { border-color: #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
    33% { border-color: #FFA500; box-shadow: 0 0 20px rgba(255, 165, 0, 0.7); }
    66% { border-color: #FF6B00; box-shadow: 0 0 25px rgba(255, 107, 0, 0.9), 0 0 40px rgba(255, 140, 0, 0.5); }
    100% { border-color: #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
}

/* ========== VIP ЭФФЕКТ НИКА ========== */
.name-effect-vip {
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6B00, #FFD700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: vipNameGlow 2s linear infinite;
    font-weight: bold;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6));
}

@keyframes vipNameGlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ========== АДАПТИВ ========== */
@media (max-width: 770px) {
    .shop-items {
        justify-content: center;
    }
    
    .diamonds-grid,
    .money-grid,
    .booster-grid {
        grid-template-columns: repeat(3, 100px);
        justify-content: center;
        justify-items: center;
    }
    
    .diamonds-grid .shop-item,
    .money-grid .shop-item,
    .booster-grid .shop-item {
        width: 100px;
        min-width: 100px;
        max-width: 100px;
    }
    
    .cosmetic-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-item.cosmetic-item {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .shop-cosmetic-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .vip-grid {
        grid-template-columns: 1fr;
    }
    
    .shop-item-icon {
        font-size: 24px;
    }
    
    .shop-item-name {
        font-size: 10px;
    }
    
    .shop-item.cosmetic-item .shop-item-name {
        font-size: 14px;
        width: 100%;
        text-align: center;
    }
    
    .vip-benefits {
        flex-direction: column;
    }
}

@media (max-width: 550px) {
    .diamonds-grid,
    .money-grid,
    .booster-grid {
        grid-template-columns: repeat(2, 130px);
        justify-content: center;
        justify-items: center;
    }
    
    .diamonds-grid .shop-item,
    .money-grid .shop-item,
    .booster-grid .shop-item {
        width: 130px;
        min-width: 130px;
        max-width: 130px;
    }
}

@media (max-width: 380px) {
    .diamonds-grid,
    .money-grid,
    .booster-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .diamonds-grid .shop-item,
    .money-grid .shop-item,
    .booster-grid .shop-item {
        width: 100%;
        min-width: auto;
        max-width: none;
    }
    
    .shop-balance {
        padding: 6px 12px;
    }
    
    .diamond-count {
        font-size: 16px;
    }
}
