/* ============================================
   Useful Tool Hub - Design System
   Modern dark theme with glassmorphism & gradients
   ============================================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core palette */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --accent: #06b6d4;
    --accent-light: #22d3ee;

    /* Surfaces */
    --bg-base: #09090b;
    --bg-surface: #18181b;
    --bg-elevated: #27272a;
    --bg-glass: rgba(24, 24, 27, 0.7);

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    /* Borders */
    --border: rgba(63, 63, 70, 0.5);
    --border-hover: rgba(99, 102, 241, 0.4);

    /* Status */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Misc */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-base);
    font-size: 16px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(6, 182, 212, 0.06), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(99, 102, 241, 0.06), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ============================================
   Navigation / Header
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-link.active {
    color: var(--primary-light);
    background: var(--primary-glow);
}

/* ============================================
   Hero Section (Homepage)
   ============================================ */
.hero {
    padding: 80px 0 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   Search Bar
   ============================================ */
.search-wrapper {
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}

.search-bar {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-md), 0 0 0 3px var(--primary-glow);
}

.search-bar::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.search-kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.search-kbd kbd {
    padding: 2px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: inherit;
    color: var(--text-muted);
}

/* ============================================
   Tool Cards Grid
   ============================================ */
.tools-section {
    padding: 40px 0 80px;
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 4px 12px;
    border-radius: 100px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.tool-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}

.tool-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.tool-card-icon.youtube {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.tool-card-icon.instagram {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(168, 85, 247, 0.12));
    color: #e879f9;
}

.tool-card-icon.image {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.tool-card-icon.default {
    background: var(--primary-glow);
    color: var(--primary-light);
}

.tool-card-content {
    flex: 1;
}

.tool-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tool-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.tool-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 100px;
}

.tool-card-arrow {
    color: var(--text-muted);
    transition: all var(--transition);
    width: 20px;
    height: 20px;
}

.tool-card:hover .tool-card-arrow {
    color: var(--primary-light);
    transform: translateX(4px);
}

.tool-card-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tool-card-status.live {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.tool-card-status.soon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

/* ============================================
   Tool Page Layout (shared for all tool pages)
   ============================================ */
.tool-page {
    padding: 32px 0 80px;
    position: relative;
    z-index: 1;
}

.tool-page-container {
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.breadcrumb-current {
    color: var(--text-secondary);
}

/* Tool Header */
.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
}

.tool-header-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.tool-header-text h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

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

/* Tool Panel */
.tool-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.tool-panel-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-panel-notice svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--primary-light);
    margin-top: 2px;
}

/* Input Group */
.input-group {
    margin-bottom: 0;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-field {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-field::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Loading Spinner */
.loading-state {
    text-align: center;
    padding: 48px 24px;
    display: none;
}

.loading-state.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Results */
.results-container {
    display: none;
    margin-top: 28px;
}

.results-container.active {
    display: block;
}

/* Error State */
.error-msg {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    margin-top: 20px;
    font-size: 0.9rem;
    color: #fca5a5;
    line-height: 1.6;
}

.error-msg.active {
    display: flex;
}

.error-msg svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--error);
    margin-top: 2px;
}

/* ============================================
   Video Info (YouTube)
   ============================================ */
.video-info-card {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.video-thumbnail-wrap {
    position: relative;
    overflow: hidden;
}

.video-thumbnail-wrap img {
    width: 100%;
    display: block;
}

.video-meta {
    padding: 20px;
}

.video-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.video-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.video-detail svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Quality Options */
.quality-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quality-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.quality-item:hover {
    border-color: var(--border-hover);
    background: rgba(99, 102, 241, 0.04);
}

.quality-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quality-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.quality-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   Instagram-specific
   ============================================ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

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

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.media-item {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-base);
    cursor: pointer;
    transition: all var(--transition);
}

.media-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.media-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    display: block;
}

.media-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    z-index: 10;
    accent-color: var(--primary);
}

.media-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Download Section */
.download-panel {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.download-panel h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.download-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.format-select {
    padding: 10px 36px 10px 16px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%236366f1" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.format-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.format-select:hover {
    border-color: var(--border-hover);
}

.format-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.format-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

/* ============================================
   Feedback Form
   ============================================ */
.feedback-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.feedback-panel h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.feedback-panel > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* Messages */
.message-box {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.message-box.success {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.message-box.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.message-box.active {
    display: block;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 48px 0 24px;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .tool-panel {
        padding: 24px;
    }

    .input-row {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .download-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .search-kbd {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .tool-header-text h1 {
        font-size: 1.4rem;
    }

    .feedback-panel {
        padding: 24px;
    }

    .feedback-panel h1 {
        font-size: 1.4rem;
    }
}

/* ============================================
   Converter Tools — Shared Styles
   ============================================ */

/* Dropzone */
.converter-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
    background: rgba(99, 102, 241, 0.02);
}

.converter-dropzone:hover {
    border-color: var(--border-hover);
    background: rgba(99, 102, 241, 0.04);
}

.converter-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.converter-dropzone svg {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dropzone-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dropzone-browse {
    background: none;
    border: none;
    color: var(--primary-light);
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.dropzone-browse:hover {
    color: var(--primary);
}

.dropzone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Settings Panel */
.converter-settings {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.settings-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.setting-group {
    flex: 1;
    min-width: 160px;
}

.setting-group .input-label {
    margin-bottom: 8px;
}

.quality-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-elevated);
    border-radius: 3px;
    outline: none;
    margin-top: 8px;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.quality-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.quality-slider::-moz-range-track {
    background: var(--bg-elevated);
    border-radius: 3px;
    height: 6px;
}

.resize-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.resize-x {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-sm {
    width: 90px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.settings-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* File List */
.converter-file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.file-item:hover {
    border-color: var(--border-hover);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.file-item-info svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.file-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.file-item-remove:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* File Info Card (single file) */
.file-info-card {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.file-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-info-row svg {
    flex-shrink: 0;
    color: var(--primary-light);
}

.file-info-details {
    flex: 1;
    min-width: 0;
}

.file-info-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Converter Results */
.converter-results {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.converter-output-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.output-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.output-item:hover {
    border-color: var(--border-hover);
}

.output-item.output-error {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.04);
}

.output-item-preview {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
}

.output-item-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.output-item-info {
    flex: 1;
    min-width: 0;
}

.output-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.output-item-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.output-savings.positive {
    color: var(--success);
}

.output-savings.negative {
    color: var(--error);
}

/* Progress Bar */
.converter-progress {
    margin-top: 24px;
    text-align: center;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

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

/* ============================================
   Editor Workspace — Image & Video Editors
   ============================================ */
.editor-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.editor-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.editor-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.editor-filename {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.editor-file-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Canvas / Video Preview Area */
.editor-canvas-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 200px;
    margin-bottom: 16px;
}

.editor-canvas-wrapper {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.editor-canvas-wrapper canvas {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

.video-preview-player {
    width: 100%;
    max-height: 500px;
    display: block;
    background: #000;
    outline: none;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.toolbar-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.06);
}

.toolbar-btn.active {
    background: var(--primary-glow);
    border-color: var(--primary);
    color: var(--primary-light);
}

.toolbar-btn svg {
    flex-shrink: 0;
}

/* Crop Overlay */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    z-index: 10;
}

.crop-selection {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
    z-index: 11;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 2px;
    z-index: 12;
}

.crop-handle-nw { top: -6px; left: -6px; cursor: nw-resize; }
.crop-handle-ne { top: -6px; right: -6px; cursor: ne-resize; }
.crop-handle-sw { bottom: -6px; left: -6px; cursor: sw-resize; }
.crop-handle-se { bottom: -6px; right: -6px; cursor: se-resize; }
.crop-handle-n { top: -6px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.crop-handle-s { bottom: -6px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.crop-handle-e { right: -6px; top: 50%; transform: translateY(-50%); cursor: e-resize; }
.crop-handle-w { left: -6px; top: 50%; transform: translateY(-50%); cursor: w-resize; }

.crop-size-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

.crop-confirm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--primary-glow);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.crop-info {
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 600;
}

.crop-confirm-actions {
    display: flex;
    gap: 8px;
}

/* Editor Sections */
.editor-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.editor-section:last-of-type {
    border-bottom: none;
}

.editor-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Adjustment Grid */
.adjustment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.adjustment-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adjustment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adjustment-header label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.adjustment-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    min-width: 28px;
    text-align: right;
}

/* Resize Row */
.resize-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}

.resize-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.resize-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.preset-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.06);
}

/* Aspect Ratio Lock Button */
.aspect-lock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    align-self: flex-end;
    margin-bottom: 2px;
    padding: 0;
}

.aspect-lock-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.aspect-lock-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* Toolbar button disabled state */
.toolbar-btn:disabled,
.toolbar-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Export Grid */
.export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.export-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.export-estimate {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Target size row */
.target-size-row {
    display: flex;
    gap: 8px;
}

.target-size-row .input-field {
    flex: 1;
}

.target-size-row .format-select {
    width: 80px;
    flex-shrink: 0;
}

.target-size-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Trim Controls */
.trim-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trim-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.trim-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.trim-duration {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
    padding: 8px 0;
}

.trim-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trim-quick-btns {
    display: flex;
    gap: 8px;
}

/* ============================================
   Color Converter — Specific Styles
   ============================================ */
.color-top-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.color-swatch-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    flex-shrink: 0;
    background: #6366f1;
    box-shadow: var(--shadow-md);
    transition: background 0.15s ease;
}

.color-picker-wrap {
    flex: 1;
}

.color-picker-input {
    width: 100%;
    height: 48px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-base);
    cursor: pointer;
    transition: all var(--transition);
}

.color-picker-input:hover {
    border-color: var(--border-hover);
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker-input::-webkit-color-swatch {
    border-radius: 6px;
    border: none;
}

.color-picker-input::-moz-color-swatch {
    border-radius: 6px;
    border: none;
}

.color-picker-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.color-format-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.color-format-group:last-of-type {
    border-bottom: none;
}

.color-format-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.color-format-header .input-label {
    margin-bottom: 0;
}

.color-inputs-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.color-input-group {
    flex: 1;
}

.color-input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-text-output {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 10px 14px;
    background: var(--bg-base);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.color-history-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.color-history {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
}

.color-history-item {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.color-history-item:hover {
    transform: scale(1.15);
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Eyedropper / Image Color Picker
   ============================================ */
.eyedropper-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.eyedropper-upload-area:hover,
.eyedropper-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
}

.eyedropper-canvas-area {
    margin-top: 12px;
}

.eyedropper-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.eyedropper-filename {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.eyedropper-canvas-wrapper {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: crosshair;
    background: repeating-conic-gradient(var(--bg-elevated) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
}

.eyedropper-canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: auto;
}

.eyedropper-magnifier {
    position: absolute;
    width: 110px;
    height: 130px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    z-index: 10;
}

.eyedropper-magnifier canvas {
    display: block;
    border-radius: 0;
    image-rendering: pixelated;
}

.magnifier-crosshair {
    position: absolute;
    top: 44px;
    left: 49px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
    pointer-events: none;
}

.magnifier-color-label {
    width: 100%;
    text-align: center;
    padding: 4px 0;
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}

.eyedropper-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ============================================
   Responsive — Converters
   ============================================ */
@media (max-width: 768px) {
    .settings-row {
        flex-direction: column;
    }

    .settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .color-top-row {
        flex-direction: column;
        align-items: center;
    }

    .color-swatch-large {
        width: 80px;
        height: 80px;
    }

    .color-picker-wrap {
        width: 100%;
    }

    .color-inputs-row {
        gap: 8px;
    }

    .resize-inputs {
        flex-wrap: wrap;
    }

    .editor-toolbar {
        gap: 4px;
    }

    .toolbar-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .toolbar-btn span {
        display: none;
    }

    .adjustment-grid {
        grid-template-columns: 1fr;
    }

    .export-grid {
        grid-template-columns: 1fr;
    }

    .resize-row {
        flex-wrap: wrap;
    }

    .trim-row {
        flex-direction: column;
        gap: 12px;
    }

    .crop-confirm-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .editor-filename {
        max-width: 150px;
    }
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
