.gift-btn {
    position: relative;
    
    line-height: 1;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gift-btn:active {
    transform: scale(0.9);
}
.gift-btn-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}
.gift-send-btn {
    background: #A52A2A;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: bold;
    
    margin-top: 4px;
    font-family: inherit;
}
.gift-send-btn:active {
    transform: scale(0.9);
}
.gift-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}
.gift-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.gift-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gift-from {
    font-size: 13px;
    color: #aaa;
}

.gift-what {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gift-date {
    font-size: 11px;
    color: #666;
    text-align: right;
}
.gift-icon {
    width: 33px;
    height: 33px;
    object-fit: contain;
}

.gift-input {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
}
.gift-input:focus {
    border-color: #A52A2A;
    background: rgba(255, 255, 255, 0.12);
}

.gift-input::placeholder {
    color: #888;
}
select.gift-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='white' d='M6 9L1 4h10z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.gift-input option {
    background: #1a1a1a;
    color: #fff;
}
.gift-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(4px, 2vw, 8px);
}
.avatar-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}
.bonus-btn {
    position: relative;
    
    line-height: 1;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 1;
    transition: opacity 0.3s;
}

.bonus-btn.inactive {
    opacity: 0.8;
    filter: grayscale(0.9);
}
.bonus-btn:active {
    transform: scale(0.9);
}

.bonus-btn-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}
.gift-color-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
}
.gift-color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.gift-color-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: 0.15s;
}

.gift-color-cell.selected {
    box-shadow: 0 0 0 3px #000;
}

.gift-color-count {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #A52A2A;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
}

/* === СТИЛЬ ОКНА ПОДАРКОВ === */
#gift-send-overlay .modal-content {
    background: linear-gradient(160deg, #2a0a4a 0%, #1a0033 60%, #0a0018 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 24px 20px;
}

#gift-send-overlay .modal-content h2 {
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

#gift-send-overlay .modal-content p {
    color: #d4c4e4;
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}

#gift-send-overlay .gift-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 164, 255, 0.35);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    padding: 12px 14px;
    transition: 0.2s;
}

#gift-send-overlay .gift-input:focus {
    border-color: #b46aff;
    box-shadow: 0 0 15px rgba(180, 106, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

/* Кнопки в окне подарков */
#gift-send-overlay .modal-close {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    transition: 0.15s;
    margin-top: 10px;
}

#gift-send-overlay .modal-close:active {
    transform: scale(0.96);
    box-shadow: 0 0 20px rgba(180, 106, 255, 0.7);
}

/* Кнопка "Отмена" — тише, без насыщенного градиента */
#gift-send-overlay .modal-close[style*="background:#444"] {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(212, 164, 255, 0.25);
    color: #c4b4d4;
}
/* === ПЛИТКИ ВЫБОРА ПОДАРКА === */
.gift-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 16px 0 10px 0;
}

.gift-tile {
    aspect-ratio: 1;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 6px rgba(212, 164, 255, 0.7);
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 16px;
    cursor: pointer;
    transition: 0.15s;
    line-height: 1.15;
}

.gift-tile:active {
    transform: scale(0.95);
}
/* === СТИЛЬ ОКНА ВХОДЯЩИХ ПОДАРКОВ === */
#gift-list-overlay .modal-content {
    background: linear-gradient(160deg, #2a0a4a 0%, #1a0033 60%, #0a0018 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 24px 20px;
}

#gift-list-overlay .modal-content h2 {
    font-size: 20px;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 1px;
}

#gift-list-overlay .modal-content p {
    color: #d4c4e4;
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}

#gift-list-overlay .gift-item {
    background: linear-gradient(135deg, #3a1a5a 0%, #2a0a4a 100%);
    border: 1px solid rgba(212, 164, 255, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
}

#gift-list-overlay .gift-from {
    color: #b46aff;
    font-size: 13px;
    font-weight: bold;
}

#gift-list-overlay .gift-what {
    color: #FFD700;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.5);
}

#gift-list-overlay .gift-date {
    color: #7a6a8a;
}

#gift-list-overlay .gift-color-icon {
    border-color: rgba(212, 164, 255, 0.6);
}

#gift-list-overlay .modal-close {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    transition: 0.15s;
    margin-top: 10px;
}

#gift-list-overlay .modal-close:active {
    transform: scale(0.96);
    box-shadow: 0 0 20px rgba(180, 106, 255, 0.7);
}
.gift-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(212, 164, 255, 0.5);
    background: rgba(180, 106, 255, 0.15);
    color: #d4a4ff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: 0.15s;
}

.gift-close-btn:active {
    transform: scale(0.9);
    background: rgba(180, 106, 255, 0.3);
}

#gift-list-overlay .modal-content {
    position: relative;
}
#gift-list-overlay .modal-content {
    position: relative;
    overflow: hidden;
}

.gift-scroll {
    max-height: calc(90vh - 48px);
    overflow-y: auto;
}
.gift-amount-hint {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #FFD700;
    text-align: center;
    min-height: 18px;
}