/**
 * XportFlow / WebTools Suite - Tactile Claymorphism Design System
 * Modern, soft 3D inflated clay aesthetic with dual inset depth & organic tactile feedback.
 * No cheap neon, no dark cyberpunk glows — clean, premium, and friendly.
 */

:root {
    /* Brand & Accent Clay Hues */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-active: #3730a3;
    --primary-light: #e0e7ff;
    
    --accent-emerald: #10b981;
    --accent-emerald-dark: #059669;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-sky: #0ea5e9;
    --accent-purple: #8b5cf6;
    --accent-indigo: #6366f1;
    --accent-teal: #14b8a6;
    --accent-orange: #f97316;

    /* Light Theme (Tactile Soft Clay - Default) */
    --bg-page: #f0f4f9;
    --bg-page-gradient: 
        radial-gradient(at 0% 0%, rgba(224, 231, 255, 0.65) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(254, 215, 226, 0.55) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(224, 242, 254, 0.65) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(243, 232, 255, 0.55) 0px, transparent 50%);

    --bg-surface: #ffffff;
    --bg-surface-elevated: #f8fafc;
    --bg-surface-inset: #edf2f7;
    --bg-card: #ffffff;

    --border-subtle: rgba(226, 232, 240, 0.85);
    --border-clay: rgba(255, 255, 255, 0.95);
    --border-hover: #818cf8;

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* Radii */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;
    --radius-full: 9999px;

    /* Clay Shadows - Light Mode */
    --clay-card-shadow: 
        inset 3px 3px 6px 0 rgba(255, 255, 255, 0.95),
        inset -3px -4px 7px 0 rgba(160, 175, 200, 0.22),
        0 18px 38px -8px rgba(112, 132, 160, 0.18),
        0 4px 12px rgba(112, 132, 160, 0.06);

    --clay-card-hover: 
        inset 3px 3px 6px 0 rgba(255, 255, 255, 1),
        inset -3px -4px 7px 0 rgba(160, 175, 200, 0.28),
        0 24px 44px -8px rgba(112, 132, 160, 0.26),
        0 6px 16px rgba(112, 132, 160, 0.08);

    --clay-btn-primary:
        inset 2px 2px 4px 0 rgba(255, 255, 255, 0.45),
        inset -2px -4px 6px 0 rgba(0, 0, 0, 0.25),
        0 10px 22px -3px rgba(79, 70, 229, 0.38);

    --clay-btn-hover:
        inset 2px 2px 4px 0 rgba(255, 255, 255, 0.6),
        inset -2px -4px 6px 0 rgba(0, 0, 0, 0.28),
        0 14px 28px -4px rgba(79, 70, 229, 0.46);

    --clay-btn-active:
        inset 3px 3px 6px 0 rgba(0, 0, 0, 0.35),
        inset -1px -1px 3px 0 rgba(255, 255, 255, 0.25),
        0 3px 8px rgba(79, 70, 229, 0.2);

    --clay-pill-bg: #eef2f7;
    --clay-pill-shadow:
        inset 2px 2px 4px 0 rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px 0 rgba(175, 190, 215, 0.35),
        0 4px 10px rgba(148, 163, 184, 0.12);

    --clay-pill-active-bg: #4f46e5;
    --clay-pill-active-shadow:
        inset 2px 2px 4px 0 rgba(255, 255, 255, 0.4),
        inset -2px -3px 5px 0 rgba(0, 0, 0, 0.28),
        0 8px 18px rgba(79, 70, 229, 0.34);

    --clay-input-shadow:
        inset 3px 3px 6px rgba(148, 163, 184, 0.18),
        inset -2px -2px 5px rgba(255, 255, 255, 0.85);

    --nav-bg: rgba(255, 255, 255, 0.82);
    --nav-border: rgba(226, 232, 240, 0.8);
}

/* Dark Slate Clay Theme (Matte Charcoal & Slate - NO neon!) */
body.dark-theme {
    --bg-page: #111520;
    --bg-page-gradient: 
        radial-gradient(at 0% 0%, rgba(30, 41, 59, 0.7) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(39, 39, 62, 0.6) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.8) 0px, transparent 50%);

    --bg-surface: #181f2f;
    --bg-surface-elevated: #20293d;
    --bg-surface-inset: #131824;
    --bg-card: #1a2235;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-clay: rgba(255, 255, 255, 0.12);
    --border-hover: #818cf8;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Clay Shadows - Dark Mode */
    --clay-card-shadow: 
        inset 2px 2px 4px 0 rgba(255, 255, 255, 0.09),
        inset -3px -4px 8px 0 rgba(0, 0, 0, 0.5),
        0 18px 38px -8px rgba(0, 0, 0, 0.55),
        0 4px 12px rgba(0, 0, 0, 0.3);

    --clay-card-hover: 
        inset 2px 2px 4px 0 rgba(255, 255, 255, 0.14),
        inset -3px -4px 8px 0 rgba(0, 0, 0, 0.6),
        0 24px 44px -8px rgba(0, 0, 0, 0.65),
        0 6px 16px rgba(0, 0, 0, 0.35);

    --clay-pill-bg: #222b40;
    --clay-pill-shadow:
        inset 2px 2px 3px 0 rgba(255, 255, 255, 0.08),
        inset -2px -3px 5px 0 rgba(0, 0, 0, 0.45),
        0 4px 10px rgba(0, 0, 0, 0.3);

    --clay-input-shadow:
        inset 3px 3px 6px rgba(0, 0, 0, 0.5),
        inset -2px -2px 5px rgba(255, 255, 255, 0.05);

    --nav-bg: rgba(24, 31, 47, 0.85);
    --nav-border: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    background-image: var(--bg-page-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Claymorphic Header & Navigation
   ========================================================================== */
.tools-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--nav-border);
    transition: all 0.25s ease;
}

.tools-nav-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tools-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.tools-brand-badge {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ffffff;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.5),
        inset -2px -3px 5px rgba(0, 0, 0, 0.25),
        0 8px 18px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tools-brand:hover .tools-brand-badge {
    transform: rotate(-6deg) scale(1.05);
}

.tools-brand-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.clay-brand-accent {
    color: var(--primary);
}

.tools-brand-tag {
    font-size: 0.68rem;
    font-weight: 800;
    background: var(--clay-pill-bg);
    color: var(--primary);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    box-shadow: var(--clay-pill-shadow);
    margin-left: 6px;
    letter-spacing: 0.5px;
}

/* Nav Menu Items */
.tools-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tools-menu-item {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tools-menu-item:hover {
    color: var(--text-primary);
    background: var(--clay-pill-bg);
    box-shadow: var(--clay-pill-shadow);
    transform: translateY(-1px);
}

.tools-menu-item.active {
    color: var(--primary);
    background: var(--clay-pill-bg);
    box-shadow: var(--clay-pill-shadow);
    font-weight: 700;
}

/* Theme Toggle Button (Light Clay / Dark Slate Clay) */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--radius-full);
    background: var(--clay-pill-bg);
    box-shadow: var(--clay-pill-shadow);
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.theme-toggle-btn:active {
    transform: translateY(2px) scale(0.97);
}

.pill-badge-free {
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    font-weight: 700;
    padding: 6px 12px;
    background: #ecfdf5;
    color: #059669;
    border-radius: var(--radius-full);
    box-shadow: 
        inset 1px 1px 2px rgba(255, 255, 255, 0.9),
        inset -1px -2px 3px rgba(16, 185, 129, 0.2),
        0 2px 6px rgba(16, 185, 129, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.dark-theme .pill-badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    box-shadow: none;
}

/* ==========================================================================
   Page Container & Hero
   ========================================================================== */
.tools-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    flex: 1;
    width: 100%;
}

.tools-hero {
    text-align: center;
    margin-bottom: 44px;
}

.tools-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    background: var(--clay-pill-bg);
    border-radius: var(--radius-full);
    box-shadow: var(--clay-pill-shadow);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    letter-spacing: -0.2px;
}

.tools-hero-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 2.85rem;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.18;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tools-gradient-text {
    color: var(--primary);
    display: inline-block;
}

.tools-hero-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ==========================================================================
   Claymorphic Cards & Containers
   ========================================================================== */
.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--clay-card-shadow);
    border: 1px solid var(--border-clay);
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Clay Mode Pills (Tabs / Filters)
   ========================================================================== */
.mode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--border-subtle);
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--clay-pill-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--clay-pill-shadow);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    border: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mode-pill:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 
        inset 2px 2px 4px 0 rgba(255, 255, 255, 1),
        inset -2px -3px 5px 0 rgba(175, 190, 215, 0.45),
        0 8px 16px rgba(148, 163, 184, 0.18);
}

.mode-pill:active {
    transform: translateY(2px) scale(0.97);
}

.mode-pill.active {
    background: var(--clay-pill-active-bg);
    color: #ffffff !important;
    box-shadow: var(--clay-pill-active-shadow);
}

/* ==========================================================================
   Clay Dropzone (Tactile Drag & Drop Platter)
   ========================================================================== */
.dropzone {
    border: 3px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    background: var(--bg-surface-elevated);
    padding: 52px 28px;
    text-align: center;
    cursor: pointer;
    box-shadow: 
        inset 3px 3px 8px rgba(148, 163, 184, 0.1),
        inset -3px -3px 8px rgba(255, 255, 255, 0.9),
        0 8px 24px rgba(148, 163, 184, 0.08);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

body.dark-theme .dropzone {
    border-color: #334155;
    background: var(--bg-surface-inset);
    box-shadow: 
        inset 3px 3px 8px rgba(0, 0, 0, 0.4),
        inset -2px -2px 6px rgba(255, 255, 255, 0.04);
}

.dropzone:hover, .dropzone.drag-over {
    border-color: var(--primary);
    background: #eef2ff;
    transform: translateY(-2px) scale(1.006);
    box-shadow: 
        inset 3px 3px 8px rgba(99, 102, 241, 0.1),
        inset -3px -3px 8px rgba(255, 255, 255, 1),
        0 14px 30px rgba(99, 102, 241, 0.15);
}

body.dark-theme .dropzone:hover, body.dark-theme .dropzone.drag-over {
    background: #1e2538;
    border-color: #6366f1;
}

.dropzone-icon {
    font-size: 3.2rem;
    margin-bottom: 14px;
    filter: drop-shadow(0 6px 12px rgba(148, 163, 184, 0.25));
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone:hover .dropzone-icon {
    transform: scale(1.12) rotate(-4deg);
}

.dropzone-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.dropzone-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 22px;
}

.dropzone-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    box-shadow: var(--clay-btn-primary);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--clay-btn-hover);
}

.dropzone-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: var(--clay-btn-active);
}

/* ==========================================================================
   File Preview Card (Clay Inset)
   ========================================================================== */
.file-preview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--clay-pill-shadow);
    margin-top: 22px;
    border: 1px solid var(--border-clay);
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-preview-icon {
    font-size: 2rem;
}

.file-preview-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    max-width: 480px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-meta {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.file-remove-btn {
    background: none;
    border: none;
    color: var(--accent-rose);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-full);
    transition: transform 0.2s;
}

.file-remove-btn:hover {
    transform: scale(1.2);
}

/* ==========================================================================
   Options Panel & Carved Form Inputs
   ========================================================================== */
.options-panel {
    margin-top: 26px;
    padding: 24px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--clay-pill-shadow);
    border: 1px solid var(--border-clay);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.form-field input, .form-field select, .form-field textarea {
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    box-shadow: var(--clay-input-shadow);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 
        inset 1px 1px 3px rgba(99, 102, 241, 0.1),
        0 0 0 4px rgba(99, 102, 241, 0.14);
}

body.dark-theme .form-field input:focus, 
body.dark-theme .form-field select:focus, 
body.dark-theme .form-field textarea:focus {
    background: var(--bg-surface-inset);
}

/* Range Slider Styling (Tactile Clay Thumb) */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-inset);
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.15);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--primary);
    box-shadow: 
        inset 1px 1px 2px rgba(255, 255, 255, 0.6),
        inset -1px -2px 3px rgba(0, 0, 0, 0.25),
        0 4px 8px rgba(79, 70, 229, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* ==========================================================================
   Clay Buttons & Action Area
   ========================================================================== */
.action-panel {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-convert {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 34px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    box-shadow: var(--clay-btn-primary);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-convert:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--clay-btn-hover);
}

.btn-convert:active:not(:disabled) {
    transform: translateY(2px) scale(0.985);
    box-shadow: var(--clay-btn-active);
}

.btn-convert:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.action-btn-secondary {
    background: var(--clay-pill-bg);
    border: none;
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--clay-pill-shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn-secondary:hover {
    transform: translateY(-1px);
    color: var(--primary);
}

.action-btn-secondary:active {
    transform: translateY(2px) scale(0.98);
}

.action-btn-sm {
    background: var(--clay-pill-bg);
    border: none;
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--clay-pill-shadow);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn-sm:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* ==========================================================================
   Result Box & Download Buttons
   ========================================================================== */
.result-box {
    margin-top: 26px;
    padding: 26px 30px;
    background: #ecfdf5;
    border-radius: var(--radius-md);
    box-shadow: 
        inset 2px 2px 5px rgba(255, 255, 255, 0.95),
        inset -2px -3px 6px rgba(16, 185, 129, 0.2),
        0 12px 28px rgba(16, 185, 129, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

body.dark-theme .result-box {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.05),
        inset -2px -3px 5px rgba(0, 0, 0, 0.4);
}

.result-badge {
    font-size: 1.8rem;
}

.btn-download {
    padding: 13px 26px;
    background: var(--accent-emerald);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.5),
        inset -2px -3px 5px rgba(0, 0, 0, 0.25),
        0 10px 22px -3px rgba(16, 185, 129, 0.38);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-download:hover {
    background: var(--accent-emerald-dark);
    transform: translateY(-2px);
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.6),
        inset -2px -3px 5px rgba(0, 0, 0, 0.3),
        0 14px 28px -4px rgba(16, 185, 129, 0.46);
}

.btn-download:active {
    transform: translateY(2px) scale(0.98);
}

/* ==========================================================================
   Disclaimer & Warnings (Amber Clay)
   ========================================================================== */
.accuracy-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #fffbeb;
    border-radius: var(--radius-md);
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(245, 158, 11, 0.18),
        0 6px 16px rgba(245, 158, 11, 0.08);
    border-left: 5px solid var(--accent-amber);
    margin-top: 18px;
    font-size: 0.88rem;
    color: #92400e;
    line-height: 1.55;
}

body.dark-theme .accuracy-disclaimer {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    box-shadow: none;
}

/* ==========================================================================
   Hub Grid & 3D Clay Tool Cards
   ========================================================================== */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.hub-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--clay-card-shadow);
    border: 1px solid var(--border-clay);
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hub-card:hover {
    transform: translateY(-6px) scale(1.012);
    box-shadow: var(--clay-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Custom 3D Clay Icon Containers for Hub Cards */
.hub-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-card:hover .hub-card-icon {
    transform: scale(1.1) rotate(-4deg);
}

/* Distinct Pastel Clay Icon Themes */
.clay-icon-indigo {
    background: #e0e7ff;
    color: #4f46e5;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(99, 102, 241, 0.25),
        0 8px 18px rgba(99, 102, 241, 0.15);
}

.clay-icon-emerald {
    background: #d1fae5;
    color: #059669;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(16, 185, 129, 0.25),
        0 8px 18px rgba(16, 185, 129, 0.15);
}

.clay-icon-rose {
    background: #ffe4e6;
    color: #e11d48;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(244, 63, 94, 0.25),
        0 8px 18px rgba(244, 63, 94, 0.15);
}

.clay-icon-sky {
    background: #e0f2fe;
    color: #0284c7;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(14, 165, 233, 0.25),
        0 8px 18px rgba(14, 165, 233, 0.15);
}

.clay-icon-amber {
    background: #fef3c7;
    color: #d97706;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(245, 158, 11, 0.25),
        0 8px 18px rgba(245, 158, 11, 0.15);
}

.clay-icon-purple {
    background: #f3e8ff;
    color: #7c3aed;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(147, 51, 234, 0.25),
        0 8px 18px rgba(147, 51, 234, 0.15);
}

.clay-icon-teal {
    background: #ccfbf1;
    color: #0d9488;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(20, 184, 166, 0.25),
        0 8px 18px rgba(20, 184, 166, 0.15);
}

.clay-icon-orange {
    background: #ffedd5;
    color: #ea580c;
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.95),
        inset -2px -3px 5px rgba(249, 115, 22, 0.25),
        0 8px 18px rgba(249, 115, 22, 0.15);
}

body.dark-theme .clay-icon-indigo,
body.dark-theme .clay-icon-emerald,
body.dark-theme .clay-icon-rose,
body.dark-theme .clay-icon-sky,
body.dark-theme .clay-icon-amber,
body.dark-theme .clay-icon-purple,
body.dark-theme .clay-icon-teal,
body.dark-theme .clay-icon-orange {
    background: var(--bg-surface-elevated);
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.08),
        inset -2px -3px 5px rgba(0, 0, 0, 0.4);
}

.hub-card-title {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.38rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.hub-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 22px;
    flex: 1;
}

.hub-formats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.hub-format-tag {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 10px;
    background: var(--clay-pill-bg);
    border-radius: var(--radius-full);
    box-shadow: var(--clay-pill-shadow);
    color: var(--text-secondary);
}

.hub-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--primary);
    padding-top: 18px;
    border-top: 2px solid var(--border-subtle);
    transition: all 0.2s;
}

.hub-card:hover .hub-card-action {
    transform: translateX(4px);
    color: var(--primary-hover);
}

/* ==========================================================================
   Clay Search Input on Hub
   ========================================================================== */
.clay-search-wrapper {
    max-width: 560px;
    margin: 32px auto 0;
    position: relative;
}

.clay-search-input {
    width: 100%;
    padding: 16px 22px 16px 52px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    box-shadow: 
        inset 3px 3px 6px rgba(148, 163, 184, 0.16),
        inset -2px -2px 5px rgba(255, 255, 255, 0.9),
        0 8px 24px rgba(148, 163, 184, 0.1);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark-theme .clay-search-input {
    background: var(--bg-surface-inset);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.5),
        inset -2px -2px 4px rgba(255, 255, 255, 0.04);
}

.clay-search-input:focus {
    border-color: var(--primary);
    transform: scale(1.015);
    box-shadow: 
        inset 2px 2px 4px rgba(99, 102, 241, 0.08),
        0 0 0 4px rgba(99, 102, 241, 0.16),
        0 12px 28px rgba(99, 102, 241, 0.18);
}

.clay-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.tools-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 60px;
    background: var(--nav-bg);
}

.tools-footer strong {
    color: var(--text-secondary);
}

/* ==========================================================================
   Mega Dropdown Styles (Claymorphic Categorized Menu)
   ========================================================================== */
.tools-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.tools-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--clay-pill-bg);
    border-radius: var(--radius-sm);
    box-shadow: var(--clay-pill-shadow);
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tools-dropdown-btn:hover {
    transform: translateY(-1px);
    color: var(--primary);
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 1),
        inset -2px -3px 5px rgba(175, 190, 215, 0.45),
        0 6px 14px rgba(148, 163, 184, 0.16);
}

.tools-dropdown-btn.active {
    color: var(--primary);
}

.arrow-indicator {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.tools-mega-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--clay-card-hover);
    border: 1px solid var(--border-clay);
    padding: 24px;
    display: none;
    grid-template-columns: repeat(3, 270px);
    gap: 22px;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.tools-mega-menu.show {
    display: grid;
    animation: clayDropdownPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes clayDropdownPop {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mega-menu-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-menu-header {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 4px;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
}

.mega-menu-item:hover {
    background: var(--clay-pill-bg);
    transform: translateX(3px);
}

.mega-menu-item.active {
    background: var(--clay-pill-bg);
    box-shadow: var(--clay-pill-shadow);
}

.mega-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.mega-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.25;
}

.mega-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Responsive Adaptations */
@media (max-width: 1024px) {
    .tools-mega-menu {
        grid-template-columns: 1fr;
        width: 320px;
        max-height: 480px;
        overflow-y: auto;
    }
}

@media (max-width: 900px) {
    .tools-hero-title {
        font-size: 2.2rem;
    }
    
    .tools-nav-inner {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .tools-menu {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
        flex-wrap: nowrap;
    }

    .tool-card {
        padding: 24px 18px;
    }

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

/* ==========================================================================
   Command Palette (Ctrl + K Spotlight Modal)
   ========================================================================== */
.palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    animation: fadeIn 0.15s ease forwards;
}

.palette-backdrop.open {
    display: flex;
}

.palette-dialog {
    width: 90%;
    max-width: 620px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 
        inset 2px 2px 5px rgba(255, 255, 255, 0.8),
        0 25px 60px -15px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-clay);
    overflow: hidden;
    animation: scaleUp 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleUp {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.palette-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-subtle);
    background: var(--bg-surface-elevated);
}

.palette-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
}

.palette-results-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.palette-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.palette-result-item:hover, .palette-result-item.selected {
    background: var(--clay-pill-bg);
    transform: translateX(4px);
}

.palette-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface-elevated);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Star Favorite Pinning */
.btn-star-fav {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #cbd5e1;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
}

.btn-star-fav:hover {
    transform: scale(1.2);
}

.btn-star-fav.starred {
    color: #f59e0b;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.4));
}

/* Header Quick Search Button */
.header-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--clay-pill-shadow);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-search-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.header-search-btn kbd {
    background: var(--clay-pill-bg);
    border: 1px solid var(--border-subtle);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-family: inherit;
    font-weight: 700;
}

/* Category Filter Pills */
.filter-pill-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 24px 0 32px;
}

.filter-pill {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--clay-pill-shadow);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-pill:hover {
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--clay-card-hover);
}

.filter-pill.active {
    background: var(--clay-pill-active-bg);
    color: #ffffff;
    box-shadow: var(--clay-pill-active-shadow);
    border-color: transparent;
}

/* Pinned Favorites Quick-Bar in Header */
.pinned-tools-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pinned-tool-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--clay-pill-bg);
    box-shadow: var(--clay-pill-shadow);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.pinned-tool-item:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Recent Tools Bar */
.recent-tools-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.recent-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--clay-pill-shadow);
    transition: all 0.15s ease;
}

.recent-tool-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Global File Drag Overlay */
.global-drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(79, 70, 229, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.global-drag-overlay.active {
    display: flex;
    pointer-events: auto;
}

.drag-drop-card {
    background: #ffffff;
    color: #1e293b;
    padding: 40px 60px;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    text-align: center;
    max-width: 500px;
    animation: scaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}



