/**
 * UCS Rewards Modal - Dark Theme
 */

/* Modal Styles */
.ucs-rewards-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.ucs-rewards-modal[aria-hidden="false"] {
    display: flex;
}

.ucs-rewards-dialog {
    background: #000000 !important;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #232323;
}

.ucs-rewards-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ucs-rewards-header-main {
    align-items: center;
    gap: 20px;
    display: inline;
}

.ucs-rewards-header-side {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-direction: row-reverse;
}

.ucs-rewards-buy-btn {
    padding: 6px 14px !important;
    font-size: 12px !important;
    border-radius: 20px !important;
    white-space: nowrap;
}

.ucs-rewards-summary-small {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #999;
    background: #000000;
    padding: 6px 10px;
    border-radius: 6px;
}

.ucs-summary-label-small {
    font-weight: 500;
}

.ucs-summary-value-small {
    font-weight: 700;
    color: #fff;
}

.ucs-summary-unit-small {
    font-weight: 400;
    color: #999;
}

.ucs-rewards-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ucs-rewards-icon {
    font-size: 28px;
}

.ucs-rewards-reset-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999;
    flex-direction: column;
}

.ucs-reset-label {
    font-weight: 500;
}

.ucs-reset-time {
    color: #fff;
    font-weight: 600;
    background: #332340;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.ucs-rewards-close {
    background: #333;
    border: none;
    color: #fff;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 10px;
    float: right;
}

.ucs-rewards-close:hover {
    background: #444;
    transform: scale(1.1);
}

.ucs-rewards-body {
    padding: 8px;
    background: #000 !important;
}

.ucs-rewards-intro {
    margin-bottom: 20px;
    text-align: center;
}

.ucs-rewards-description {
    font-size: 16px;
    color: #999;
    margin: 0;
    padding: 16px;
    background: #0f0f0f;
    border-radius: 8px;
    border: 1px solid #333;
    font-weight: 500;
}

.ucs-rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ucs-reward-card {
    background: #222;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.ucs-reward-card:hover {
    transform: translateY(-2px);
    border-color: #444;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.ucs-reward-card.completed {
    background: #1a1a1a;
    border-color: #444;
}

.ucs-reward-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ucs-reward-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    font-style: italic;
}

.ucs-reward-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.ucs-reward-icon-type {
    font-size: 20px;
}

.ucs-reward-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ucs-reward-status.available {
    background: #333;
    color: #999;
}

.ucs-reward-status.completed {
    background: #336242;
    color: #ffffff;
}

.ucs-reward-progress {
    margin-bottom: 16px;
}

.ucs-progress-bar {
    background: #333;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ucs-progress-fill {
    height: 100%;
    background: #a938ff;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ucs-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.ucs-progress-current {
    font-weight: 600;
    color: #999;
}

.ucs-reward-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.ucs-reward-credits {
    font-weight: 600;
    color: #999;
}

.ucs-reward-limit {
    color: #666;
}

/* Loading and Error States */
.ucs-loading-spinner {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.ucs-error-message {
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
    background: #2a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
.ucs-rewards-dialog {
    background: #000000 !important;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #232323;
}
    
    .ucs-rewards-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .ucs-rewards-header-main {
        flex-direction: column;
        gap: 12px;
    }
    
    .ucs-rewards-header-side {
        justify-content: center;
    }
    
    .ucs-rewards-title {
        font-size: 20px;
    }
    
    .ucs-rewards-summary-small {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .ucs-rewards-body {
        padding: 16px;
    }
    
    .ucs-reward-card {
        padding: 16px;
    }
}

/* Credit balance animation */
@keyframes ucs-credit-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes ucs-particle-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}

@keyframes ucs-ripple-expand {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
    }
    100% {
        width: 100px;
        height: 100px;
        margin-left: -50px;
        margin-top: -50px;
        opacity: 0;
    }
}

.ucs-balance.updating {
    animation: ucs-credit-pulse 0.6s ease;
    position: relative;
}

.ucs-balance.updating .credit-amount {
    color: #10b981;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.ucs-balance.updating::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #10b981, #059669, #10b981);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.3;
    animation: ucs-glow-border 1s ease-in-out;
}

@keyframes ucs-glow-border {
    0% { opacity: 0; }
    50% { opacity: 0.6; }
    100% { opacity: 0; }
}

/* Responsive design */
@media (max-width: 1024px) {
    .ucs-rewards-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .ucs-rewards-dialog {
        width: 95%;
        max-height: 75vh;
    }
    
    .ucs-rewards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ucs-rewards-header {
        padding: 20px;
    }
    
    .ucs-rewards-header .ucs-modal-title {
        font-size: 24px;
    }
    
    .ucs-rewards-body {
        padding: 20px;
    }
    
    .ucs-reward-card {
        padding: 16px;
    }
    
    .ucs-total-earned {
        font-size: 16px;
    }
    
    .ucs-summary-value {
        font-size: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ucs-rewards-body {
        background: rgb(14 14 14 / 95%);
    }
    
    .ucs-reward-card {
        background: #000000;
        color: white;
    }
    
    .ucs-reward-type {
        color: white;
    }
    
    .ucs-progress-text {
        color: #9ca3af;
    }
    
    .ucs-rewards-summary {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        border-color: #6b7280;
    }
    
    .ucs-summary-label {
        color: #9ca3af;
    }
}
