/**
 * WP File Corrupter Styles
 * Clean, modern styling for the file corruption interface
 */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --info-color: #06b6d4;
    --info-hover: #0891b2;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Main Container */
.wp-file-corrupter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

/* Header */
.wp-file-corrupter-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.wp-file-corrupter-header h1 {
    margin: 0 0 1rem 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wp-file-corrupter-header p {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* File Input Section */
.file-input-section {
    margin-bottom: 2rem;
}

.file-drop-zone {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-drop-zone:hover::before,
.file-drop-zone.drag-over::before {
    opacity: 1;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.drop-zone-content {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.file-drop-zone:hover .upload-icon {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.1);
}

.file-drop-zone h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.file-drop-zone p {
    margin: 0 0 2rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.select-file-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.select-file-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;
}

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

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

/* File Info Section */
.file-info-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.file-info-section:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.file-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.25rem;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.remove-file-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.remove-file-btn:hover {
    background: var(--danger-hover);
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-md);
}

/* Corruption Options */
.corruption-options {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.corruption-options h4 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.corruption-options h4::before {
    content: '⚙️';
    font-size: 1.125rem;
}

.corruption-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.corruption-methods label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.corruption-methods label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.corruption-methods label:hover::before {
    opacity: 0.05;
}

.corruption-methods label:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.corruption-methods input[type="radio"] {
    margin-right: 0.75rem;
    accent-color: var(--primary-color);
    transform: scale(1.2);
    position: relative;
    z-index: 1;
}

.corruption-methods label span {
    position: relative;
    z-index: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.corruption-intensity {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.corruption-intensity label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.corruption-intensity label::before {
    content: '🎚️';
    font-size: 1.125rem;
}

#intensitySlider {
    flex: 1;
    height: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    outline: none;
    accent-color: var(--primary-color);
    cursor: pointer;
}

#intensitySlider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

#intensitySlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-lg);
}

#intensityValue {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    min-width: 3rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    font-size: 0.875rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.corrupt-btn,
.download-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 180px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.corrupt-btn {
    background: linear-gradient(135deg, var(--success-color), var(--success-hover));
    color: white;
}

.corrupt-btn::before {
    content: '🔧';
    margin-right: 0.5rem;
}

.corrupt-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.corrupt-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-btn {
    background: linear-gradient(135deg, var(--info-color), var(--info-hover));
    color: white;
}

.download-btn::before {
    content: '⬇️';
    margin-right: 0.5rem;
}

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

/* Progress Section */
.progress-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color), var(--success-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Messages */
.messages {
    margin-bottom: 2rem;
}

.error-message {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.error-message::before {
    content: '❌';
    font-size: 1.25rem;
}

.success-message {
    background: linear-gradient(135deg, #f0fdf4, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.success-message::before {
    content: '✅';
    font-size: 1.25rem;
}

/* Supported Formats */
.supported-formats {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.supported-formats p {
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.format-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

.format-tags span {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: default;
}

.format-tags span:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-file-corrupter-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: var(--radius-xl);
    }
    
    .wp-file-corrupter-header h3 {
        font-size: 1.875rem;
    }
    
    .file-drop-zone {
        padding: 3rem 1.5rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .file-drop-zone h4 {
        font-size: 1.25rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .corrupt-btn,
    .download-btn {
        width: 100%;
        max-width: 320px;
    }
    
    .corruption-intensity {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .corruption-methods {
        grid-template-columns: 1fr;
    }
    
    .format-tags {
        gap: 0.5rem;
    }
    
    .format-tags span {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .wp-file-corrupter-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .wp-file-corrupter-header h3 {
        font-size: 1.5rem;
    }
    
    .file-drop-zone {
        padding: 2rem 1rem;
    }
    
    .file-info-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .corruption-methods label {
        padding: 0.75rem 1rem;
    }
    
    .select-file-btn,
    .corrupt-btn,
    .download-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --border-color: #374151;
        --border-hover: #4b5563;
    }
    
    .wp-file-corrupter-container {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    }
}

