/* styles.css - Professional Split Layout Editor */

/* ============================================
   CSS RESET (Replaces Tailwind Preflight)
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    line-height: inherit;
}

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

button {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
    border: none;
}

img, svg {
    display: block;
    max-width: 100%;
}

ul, ol {
    list-style: none;
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-elevated: #334155;

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

    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-emerald: #10b981;

    --border-color: rgba(71, 85, 105, 0.5);
    --border-light: rgba(255, 255, 255, 0.06);

    /* Sidebar */
    --sidebar-width: 320px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL NAVIGATION BAR
   ============================================ */
.global-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: background var(--transition-fast);
}

.navbar-brand:hover {
    background: rgba(255, 255, 255, 0.05);
}

.navbar-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.navbar-title {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-tagline {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: white;
    background: rgba(99, 102, 241, 0.2);
}

.nav-link i {
    font-size: 12px;
}

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

.navbar-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #34d399;
}

.navbar-badge i {
    font-size: 12px;
}

.navbar-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.navbar-menu-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

/* Mobile Menu */
.navbar-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 12px 24px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.98);
}

.navbar-mobile-menu.open {
    display: flex;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.15);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
}

/* ============================================
   BASE STYLES
   ============================================ */
html, body {
    min-height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-y: auto;
    padding-top: 64px; /* Account for fixed navbar */
}

.hidden {
    display: none !important;
}

/* ============================================
   APP CONTAINER - SPLIT LAYOUT
   ============================================ */
.app-container {
    display: flex;
    width: 100%;
    min-height: 70vh;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: var(--bg-primary);
}

/* ============================================
   SCREEN STACK
   ============================================ */
.screen-stack {
    width: 100%;
    min-height: 100vh;
}

.app-screen {
    display: none;
    width: 100%;
}

.app-screen.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.screen-toolbar {
    width: min(1200px, 90%);
    margin: 40px auto 0;
    padding: 18px 24px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    gap: 20px;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

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

.toolbar-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.toolbar-meta span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   WORKSPACE TOPBAR
   ============================================ */
.workspace-topbar {
    width: 100%;
    margin-bottom: 20px;
    padding: 14px 20px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.workspace-topbar.compact {
    padding: 12px 18px;
}

.workspace-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.workspace-left h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.workspace-divider {
    width: 1px;
    height: 24px;
    background: rgba(148, 163, 184, 0.2);
}

.tool-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
}

.tool-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tool-tab i {
    font-size: 12px;
}

.tool-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.tool-tab.active {
    color: white;
    background: var(--accent-indigo);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.workspace-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-pill {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 13px;
}

.icon-pill:hover {
    color: var(--text-primary);
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.15);
}

/* ============================================
   HOME / HERO
   ============================================ */
.home-section {
    width: min(1200px, 90%);
    margin: 0 auto;
    padding: 40px 0 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(32px, 6vw, 54px);
    line-height: 1.1;
    margin: 16px 0;
}

.hero-content h1 span {
    color: var(--accent-indigo);
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #c7d2fe;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 24px;
    cursor: pointer;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.cta-btn.primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
    color: white;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
}

.cta-btn.ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.cta-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

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

.hero-stats div {
    flex: 1;
    min-width: 120px;
}

.hero-stats span {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #e2e8f0;
}

.hero-stats p {
    margin: 4px 0 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-preview {
    position: relative;
}

.preview-card {
    background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.2), transparent 60%),
        var(--bg-secondary);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.6);
}

.preview-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.preview-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-card li {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-card li i {
    color: var(--accent-emerald);
}

.preview-pill {
    margin-top: 28px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    background: rgba(236, 72, 153, 0.15);
    color: #f9a8d4;
    display: inline-block;
}

/* ============================================
   FEATURE GRID
   ============================================ */
.feature-section {
    width: min(1200px, 90%);
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    padding: 24px;
    min-height: 200px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon.icon-indigo {
    background: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

.feature-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.feature-icon.icon-pink {
    background: rgba(236, 72, 153, 0.2);
    color: #fbcfe8;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   DETAIL SECTION WRAPPER
   ============================================ */
.detail-section {
    width: min(1200px, 90%);
    margin: 0 auto 80px;
    padding-top: 24px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.detail-header h2 {
    font-size: 28px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 4px;
}

.detail-header p {
    color: var(--text-secondary);
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mini-btn {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.mini-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: white;
}

/* ============================================
   SIDEBAR - LEFT PANEL
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Sidebar Header - Logo */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: background var(--transition-fast);
}

.logo-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Tool Navigation */
.tool-nav {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-color);
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    padding: 0 8px;
    margin-bottom: 8px;
}

.tool-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.tool-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tool-nav-item.active {
    background: rgba(99, 102, 241, 0.15);
}

.tool-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.tool-nav-icon.icon-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.tool-nav-icon.icon-pink {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

.tool-nav-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.tool-nav-item.active .tool-nav-icon.icon-indigo {
    background: var(--accent-indigo);
    color: white;
}

.tool-nav-item.active .tool-nav-icon.icon-pink {
    background: var(--accent-pink);
    color: white;
}

.tool-nav-item.active .tool-nav-icon.icon-emerald {
    background: var(--accent-emerald);
    color: white;
}

.tool-nav-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tool-nav-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-nav-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Settings Container */
.settings-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-section {
    margin-bottom: 24px;
}

.settings-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.settings-title i {
    font-size: 12px;
    opacity: 0.7;
}

.settings-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Upload Box */
.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-box:hover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.upload-box.dragover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-box i {
    font-size: 24px;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.upload-box:hover i {
    color: var(--accent-indigo);
}

.upload-box span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-item:hover {
    background: var(--bg-elevated);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-item input:checked + .checkmark {
    background: var(--accent-indigo);
    border-color: var(--accent-indigo);
}

.checkbox-item input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-radius: 4px;
}

/* Preset Group */
.preset-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preset-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.preset-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border-color);
}

.preset-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
}

.preset-item i {
    font-size: 16px;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
}

.preset-item.active i {
    color: var(--accent-indigo);
}

.preset-item div {
    display: flex;
    flex-direction: column;
}

.preset-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.preset-size {
    font-size: 11px;
    color: var(--text-muted);
}

/* Format Select */
.format-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.format-option:hover {
    background: var(--bg-elevated);
}

.format-option.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-indigo);
}

.format-option input[type="radio"] {
    display: none;
}

.format-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.format-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.format-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.format-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.format-badge.recommended {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* Quality Slider */
.quality-slider {
    padding: 8px 0;
}

.quality-slider input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-indigo);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

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

.quality-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 10px;
    color: var(--text-muted);
}

#quality-value {
    font-weight: 700;
    color: var(--accent-indigo);
}

/* Action Button */
.action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-violet));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
}

.privacy-badge i {
    color: var(--accent-emerald);
}

/* ============================================
   PREVIEW AREA - RIGHT PANEL
   ============================================ */
.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
}

/* Preview Header */
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    margin: 0 24px 20px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(18px);
}

.preview-header.minimal {
    justify-content: center;
    gap: 16px;
    padding: 10px 20px;
    margin: 20px 24px 16px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.preview-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.indicator-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #34d399;
}

.preview-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1;
}

.preview-info #preview-tool-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.preview-separator {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1;
}

.preview-status {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1;
}

.preview-status.processing {
    color: #fbbf24;
}

/* Preview Content */
.preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: auto;
}

/* Empty State */
.preview-empty {
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 32px;
    opacity: 0.5;
}

.preview-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.preview-empty p {
    font-size: 14px;
}

/* Preview Panels */
.preview-panel {
    width: 100%;
    height: 100%;
    animation: fadeIn 0.3s ease;
}

/* Favicon Preview Grid */
.favicon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.favicon-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-normal);
}

.favicon-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-indigo);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.favicon-item img {
    background: repeating-conic-gradient(#334155 0% 25%, transparent 0% 50%) 50%/16px 16px;
    border-radius: 8px;
    image-rendering: pixelated;
}

.favicon-item .size-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.favicon-item .size-badge {
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-radius: 4px;
}

/* Cropper Container */
.cropper-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

#resizer-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Converter Preview */
.converter-preview-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 40px;
}

.converter-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    width: 280px;
    transition: all var(--transition-normal);
}

.converter-card:hover {
    border-color: var(--accent-indigo);
}

.card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.card-image {
    width: 100%;
    height: 180px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-image .placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.card-image .placeholder i {
    font-size: 24px;
    opacity: 0.5;
}

.card-image .placeholder span {
    font-size: 12px;
}

.card-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.card-info span:first-child {
    color: var(--text-secondary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-info span:last-child {
    color: var(--text-muted);
    font-weight: 600;
}

.converter-arrow {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-indigo);
    font-size: 18px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.3s ease;
    min-width: 280px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.toast-info .toast-icon {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-indigo);
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   CROPPER.JS OVERRIDES
   ============================================ */
.cropper-view-box,
.cropper-face {
    border-radius: 0;
}

.cropper-view-box {
    outline: 2px solid var(--accent-indigo);
    outline-offset: -2px;
}

.cropper-line {
    background-color: var(--accent-indigo);
}

.cropper-point {
    background-color: var(--accent-indigo);
    width: 10px;
    height: 10px;
}

.cropper-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* Navbar Mobile */
    .navbar-links {
        display: none;
    }

    .navbar-badge span {
        display: none;
    }

    .navbar-badge {
        padding: 8px;
    }

    .navbar-menu-btn {
        display: flex;
    }

    .brand-tagline {
        display: none;
    }

    body {
        padding-top: 64px;
    }

    /* Workspace Topbar Mobile */
    .workspace-topbar.compact {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .workspace-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .workspace-divider {
        display: none;
    }

    .tool-tabs {
        width: 100%;
        justify-content: center;
    }

    .tool-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
        font-size: 12px;
    }

    .tool-tab i {
        display: none;
    }

    .workspace-right {
        justify-content: flex-end;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        max-height: none;
    }

    .preview-area {
        height: auto;
        min-height: 320px;
    }

    .converter-preview-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .converter-arrow {
        transform: rotate(90deg);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
    }

    .detail-header {
        flex-direction: column;
    }

    .home-section,
    .feature-section,
    .detail-section {
        width: 92%;
    }

    .screen-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .workspace-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .workspace-controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin: 0 0 20px;
    }

    .preview-title {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
}
