/**
 * VidFetch Pro - Enhanced Professional Styles
 * Modern, responsive design with advanced animations and effects
 */

/* CSS Variables for theming */
:root {
    /* Primary Colors */
    --primary-50: #f0f4ff;
    --primary-100: #e0e9ff;
    --primary-200: #c7d7fe;
    --primary-300: #a4bcfd;
    --primary-400: #8199fa;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    /* Accent Colors */
    --accent-50: #fef2f2;
    --accent-100: #fee2e2;
    --accent-200: #fecaca;
    --accent-300: #fca5a5;
    --accent-400: #f87171;
    --accent-500: #ef4444;
    --accent-600: #dc2626;
    --accent-700: #b91c1c;
    --accent-800: #991b1b;
    --accent-900: #7f1d1d;

    /* Success Colors */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-200: #a7f3d0;
    --success-300: #6ee7b7;
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    --success-800: #065f46;
    --success-900: #064e3b;

    /* Warning Colors */
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-300: #fcd34d;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --warning-800: #92400e;
    --warning-900: #78350f;

    /* Base Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Design System */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
.dark-theme {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a9c0;
    --text-tertiary: #6b7280;
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(255, 255, 255, 0.05);
}

/* Light Theme Variables */
.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-glass: rgba(0, 0, 0, 0.02);
    --bg-glass-hover: rgba(0, 0, 0, 0.05);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-primary: rgba(0, 0, 0, 0.1);
    --border-secondary: rgba(0, 0, 0, 0.05);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Layout Components */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
}

.logo-text .version {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-500);
    background: var(--bg-glass-hover);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-500);
    border-radius: 50%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    border: none;
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: var(--primary-500);
    transform: translateY(-1px);
}

.stats-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
}

.stats-badge span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-500);
}

.stats-badge small {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.primary-card {
    background: linear-gradient(135deg, var(--bg-glass), var(--bg-glass));
    border: 1px solid var(--primary-500);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-title i {
    color: var(--primary-500);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    box-shadow: var(--shadow);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600), var(--success-700));
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.btn-outline:hover {
    background: var(--bg-glass-hover);
    color: var(--primary-500);
    border-color: var(--primary-500);
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Input Styles */
.input-group {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.url-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: var(--bg-glass-hover);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.url-input:focus + .input-icon {
    color: var(--primary-500);
}

/* URL Input Section */
.url-input-section {
    padding: 1.5rem;
}

.url-suggestions {
    margin-top: 1rem;
}

.suggestions-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.platform-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.platform-chip i {
    color: var(--platform-color);
}

.platform-chip:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-1px);
}

/* Video Preview */
.video-preview {
    margin: 1.5rem;
    min-height: 250px;
    border-radius: var(--border-radius);
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-primary);
    transition: var(--transition);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    padding: 2rem;
    text-align: center;
}

.preview-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--text-tertiary);
    font-size: 2rem;
}

.preview-placeholder h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-placeholder p {
    color: var(--text-tertiary);
}

/* Download Options */
.download-options {
    padding: 1.5rem;
    border-top: 1px solid var(--border-secondary);
}

.options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.options-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.format-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-glass);
    border-radius: var(--border-radius);
    padding: 0.25rem;
}

.format-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: calc(var(--border-radius) - 2px);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.format-tab.active {
    background: var(--primary-500);
    color: white;
    box-shadow: var(--shadow);
}

.format-tab:hover:not(.active) {
    background: var(--bg-glass-hover);
    color: var(--primary-500);
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quality-option {
    padding: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.quality-option:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quality-option.selected {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.quality-option .quality-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.quality-option .quality-details {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Progress Section */
.progress-section {
    padding: 1.5rem;
    border-top: 1px solid var(--border-secondary);
    background: var(--bg-glass);
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    border-radius: 1rem;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Sidebar */
.sidebar .card {
    margin-bottom: 1.5rem;
}

.sidebar .card:last-child {
    margin-bottom: 0;
}

/* Settings */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-secondary);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-label {
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.setting-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.setting-control {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

.setting-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    transition: var(--transition);
    border-radius: 2rem;
    border: 1px solid var(--border-primary);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

input:checked + .toggle-slider {
    background: var(--primary-500);
    border-color: var(--primary-600);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-glass);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-500);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* History Section */
.history-filters {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-control {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

.filter-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.history-list {
    max-height: 600px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-secondary);
    transition: var(--transition);
}

.history-item:hover {
    background: var(--bg-glass-hover);
}

.history-item:last-child {
    border-bottom: none;
}

.history-thumbnail {
    width: 60px;
    height: 45px;
    border-radius: var(--border-radius);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.history-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-thumbnail i {
    color: var(--text-tertiary);
    font-size: 1.25rem;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.history-details .status {
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-completed {
    background: var(--success-100);
    color: var(--success-700);
}

.status-downloading {
    background: var(--primary-100);
    color: var(--primary-700);
}

.status-failed {
    background: var(--accent-100);
    color: var(--accent-700);
}

.status-pending {
    background: var(--warning-100);
    color: var(--warning-700);
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-tertiary);
}

/* Settings Form */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-form {
    padding: 1.5rem;
}

.settings-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.setting-group {
    background: var(--bg-glass);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-secondary);
    overflow: hidden;
}

.group-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    background: var(--bg-glass-hover);
    border-bottom: 1px solid var(--border-secondary);
    margin: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Help Section */
.help-container {
    max-width: 800px;
    margin: 0 auto;
}

.help-content {
    padding: 1.5rem;
}

.help-section {
    margin-bottom: 2rem;
}

.help-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.help-section ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.help-section li {
    margin-bottom: 0.5rem;
}

.platform-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    transition: var(--transition);
}

.faq-item summary:hover {
    background: var(--bg-glass);
}

.faq-item p {
    padding: 1rem;
    color: var(--text-secondary);
    margin: 0;
    border-top: 1px solid var(--border-secondary);
}

/* Footer */
.main-footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-glass);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.footer-info p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-500);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification.success {
    background: var(--success-500);
    color: white;
}

.notification.error {
    background: var(--accent-500);
    color: white;
}

.notification.warning {
    background: var(--warning-500);
    color: white;
}

.notification.info {
    background: var(--primary-500);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Error Message */
.error-message {
    color: var(--accent-500);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        order: -1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .quality-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .platform-chips {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0.75rem 0;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .url-input {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 0.875rem;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .history-actions {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .notification-container {
        left: 1rem;
        right: 1rem;
        top: 1rem;
    }
    
    .notification {
        min-width: auto;
    }
}

/* Print Styles */
@media print {
    .loading-overlay,
    .notification-container,
    .main-header,
    .main-footer,
    .card-actions,
    .history-actions,
    .form-actions {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-primary: #000;
        --border-secondary: #666;
        --text-primary: #000;
        --text-secondary: #333;
        --text-tertiary: #666;
    }
    
    .dark-theme {
        --border-primary: #fff;
        --border-secondary: #ccc;
        --text-primary: #fff;
        --text-secondary: #ddd;
        --text-tertiary: #aaa;
    }
}