/* =========================================
   HOSTIFY PRO PLUS - MASTER STYLESHEET
   Version: 5.0.0 | SEO & APK Optimized
   Author: Tcroneb Hackx, CEO World of Tech
   ========================================= */

/* ===== 1. CSS VARIABLES & THEME SYSTEM ===== */
:root {
    /* Core Brand Colors */
    --primary: #fe2c55;
    --primary-rgb: 254, 44, 85;
    --secondary: #25f4ee;
    --secondary-rgb: 37, 244, 238;
    --pro: #ffd700;
    --pro-rgb: 255, 215, 0;
    
    /* Background System */
    --bg-base: #050508;
    --bg-surface: #0a0a0f;
    --bg-elevated: rgba(25, 25, 35, 0.92);
    --bg-glass: rgba(20, 20, 30, 0.75);
    --bg-glass-strong: rgba(30, 30, 40, 0.95);
    --bg-hover: rgba(255, 255, 255, 0.06);
    --bg-active: rgba(37, 244, 238, 0.12);
    --bg-pro-active: rgba(255, 215, 0, 0.1);
    --bg-error: rgba(255, 77, 106, 0.1);
    --bg-success: rgba(0, 214, 143, 0.1);
    
    /* Border System */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-default: rgba(255, 255, 255, 0.15);
    --border-active: rgba(255, 255, 255, 0.35);
    --border-focus: rgba(37, 244, 238, 0.5);
    --border-error: rgba(255, 77, 106, 0.5);
    --border-pro: rgba(255, 215, 0, 0.4);
    
    /* Typography System */
    --text-primary: #ffffff;
    --text-secondary: #c8c8d8;
    --text-muted: #8a8a9a;
    --text-disabled: #555565;
    --text-success: #00d68f;
    --text-warning: #ffb800;
    --text-error: #ff4d6a;
    
    /* Shadows & Glows */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.55);    --glow-primary: 0 0 20px rgba(var(--primary-rgb), 0.35);
    --glow-secondary: 0 0 25px rgba(var(--secondary-rgb), 0.25);
    --glow-pro: 0 0 30px rgba(var(--pro-rgb), 0.2);
    
    /* Spacing Scale (4px Base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    
    /* Border Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 120ms var(--ease-out);
    --t-normal: 220ms var(--ease-out);
    --t-slow: 380ms var(--ease-out);
    --t-spring: 320ms var(--ease-spring);
    
    /* Z-Index Map */
    --z-base: 1;
    --z-dropdown: 10;
    --z-sticky: 100;
    --z-overlay: 500;
    --z-modal: 1000;
    --z-toast: 1500;
    --z-tooltip: 2000;
    
    /* Layout Constraints */
    --container-max: 720px;
    --container-padding: var(--space-5);
    --header-height: 64px;
    --nav-height: 70px;
}

/* Light Theme Override */
[data-theme="light"] {
    --bg-base: #f4f5f7;    --bg-surface: #ffffff;
    --bg-elevated: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-strong: rgba(255, 255, 255, 0.95);
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-active: rgba(37, 244, 238, 0.08);
    --bg-pro-active: rgba(255, 215, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-default: rgba(0, 0, 0, 0.12);
    --border-active: rgba(0, 0, 0, 0.25);
    --border-focus: rgba(37, 244, 238, 0.6);
    --text-primary: #0a0a0f;
    --text-secondary: #4a4a5a;
    --text-muted: #7a7a8a;
    --text-disabled: #a0a0a0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);
}

/* ===== 2. MODERN RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    contain: layout style;
}

input, textarea, select, button {
    font-size: 16px !important;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: var(--radius-full); transition: background var(--t-fast); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* ===== 3. SCROLL OPTIMIZATION ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary), var(--pro));
    z-index: var(--z-tooltip);
    width: 0%;
    transition: width 100ms linear;
    pointer-events: none;
    box-shadow: var(--glow-secondary);
}

.scroll-controls {
    position: fixed;
    right: var(--space-4);
    bottom: calc(var(--nav-height) + 20px);
    z-index: var(--z-overlay);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    pointer-events: none;
    transition: all var(--t-normal);
}

.scroll-controls.visible {
    opacity: 1;    transform: translateY(0) scale(1);
    pointer-events: all;
}

.scroll-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    transition: all var(--t-fast);
    will-change: transform;
}

.scroll-btn:hover {
    background: var(--bg-active);
    color: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--glow-secondary);
}

.scroll-btn:active { transform: scale(0.92); }

/* ===== 4. LAYOUT & CONTAINER ===== */
.app-main {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
    padding-bottom: calc(var(--space-8) + var(--nav-height) + 20px);
    flex: 1;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }.gap-6 { gap: var(--space-6); }

/* ===== 5. HEADER & NAVIGATION ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    height: var(--header-height);
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--t-normal), box-shadow var(--t-normal);
}

.app-header.scrolled {
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: var(--glow-secondary);
}

.logo-text { 
    background: linear-gradient(135deg, var(--text-primary), var(--secondary)); 
    -webkit-background-clip: text; 
    background-clip: text;     -webkit-text-fill-color: transparent; 
}
.logo-pro { 
    font-size: 0.65rem; 
    background: var(--pro); 
    color: #000; 
    padding: 2px 6px; 
    border-radius: var(--radius-xs); 
    font-weight: 700; 
    margin-left: 4px; 
    letter-spacing: 0.5px; 
    -webkit-text-fill-color: initial; 
}

.header-controls { display: flex; align-items: center; gap: var(--space-3); }

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--t-fast);
}

.icon-btn:hover {
    background: var(--bg-active);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: translateY(-1px);
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn.pro-btn:hover {
    background: var(--bg-pro-active);
    border-color: var(--pro);
    color: var(--pro);
}

/* ===== 6. PLATFORM TABS ===== */
.platform-tabs {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-6) 0;
    overflow-x: auto;
    padding-bottom: var(--space-2);    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}
.platform-tabs::-webkit-scrollbar { display: none; }

.platform-tab {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--t-fast);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
    scroll-snap-align: start;
}
.platform-tab.active {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border-color: transparent;
    box-shadow: var(--glow-secondary);
}
.platform-tab i { font-size: 1.1rem; }

/* ===== 7. INPUT & FORM CONTROLS ===== */
.input-container {
    position: relative;
    margin-bottom: var(--space-4);
}

.main-input {
    width: 100%;
    min-height: 56px;
    padding: 16px 110px 16px 20px;
    background: var(--bg-glass);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all var(--t-fast);
    contain: layout style;
}
.main-input::placeholder { color: var(--text-muted); opacity: 0.7; }
.main-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(var(--secondary-rgb), 0.15);
    background: var(--bg-elevated);
}
.main-input:invalid:not(:placeholder-shown) { border-color: var(--border-error); }
.main-input:disabled { opacity: 0.6; cursor: not-allowed; }

.input-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: var(--space-2);
}

.input-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--t-fast);
    font-size: 1rem;
}
.input-action:hover {
    background: var(--bg-active);
    border-color: var(--secondary);
    color: var(--secondary);
    transform: scale(1.05);
}
.input-action:active { transform: scale(0.95); }

/* ===== 8. BUTTONS & INTERACTIVE ELEMENTS ===== */
.action-btn {
    width: 100%;
    min-height: 56px;
    padding: 16px;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    box-shadow: 0 4px 20px rgba(var(--secondary-rgb), 0.35);
    transition: all var(--t-fast);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.action-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.6s;
}

.action-btn:hover::before { left: 100%; }
.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(var(--secondary-rgb), 0.5); }
.action-btn:active { transform: translateY(0); }
.action-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.action-btn.pro-style {
    background: linear-gradient(135deg, var(--pro), #f59e0b);
    color: #000;
    box-shadow: 0 4px 20px rgba(var(--pro-rgb), 0.4);
}
.action-btn.pro-style:hover { box-shadow: 0 6px 25px rgba(var(--pro-rgb), 0.6); }

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 9. DOWNLOADER CARD ===== */
.downloader-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);    padding: var(--space-6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-8);
    transition: all var(--t-normal);
    will-change: transform, box-shadow;
    contain: layout style;
}
.downloader-panel:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(var(--secondary-rgb), 0.15);
}

/* ===== 10. QUEUE & BATCH PROCESSING ===== */
.queue-panel {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    display: none;
}
.queue-panel.active { display: block; animation: fadeIn var(--t-normal); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.queue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.queue-title { display: flex; align-items: center; gap: var(--space-2); color: var(--pro); font-weight: 600; font-size: 0.9rem; }
.queue-count { background: var(--bg-hover); padding: 2px 10px; border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-secondary); }

.queue-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: var(--space-4);
    padding-right: 4px;
    contain: layout style;
}
.queue-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-glass);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--border-subtle);
    transition: all var(--t-fast);
}
.queue-item:hover { border-color: var(--secondary); background: rgba(37, 244, 238, 0.05); }
.queue-url {
    flex: 1;
    overflow: hidden;    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
}
.queue-remove { color: var(--text-error); cursor: pointer; padding: 4px; border-radius: var(--radius-xs); transition: all var(--t-fast); }
.queue-remove:hover { background: rgba(255, 77, 106, 0.15); }

.queue-actions { display: flex; gap: var(--space-3); }
.queue-action-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: all var(--t-fast);
}
.queue-action-btn:hover { background: var(--bg-active); border-color: var(--secondary); transform: translateY(-1px); }
.queue-action-btn.danger:hover { background: rgba(255, 77, 106, 0.15); border-color: var(--text-error); color: var(--text-error); }

/* ===== 11. PROCESSING & ERROR STATES ===== */
.processing-state { display: none; text-align: center; padding: var(--space-10) var(--space-5); }
.processing-state.active { display: block; animation: fadeIn var(--t-normal); }
.spinner-ring {
    width: 50px;
    height: 50px;
    margin: 0 auto var(--space-5);
    position: relative;
}
.spinner-ring::before, .spinner-ring::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent;
}
.spinner-ring::before { border-top-color: var(--secondary); animation: spin 1s linear infinite; }
.spinner-ring::after { border-right-color: var(--primary); animation: spin 1.2s linear infinite reverse; }
.processing-text { font-weight: 600; margin-bottom: var(--space-2); }
.processing-sub { color: var(--text-muted); font-size: 0.9rem; }

.error-state {
    display: none;
    background: var(--bg-error);
    border: 1px solid var(--border-error);
    border-radius: var(--radius-lg);    padding: var(--space-5);
    margin: var(--space-4) 0;
    text-align: center;
}
.error-state.active { display: block; animation: fadeIn var(--t-normal); }
.error-icon { font-size: 1.5rem; color: var(--text-error); margin-bottom: var(--space-3); }
.error-message { color: var(--text-error); font-size: 0.95rem; }
.error-retry {
    margin-top: var(--space-4);
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-error);
    border-radius: var(--radius-md);
    color: var(--text-error);
    cursor: pointer;
    transition: all var(--t-fast);
}
.error-retry:hover { background: rgba(255, 77, 106, 0.15); }

/* ===== 12. RESULT CARD & PREVIEW ===== */
.result-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin: var(--space-6) 0;
    display: none;
    animation: slideUp 0.4s var(--ease-out);
}
.result-card.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.result-header {
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
}
.result-thumb {
    width: 140px;
    height: 140px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-subtle);
    background: var(--bg-glass);
    flex-shrink: 0;
    transition: transform var(--t-fast);
}.result-thumb:hover { transform: scale(1.03); }
.result-meta { flex: 1; min-width: 0; }
.result-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.creator-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 14px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    width: fit-content;
}
.creator-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-subtle); }
.creator-details { display: flex; flex-direction: column; }
.creator-name { font-weight: 500; font-size: 0.9rem; }
.creator-handle { color: var(--text-muted); font-size: 0.8rem; }

.stats-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.stat-chip { background: var(--bg-glass); padding: 8px 14px; border-radius: var(--radius-full); text-align: center; min-width: 70px; }
.stat-value { font-weight: 700; color: var(--secondary); font-size: 0.95rem; margin-bottom: 2px; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.preview-container {
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 200px;
    max-height: 400px;
    overflow: hidden;
}
.preview-container video, .preview-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}.preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity var(--t-fast);
    pointer-events: none;
}
.preview-container:hover .preview-overlay { opacity: 1; }
.preview-badge {
    background: rgba(0,0,0,0.6);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

/* ===== 13. DOWNLOAD OPTIONS ===== */
.download-panel { padding: var(--space-5); border-top: 1px solid var(--border-subtle); }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.panel-title { font-weight: 600; display: flex; align-items: center; gap: var(--space-2); }
.panel-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: var(--bg-pro-active);
    color: var(--pro);
    border-radius: var(--radius-xs);
    font-weight: 600;
}

.download-list { display: flex; flex-direction: column; gap: var(--space-3); }
.download-option {
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    color: var(--text-primary);    position: relative;
    overflow: hidden;
}
.download-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--secondary);
    transform: scaleY(0);
    transition: transform var(--t-fast);
}
.download-option:hover::before { transform: scaleY(1); }
.download-option:hover { background: var(--bg-active); border-color: var(--secondary); transform: translateX(4px); }
.download-option:active { transform: translateX(0); }
.download-option.pro-item { border-color: var(--border-pro); }
.download-option.pro-item:hover { background: var(--bg-pro-active); border-color: var(--pro); }
.download-option.pro-item::before { background: var(--pro); }

.dl-icon {
    width: 44px;
    height: 44px;
    background: rgba(var(--secondary-rgb), 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.download-option.pro-item .dl-icon { background: rgba(var(--pro-rgb), 0.15); color: var(--pro); }
.dl-details { flex: 1; }
.dl-name { font-weight: 500; margin-bottom: 2px; }
.dl-desc { color: var(--text-muted); font-size: 0.8rem; }
.dl-action { display: flex; align-items: center; gap: var(--space-3); }
.dl-size { color: var(--text-muted); font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; }
.dl-btn {
    padding: 8px 16px;
    background: var(--secondary);
    color: #000;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}
.download-option.pro-item .dl-btn { background: var(--pro); }
/* ===== 14. FEATURES & HOW-TO SECTIONS ===== */
.features-section, .howto-section { margin: var(--space-10) 0; }
.section-header { text-align: center; margin-bottom: var(--space-6); }
.section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--space-2); }
.section-desc { color: var(--text-muted); max-width: 480px; margin: 0 auto; font-size: 0.95rem; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--t-normal);
}
.feature-card:hover { border-color: var(--secondary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: var(--space-4);
    box-shadow: var(--glow-secondary);
}
.feature-card.pro .feature-icon { background: linear-gradient(135deg, var(--pro), #f59e0b); color: #000; }
.feature-title { font-weight: 600; margin-bottom: var(--space-2); }
.feature-desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.45; }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.step-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
}
.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;    margin: 0 auto var(--space-4);
}

/* ===== 15. FOOTER ===== */
.app-footer {
    text-align: center;
    padding: var(--space-8) var(--container-padding);
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-8);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}
.footer-link { color: var(--text-secondary); text-decoration: none; transition: color var(--t-fast); font-size: 0.9rem; }
.footer-link:hover { color: var(--secondary); }
.copyright { color: var(--text-muted); font-size: 0.8rem; }
.seo-footer { margin-top: var(--space-2); opacity: 0.6; font-size: 0.75rem; }

/* ===== 16. TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-4);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}
.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 280px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s var(--ease-out) forwards;
    pointer-events: all;
    backdrop-filter: blur(10px);
}.toast.out { animation: toastOut 0.3s var(--ease-out) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.toast-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.toast-desc { color: var(--text-muted); font-size: 0.8rem; }

/* ===== 17. MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-normal);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 460px;
    padding: var(--space-8) var(--space-6);
    position: relative;
    transform: scale(0.96) translateY(10px);
    transition: transform var(--t-slow);
}
.modal-overlay.active .modal-box { transform: scale(1) translateY(0); }
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;    transition: all var(--t-fast);
}
.modal-close:hover { background: var(--bg-active); color: var(--text-primary); transform: rotate(90deg); }

/* ===== 18. UTILITIES & ACCESSIBILITY ===== */
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: 'JetBrains Mono', monospace; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.badge-pro { background: rgba(var(--pro-rgb), 0.2); color: var(--pro); }
.seo-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Focus styles for keyboard nav */
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

/* Hardware Acceleration */
.download-option, .scroll-btn, .action-btn, .modal-box, .feature-card {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;}

/* ===== 19. RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root { --container-padding: 16px; }
    .result-header { flex-direction: column; align-items: center; text-align: center; }
    .result-thumb { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1/1; }
    .creator-card, .stats-row { margin: 0 auto; justify-content: center; }
    .features-grid, .steps-grid { grid-template-columns: 1fr; }
    .platform-tabs { gap: var(--space-1); }
    .platform-tab { padding: 10px 14px; font-size: 0.85rem; }
    .scroll-controls { bottom: calc(var(--nav-height) + 12px); right: 12px; }
}

@media (max-width: 480px) {
    .logo { font-size: 1.2rem; }
    .logo-mark { width: 30px; height: 30px; font-size: 1rem; }
    .main-input { padding: 14px 100px 14px 16px; font-size: 15px; }
    .action-btn { font-size: 1rem; min-height: 52px; }
    .result-header { padding: var(--space-4); }
    .download-panel { padding: var(--space-4); }
}

/* ===== 20. PREFERENCES & PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .scroll-progress { display: none !important; }
    html { scroll-behavior: auto; }
}
@media (prefers-contrast: high) {
    :root {
        --border-subtle: rgba(255, 255, 255, 0.4);
        --text-muted: #d0d0d0;
    }
    .downloader-panel, .result-card { border-width: 2px; }
}

/* Print Styles */
@media print {
    .no-print, .app-header, .bottom-nav, .scroll-controls, .toast-container { display: none !important; }
    body { background: white; color: black; }
}
