/* ========== ПОДАРКИ В ЧАТЕ ========== */
.gift-message-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
    animation: gift-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.gift-message-shop-card {
    position: relative;
    border-radius: 16px;
    padding: 16px 20px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--lumina-shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--lumina-bg-surface-2);
    border: 1px solid var(--lumina-border);
}

/* Градиент сверху вниз для эпических и сезонных подарков */
.gift-message-shop-card--glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, var(--gift-glow-color, var(--lumina-accent)), transparent);
    opacity: 0.45;
    pointer-events: none;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

/* Контент карточки должен быть выше градиента */
.gift-message-shop-card--glow .gift-message-img,
.gift-message-shop-card--glow .gift-message-label,
.gift-message-shop-card--glow .gift-msg-from,
.gift-message-shop-card--glow .gift-msg-note {
    position: relative;
    z-index: 2;
}

.gift-message-shop-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lumina-shadow-lg);
}

/* Базовый фон для всех подарков — нейтральный */
.gift-message-shop-card--glow {
    background: var(--lumina-bg-surface-2);
    border-color: var(--lumina-border);
}

.gift-message-img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.gift-message-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lumina-accent);
    font-weight: 600;
}

.gift-msg-from {
    font-size: 12px;
    color: var(--lumina-text-muted);
}

.gift-msg-note {
    font-size: 14px;
    color: var(--lumina-text-muted);
    margin: 0;
}

.gift-message-time {
    font-size: 11px;
    color: var(--lumina-text-faint);
    margin-top: 6px;
}

@keyframes gift-pop {
    from { opacity: 0; transform: scale(0.85) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== ПОДАРКИ В ПРОФИЛЕ (уменьшенные цветные карточки) ========== */
.profile-gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px;
}

.profile-gift-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    background: var(--lumina-card-bg);
    border: 1px solid var(--lumina-border);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    width: 100%;
}

.profile-gift-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lumina-shadow-md);
}

/* Эпик-подарки в профиле – оставляем градиент (там другой контекст) */
.profile-gift-card--epic {
    background: linear-gradient(145deg, var(--gift-card-bg, var(--lumina-bg-surface-2)) 0%, var(--lumina-card-bg) 100%);
    border-color: var(--lumina-accent-border);
}

/* Сезонные подарки в профиле – оставляем цветную рамку и лёгкий фон */
.profile-gift-card--seasonal {
    background: rgba(0, 0, 0, 0.1);
    border-width: 2px;
    border-color: var(--gift-card-bg, #ffffff);
}

.profile-gift-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 8px;
}

.profile-gift-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.profile-gift-meta span {
    font-size: 12px;
    color: var(--lumina-text-secondary);
}

.profile-gift-meta .profile-gift-date {
    font-size: 10px;
    color: var(--lumina-text-faint);
}

.profile-gifts-empty,
.profile-gifts-loading {
    text-align: center;
    color: var(--lumina-text-muted);
    padding: 24px 12px;
    font-size: 14px;
}

/* ========== ДЕТАЛЬНЫЙ ПРОСМОТР ПОДАРКА (МОДАЛКА) ========== */
.gift-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.gift-detail-backdrop {
    position: absolute;
    inset: 0;
    background: var(--lumina-overlay);
}

.gift-detail-card {
    position: relative;
    max-width: 320px;
    width: 100%;
    background: var(--lumina-bg-elevated);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--lumina-border);
    box-shadow: var(--lumina-shadow-lg);
    color: var(--lumina-text);
    animation: gift-pop 0.3s ease;
}

.gift-detail-epic {
    background: linear-gradient(145deg, var(--gift-detail-bg, var(--lumina-bg-surface-2)) 0%, var(--lumina-modal-bg) 100%);
    border-color: var(--lumina-accent-border);
}

.gift-detail-seasonal {
    border-width: 2px;
    border-color: var(--gift-detail-bg, var(--lumina-accent-border));
    background: rgba(0, 0, 0, 0.15);
}

.gift-detail-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 12px;
}

.gift-detail-meta {
    font-size: 13px;
    color: var(--lumina-text-muted);
    margin-top: 8px;
}

/* ========== СЕЗОННЫЙ БЛОК (таймер) ========== */
.seasonal-gifts-section {
    margin-bottom: 24px;
    background: var(--lumina-bg-surface-2);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid var(--lumina-accent-border);
}

.seasonal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.seasonal-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--lumina-accent);
    background: var(--lumina-accent-soft);
    padding: 4px 12px;
    border-radius: 20px;
}

.seasonal-icon {
    stroke: var(--lumina-accent);
}

.seasonal-timer {
    font-family: monospace;
    font-size: 14px;
    background: var(--lumina-bg-input);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--lumina-warning);
    font-weight: 500;
}

.seasonal-grid {
    margin-top: 8px;
}

.regular-gifts-section {
    margin-top: 8px;
}

@media (max-width: 768px) {
    .seasonal-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .seasonal-timer {
        text-align: center;
    }
    .profile-gifts-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}