/* Modern Redirect Interface Styles */
.redirect-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Kanit', sans-serif;
}

.redirect-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.redirect-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Header Section */
.redirect-header {
    padding: 20px;
    background: #f8f9fa;
    color: #333;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

.redirect-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.preview-icon {
    width: 40px;
    height: 40px;
    background: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: #666;
}

.preview-icon:hover {
    transform: scale(1.05);
}

.preview-text {
    flex: 1;
}

.preview-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    color: #333;
}

.preview-url {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-family: "Monaco", "Menlo", "Courier New", monospace;
    background: #f1f3f4;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Progress Section */
.progress-section {
    padding: 20px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.progress-text {
    font-weight: 400;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-text::before {
    content: '⏱';
    font-size: 14px;
    color: #888;
}

.progress-percent {
    font-weight: 500;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #6c757d;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Ads Section */
.ads-section {
    padding: 24px;
    background: white;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ads-section::before {
    content: 'Publicidad';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Action Buttons */
.action-buttons {
    padding: 24px;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #6c757d;
    color: white;
    flex: 1;
    border: 1px solid #5a6268;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #868e96;
}

.btn-primary.countdown-complete {
    background: #28a745;
    border-color: #1e7e34;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-primary.countdown-complete:hover {
    background: #218838;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background: white;
    color: #6c757d;
    border: 1px solid #6c757d;
    position: relative;
}

.btn-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-secondary::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 ease;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

/* Countdown complete state */
#countdown.countdown-complete {
    color: #28a745;
    font-weight: 500;
}

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

/* Security Info */
.security-info {
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    transition: color 0.2s ease;
}

.security-item:hover {
    color: #555;
}

.security-item svg {
    color: #28a745;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
    .redirect-container {
        margin: 20px auto;
        padding: 0 16px;
    }
    
    .redirect-header {
        padding: 20px;
    }
    
    .preview-info {
        gap: 12px;
    }
    
    .preview-icon {
        width: 40px;
        height: 40px;
    }
    
    .preview-title {
        font-size: 16px;
    }
    
    .preview-url {
        font-size: 12px;
    }
    
    .progress-section {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        padding: 20px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        min-width: auto;
    }
    
    .security-info {
        gap: 16px;
        padding: 16px 20px;
    }
    
    .security-info {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .redirect-container {
        margin: 16px auto;
        padding: 0 12px;
    }
    
    .redirect-header {
        padding: 16px;
    }
    
    .progress-section, .ads-section, .action-buttons {
        padding: 16px;
    }
    
    .security-info {
        padding: 12px 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .redirect-card {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .progress-section, .action-buttons {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .progress-text {
        color: #e2e8f0;
    }
    
    .progress-bar-container {
        background: #4a5568;
    }
    
    .ads-section {
        background: #2d3748;
    }
    
    .security-info {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .security-item {
        color: #a0aec0;
    }
    
    .security-item:hover {
        color: #e2e8f0;
    }
    
    .btn-secondary {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .btn-secondary:hover {
        background: #667eea;
        color: white;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .redirect-card {
        border: 2px solid #000;
    }
    
    .btn-primary, .btn-secondary {
        border: 2px solid #000;
    }
    
    .progress-bar-container {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .redirect-card,
    .btn-primary,
    .btn-secondary,
    .progress-bar,
    .preview-icon {
        transition: none;
    }
    
    .btn-spinner {
        animation: none;
    }
    
    .progress-bar::after {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .redirect-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .action-buttons,
    .ads-section {
        display: none;
    }
}