/* ============================================
   SOFI SOCIAL FEED - GIFT SYSTEM STYLES
   TikTok-Style Gifting UI
   ============================================ */

/* Gift Picker Modal */
.gift-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gift-picker-modal.active {
    opacity: 1;
}

.gift-picker-container {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gift-picker-modal.active .gift-picker-container {
    transform: translateY(0);
}

/* Gift Picker Header */
.gift-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.gift-picker-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.gift-close-btn {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    transition: all 0.2s ease;
}

.gift-close-btn:hover {
    background: #e8e8e8;
    transform: scale(1.1);
}

/* Gift Recipient Info */
.gift-recipient-info {
    padding: 16px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff5f8 100%);
    border-bottom: 1px solid #f0f0f0;
}

.gift-recipient-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.gift-recipient-info strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Gifts Grid */
.gifts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px;
}

.gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: #f8f8f8;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.gift-item:hover {
    background: #fff;
    border-color: #00d09c;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 208, 156, 0.15);
}

.gift-item:active {
    transform: translateY(-2px);
}

.gift-emoji {
    font-size: 40px;
    line-height: 1;
}

.gift-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

.gift-price {
    font-size: 11px;
    color: #00d09c;
    font-weight: 700;
}

/* Gift Balance Info */
.gift-balance-info {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #f8f8f8;
}

.gift-balance-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.gift-balance-info strong {
    color: #00d09c;
    font-weight: 700;
    font-size: 16px;
}

/* Gift Button in Feed Post */
.feed-post-actions .gift-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 22px;
    color: #ff2d55;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.feed-post-actions .gift-btn:hover {
    background: rgba(255, 45, 85, 0.1);
    transform: scale(1.1);
}

.feed-post-actions .gift-btn .gift-count {
    font-size: 13px;
    font-weight: 600;
    color: #ff2d55;
}

/* Gift Animation (Fly Across Screen) */
.gift-animation {
    position: fixed;
    z-index: 20000;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 1.5s ease-out;
}

.gift-animation.active {
    opacity: 1;
    transform: translate(-50%, -150vh) scale(3);
}

.gift-emoji-large {
    font-size: 60px;
    display: block;
    animation: giftSpin 1.5s ease-out;
}

@keyframes giftSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(360deg) scale(1.5);
    }
    100% {
        transform: rotate(720deg) scale(2);
    }
}

/* Gift Burst Effect */
.gift-burst {
    position: fixed;
    z-index: 20000;
    pointer-events: none;
    animation: giftBurst 0.8s ease-out;
}

@keyframes giftBurst {
    0% {
        opacity: 1;
        transform: scale(0);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* Gift Confirmation Modal */
.gift-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gift-confirmation-modal.active {
    opacity: 1;
}

.gift-confirmation-container {
    background: white;
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 320px;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-confirmation-modal.active .gift-confirmation-container {
    transform: scale(1);
}

.gift-confirmation-emoji {
    font-size: 80px;
    margin-bottom: 20px;
    animation: giftBounce 0.6s ease-out;
}

@keyframes giftBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.gift-confirmation-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.gift-confirmation-amount {
    font-size: 32px;
    font-weight: 800;
    color: #00d09c;
    margin: 0 0 12px 0;
}

.gift-confirmation-message {
    font-size: 14px;
    color: #666;
    margin: 0 0 30px 0;
}

.gift-confirmation-buttons {
    display: flex;
    gap: 12px;
}

.gift-confirm-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gift-cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.gift-cancel-btn:hover {
    background: #e8e8e8;
}

.gift-send-btn {
    background: linear-gradient(135deg, #00d09c 0%, #00b386 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 208, 156, 0.3);
}

.gift-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 208, 156, 0.4);
}

.gift-send-btn:active {
    transform: translateY(0);
}

/* Gift Success Modal */
.gift-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gift-success-modal.active {
    opacity: 1;
}

.gift-success-container {
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-success-modal.active .gift-success-container {
    transform: scale(1);
}

.gift-success-emoji-burst {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.gift-success-emoji {
    font-size: 120px;
    animation: giftSuccessPulse 1s ease-out;
}

@keyframes giftSuccessPulse {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.2);
    }
}

.gift-success-sparkle {
    position: absolute;
    font-size: 32px;
    animation: sparkleFloat 1.5s ease-out;
    opacity: 0;
}

.gift-success-sparkle:nth-child(2) {
    top: -20px;
    left: -30px;
    animation-delay: 0s;
}

.gift-success-sparkle:nth-child(3) {
    top: -30px;
    right: -30px;
    animation-delay: 0.1s;
}

.gift-success-sparkle:nth-child(4) {
    bottom: -20px;
    left: -40px;
    animation-delay: 0.2s;
}

.gift-success-sparkle:nth-child(5) {
    bottom: -30px;
    right: -40px;
    animation-delay: 0.15s;
}

.gift-success-sparkle:nth-child(6) {
    top: 50%;
    left: -50px;
    animation-delay: 0.25s;
}

.gift-success-sparkle:nth-child(7) {
    top: 50%;
    right: -50px;
    animation-delay: 0.05s;
}

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0);
    }
}

.gift-success-title {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gift-success-message {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 30px 0;
}

.gift-success-checkmark {
    margin: 0 auto;
}

.gift-success-circle {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: checkmarkCircle 0.6s ease-out forwards;
    animation-delay: 0.3s;
}

.gift-success-check {
    stroke-dasharray: 70;
    stroke-dashoffset: 70;
    animation: checkmarkCheck 0.4s ease-out forwards;
    animation-delay: 0.6s;
}

@keyframes checkmarkCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmarkCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* Upload Button Styles (Camera) */
.post-upload-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0fff9 0%, #f0f9ff 100%);
    border: 2px dashed #00d09c;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.post-upload-button:hover {
    background: linear-gradient(135deg, #e0fff4 0%, #e0f5ff 100%);
    border-color: #00b386;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 208, 156, 0.15);
}

.post-upload-button:active {
    transform: translateY(0);
}

.upload-icon-container {
    margin-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .gifts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 16px;
    }
    
    .gift-item {
        padding: 12px 6px;
    }
    
    .gift-emoji {
        font-size: 32px;
    }
    
    .gift-name {
        font-size: 11px;
    }
    
    .gift-price {
        font-size: 10px;
    }
}
