/* Award Modal Styles */
.award-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

.award-modal.active {
    display: flex; /* Show as flex when modal is active */
}

.award-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.award-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 95%;
    max-height: 70vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    z-index: 10001;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.award-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.award-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.award-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.award-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.award-modal-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.award-modal-balance svg {
    flex-shrink: 0;
}

.award-modal-balance strong {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.award-modal-body {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(70vh - 110px);
    flex: 1;
    min-height: 0;
}

.award-loading,
.award-error {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 13px;
}

.award-error {
    color: #dc3545;
}

.award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.award-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
    background: #fafafa;
}

.award-item:hover {
    border-color: #ff6b35;
    background: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.15);
    transform: translateY(-1px);
}

.award-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 8px;
    display: block;
}

.award-icon-placeholder {
    width: 48px;
    height: 48px;
    font-size: 36px;
    text-align: center;
    margin: 0 auto 8px;
}

.award-info {
    text-align: center;
    margin-bottom: 8px;
}

.award-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.award-description {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.award-price {
    font-size: 12px;
    font-weight: 600;
    color: #ff6b35;
}

.award-price-free {
    font-size: 12px;
    font-weight: 600;
    color: #28a745;
}

.award-give-btn {
	margin-top: auto;
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    background-color: #34ae34;
    color: #fff;
    border-radius: 3px;
}

/* Post Awards Display Styles */
.post-awards-container {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.post-awards-list {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.post-award-sticker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
    animation: awardPop 0.4s ease;
}

.post-award-sticker:hover {
    transform: scale(1.3);
    z-index: 10;
}

.award-sticker-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.award-sticker-placeholder {
    font-size: 20px;
    line-height: 1;
}

/* Award pop-in animation */
@keyframes awardPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Success message fade animation */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.award-success-message {
    animation: fadeInOut 3s forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .award-modal-content {
        width: 96%;
        max-height: 85vh;
    }
    
    .award-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .award-modal-header {
        padding: 10px 12px;
    }
    
    .award-modal-balance {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .award-modal-balance strong {
        font-size: 15px;
    }
    
    .award-modal-body {
        padding: 12px;
        max-height: calc(85vh - 110px);
    }
    
    .award-icon {
        width: 40px;
        height: 40px;
    }
    
    .award-icon-placeholder {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .post-award-sticker {
        width: 20px;
        height: 20px;
    }
}

