/* Redeem Page Specific Styles */

/* No redemptions state */
.no-redemptions {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-redemptions p {
    margin: 0.5rem 0;
}

/* Redemption transaction display */
.redemption-tx {
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    word-break: break-all;
    overflow-wrap: break-word;
}

.redeem-section {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.redeem-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.redeem-header {
    text-align: center;
    margin-bottom: 2rem;
}

.redeem-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.redeem-header h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.redeem-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form Styles */
.redeem-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.code-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.paste-btn {
    position: absolute;
    right: 0.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.paste-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.input-help {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.check-code-btn, .redeem-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.buy-gift-card-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transform: translateY(0);
}

.buy-gift-card-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.buy-gift-card-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.buy-gift-card-btn:hover:before {
    left: 100%;
}

.buy-gift-card-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.buy-gift-card-btn i {
    transition: transform 0.3s ease;
}

.buy-gift-card-btn:hover i {
    transform: scale(1.1) rotate(10deg);
}

.check-code-btn:hover, .redeem-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.check-code-btn:disabled, .redeem-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Code Information Display */
.code-info {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--bg-secondary);
    margin-top: 1rem;
}

.code-info.valid {
    border-color: #16a34a;
    background: rgba(34, 197, 94, 0.05);
}

.code-info.invalid {
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.05);
}

.code-info.used {
    border-color: #d97706;
    background: rgba(251, 191, 36, 0.05);
}

.info-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.status-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.status-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.info-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 600;
    color: var(--text);
    font-family: 'Courier New', monospace;
}

.redeem-actions {
    margin-top: 1rem;
}

/* Recent Redemptions */
.recent-redemptions {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.recent-redemptions h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Success Banner */
.success-banner {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.5s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
}

.banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.banner-text h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.banner-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.banner-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.banner-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero improvements */
.hero-actions {
    margin-top: 1rem;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.hero-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.redemptions-list {
    display: grid;
    gap: 1rem;
}

.redemption-item {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition);
}

.redemption-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.redemption-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.redemption-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary);
}

.redemption-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.redemption-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.redemption-amount {
    font-weight: 600;
    color: var(--accent);
}

.redemption-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* How to Use Section */
.how-to-use {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.how-to-use h3 {
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.step-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.step-card h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
    opacity: 1;
}

.modal-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-content.error {
    border-color: #dc2626;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.2rem;
}

.modal-body {
    padding: 1.5rem;
}

.success-details {
    display: grid;
    gap: 1rem;
}

.success-amount, .success-destination, .transaction-id {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.amount-label, .dest-label, .tx-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.amount-value, .dest-value, .tx-value {
    font-weight: 700;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    margin-right: 0.5rem;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 200px;
}

.copy-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.close-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Button Spinner */
.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .redeem-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .redeem-header h3 {
        font-size: 1.3rem;
    }
    
    .redeem-icon {
        font-size: 2.5rem;
    }
    
    .form-group input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .success-amount, .success-destination, .transaction-id {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .amount-value, .dest-value, .tx-value {
        max-width: 100%;
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .modal-content {
        max-width: 95vw;
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Check Button Styling */
.check-code-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.check-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), #5855eb);
}

.check-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

/* Countdown Timer Styling */
.countdown-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countdown-timer {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.countdown-normal {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.countdown-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.countdown-critical {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
