/* ==========================================================================
   VTracer Pro Studio — TIK Store Edition (Living Neon Green & Cyber Black)
   Designed & Developed by mm bolouki for TIK Store
   ========================================================================== */

:root {
    --bg-base: #030604;
    --bg-surface: #070d09;
    --bg-surface-raised: #0f1811;
    --bg-surface-hover: #16241a;
    --bg-card: #0b130e;
    --bg-card-header: #101c13;
    
    --border-subtle: rgba(0, 255, 136, 0.16);
    --border-medium: rgba(0, 255, 136, 0.32);
    --border-bright: rgba(0, 255, 136, 0.65);
    --border-focus: #00ff88;
    
    --accent-green: #00ff88;
    --accent-emerald: #10b981;
    --accent-lime: #a3e635;
    --accent-mint: #34d399;
    --accent-dark-green: #059669;
    --accent-amber: #fbbf24;
    --accent-rose: #fb7185;
    --accent-cyan: #06b6d4;
    
    --text-primary: #f0fdf4;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-disabled: #334155;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 18px rgba(0, 0, 0, 0.65);
    --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.35);
    --shadow-glow-strong: 0 0 32px rgba(0, 255, 136, 0.6);
    
    --font-en: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-fa: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --header-height: 64px;
    --footer-height: 40px;
    --sidebar-width: 400px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-fa);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

html[lang="en"] body, html[lang="en"] * {
    font-family: var(--font-en);
}
html[lang="fa"] body, html[lang="fa"] * {
    font-family: var(--font-fa);
}

/* App Container Layout */
.app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, rgba(0, 255, 136, 0.08) 0%, transparent 65%), #030604;
}

/* ==========================================================================
   Living Animated Neon Effects
   ========================================================================== */
@keyframes neonPulseGlow {
    0%, 100% {
        box-shadow: 0 0 14px rgba(0, 255, 136, 0.25), inset 0 0 8px rgba(0, 255, 136, 0.08);
        border-color: rgba(0, 255, 136, 0.35);
    }
    50% {
        box-shadow: 0 0 28px rgba(0, 255, 136, 0.55), inset 0 0 14px rgba(0, 255, 136, 0.18);
        border-color: rgba(0, 255, 136, 0.75);
    }
}

@keyframes livingBorderWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatEmblem {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 14px rgba(0, 255, 136, 0.4)); }
    50% { transform: translateY(-5px) scale(1.02); filter: drop-shadow(0 0 24px rgba(0, 255, 136, 0.7)); }
}

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

/* Header Bar (Framed, Exact Centered Layout, Zero Overflow) */
.app-header {
    height: var(--header-height);
    background-color: rgba(7, 13, 9, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 50;
    gap: 8px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.6), rgba(16, 185, 129, 0.85), rgba(0, 255, 136, 0.6), transparent);
    background-size: 200% 100%;
    animation: livingBorderWave 5s ease infinite;
}

/* Header Left: Brand, Logo & Status */
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
}

.tik-logo-emblem {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(0, 255, 136, 0.45);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.logo-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.logo-title {
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: -0.2px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.1;
    white-space: nowrap;
}

.badge-tik {
    font-size: 9px;
    font-weight: 900;
    padding: 1px 5px;
    background: linear-gradient(90deg, #00ff88, #10b981);
    color: #030604;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.logo-subtitle {
    font-size: 9.5px;
    color: var(--accent-mint);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.1;
    white-space: nowrap;
}

.author-chip {
    font-size: 8.5px;
    font-weight: 700;
    color: #a7f3d0;
    background: rgba(0, 255, 136, 0.12);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 0 4px;
    border-radius: var(--radius-full);
}

.wasm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: var(--radius-full);
    background-color: var(--bg-surface-raised);
    border: 1px solid var(--border-subtle);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.wasm-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-amber);
    box-shadow: 0 0 6px var(--accent-amber);
    transition: all 0.3s;
}

.wasm-status-badge.ready .status-dot {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: neonPulseGlow 2.5s infinite;
}

/* Language Toggle Switch */
.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--accent-green);
    font-weight: 700;
    font-size: 10.5px;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-switch-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--accent-green);
}

.lang-text-active {
    color: #ffffff;
    font-weight: 800;
    font-size: 10.5px;
}

/* Header Center: Presets (Compact Capsule) */
.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.header-center::-webkit-scrollbar {
    display: none;
}

.quick-presets {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(3, 6, 4, 0.95);
    padding: 2px 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    flex-shrink: 0;
}

.quick-presets-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.preset-pill-group {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.preset-pill {
    background: transparent;
    border: 1px solid transparent;
    outline: none;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preset-pill:hover {
    color: #ffffff;
    background-color: rgba(0, 255, 136, 0.12);
}

.preset-pill.active {
    color: #030604;
    background: linear-gradient(135deg, #00ff88, #10b981);
    font-weight: 800;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* Header Right: Action Buttons (Unified & Compact) */
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.export-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(3, 6, 4, 0.85);
    padding: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.header-menu-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    border-inline-start: 1px solid var(--border-subtle);
    padding-inline-start: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    outline: none;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88, #059669);
    background-size: 150% 150%;
    color: #030604;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 12px rgba(0, 255, 136, 0.35);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2bff9d, #10b981);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.6);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background-color: var(--bg-surface-raised);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.btn-export {
    background: linear-gradient(135deg, #111a14, #0d140f);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.btn-export:hover:not(:disabled) {
    background: linear-gradient(135deg, #18251c, #111a14);
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.35);
}

.btn-export.btn-pdf:hover:not(:disabled) {
    border-color: var(--accent-lime);
    color: var(--accent-lime);
    box-shadow: 0 0 14px rgba(163, 230, 53, 0.35);
}

.btn-export.btn-dxf:hover:not(:disabled) {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.45);
}

.btn-large {
    padding: 11px 24px;
    font-size: 13.5px;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background-color: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-icon:hover:not(:disabled) {
    background-color: var(--bg-surface-raised);
    color: var(--accent-green);
    border-color: var(--border-subtle);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-text-subtle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-text-subtle:hover {
    color: var(--accent-green);
    background-color: var(--bg-surface-raised);
}

/* ==========================================================================
   Main Layout: Viewport + Sidebar
   ========================================================================== */
.app-main {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* ==========================================================================
   Central Viewport Section
   ========================================================================== */
.viewport-section {
    flex: 1;
    height: 100%;
    position: relative;
    background-color: #030604;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 75%),
        linear-gradient(to right, rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 36px 36px, 36px 36px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty Dropzone Card */
.dropzone-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    z-index: 10;
}

.dropzone-card {
    position: relative;
    max-width: 580px;
    width: 100%;
    padding: 36px 30px;
    background: rgba(11, 19, 14, 0.88);
    backdrop-filter: blur(20px);
    border: 2px dashed rgba(0, 255, 136, 0.35);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 136, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: neonPulseGlow 4s infinite ease-in-out;
}

.dropzone-empty.dragover .dropzone-card {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.12);
    box-shadow: var(--shadow-glow-strong);
    transform: scale(1.02);
}

.dropzone-emblem {
    margin-bottom: 16px;
    animation: floatEmblem 3.5s ease-in-out infinite;
}

.dropzone-heading {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.4px;
}

.dropzone-sub {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.dropzone-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.dropzone-or {
    font-size: 11.5px;
    color: var(--text-muted);
}

.dropzone-or kbd {
    background-color: var(--bg-surface-raised);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--accent-green);
}

.sample-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
    width: 100%;
}

.sample-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.sample-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
}

.sample-chip {
    background-color: var(--bg-surface-raised);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
}

.sample-chip:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.25);
    transform: translateY(-1px);
}

/* Canvas Viewport */
.viewport-canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
}

.viewport-canvas-container.panning {
    cursor: grabbing;
}

.canvas-drag-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.canvas-artboard {
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 255, 136, 0.25);
    background-color: #ffffff;
    background-image: 
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    overflow: hidden;
}

.canvas-artboard.bg-dark {
    background: #090e0b !important;
}

.canvas-artboard.bg-white {
    background: #ffffff !important;
}

.layer-raster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.layer-vector {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.layer-vector svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Wireframe Inspection Mode */
.layer-vector.wireframe svg path {
    fill: none !important;
    stroke: #00ff88 !important;
    stroke-width: 1.5px !important;
    stroke-opacity: 0.95 !important;
    vector-effect: non-scaling-stroke;
}

/* Split Comparison View Mode */
.split-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: ew-resize;
    z-index: 30;
    pointer-events: auto;
}

.split-line {
    width: 2px;
    height: 100%;
    background-color: var(--accent-green);
    box-shadow: 0 0 14px var(--accent-green);
    margin: 0 auto;
}

.split-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #030604;
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.7);
    cursor: ew-resize;
    animation: neonPulseGlow 3s infinite;
}

/* Side by Side Mode */
.canvas-artboard.side-by-side {
    display: flex !important;
}

.canvas-artboard.side-by-side .layer-raster {
    position: relative;
    width: 50%;
    height: 100%;
    border-inline-end: 2px solid var(--border-medium);
}

.canvas-artboard.side-by-side .layer-vector {
    position: relative;
    width: 50%;
    height: 100%;
}

/* Processing Spinner Overlay */
.processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 4, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    transition: opacity 0.2s;
}

.processing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 24px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 255, 136, 0.25);
    animation: neonPulseGlow 2s infinite ease-in-out;
}

.spinner-ring {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(0, 255, 136, 0.15);
    border-top-color: var(--accent-green);
    animation: spin 0.75s linear infinite;
}

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

.processing-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.processing-meta {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--accent-green);
}

/* Floating Viewport Toolbar */
.floating-controls {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(7, 13, 9, 0.9);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 25;
    box-shadow: var(--shadow-lg), 0 0 16px rgba(0, 255, 136, 0.15);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.control-separator {
    width: 1px;
    height: 16px;
    background-color: var(--border-medium);
    margin: 0 3px;
}

.btn-control {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-control:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-raised);
}

.btn-control.active {
    color: #030604;
    background-color: var(--accent-green);
    font-weight: 700;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.45);
}

.btn-control-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-control-icon:hover {
    background-color: var(--bg-surface-raised);
    color: var(--accent-green);
    border-color: var(--border-subtle);
}

.btn-control-icon.active {
    color: var(--accent-green);
    border-color: rgba(0, 255, 136, 0.45);
    background-color: rgba(0, 255, 136, 0.12);
}

.btn-control-text {
    background: transparent;
    border: none;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 4px;
    cursor: pointer;
}

.btn-control-text:hover {
    color: var(--accent-green);
}

/* ==========================================================================
   Sidebar Settings Panel (2 Spacious Tabs, High-Visibility Scrollbar)
   ========================================================================== */
.sidebar-section {
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--bg-surface);
    border-inline-start: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 30;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative;
}

.sidebar-header {
    height: 50px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-card-header);
    flex-shrink: 0;
}

.sidebar-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-green);
}

.sidebar-title {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

/* 2 High-Tech Tabs Bar */
.sidebar-tabs-bar {
    display: flex;
    background: rgba(3, 6, 4, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    outline: none;
}

.sidebar-tab-btn:hover {
    color: var(--accent-green);
    background-color: var(--bg-surface-raised);
    border-color: var(--border-subtle);
}

.sidebar-tab-btn.active {
    color: #030604;
    background: linear-gradient(135deg, #00ff88, #10b981);
    font-weight: 800;
    border-color: #00ff88;
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.45);
}

/* Sidebar Scrollable Body with High-Visibility Glowing Scrollbar */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    
    /* Firefox Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #00ff88 rgba(0, 255, 136, 0.08);
}

/* Chrome, Edge, Safari Glowing Neon Scrollbar */
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(0, 255, 136, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.12);
    margin: 6px 0;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff88, #059669);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    border: 1px solid #030604;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #34d399, #10b981);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.85);
}

/* Tab Panels */
.tab-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 14px;
}

.tab-panel.active {
    display: flex;
    animation: tabFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Parameter Cards (Modular, Spacious, Perfectly Framed) */
.param-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
}

.param-card:hover {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 255, 136, 0.15);
}

.param-card-header {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.1), rgba(16, 185, 129, 0.03));
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.param-card-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.1px;
}

.param-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background-color: var(--bg-surface-raised);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 136, 0.35);
}

.param-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* Control Elements */
.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.control-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.info-icon {
    font-size: 11px;
    color: var(--text-muted);
    cursor: help;
}

.segmented-control {
    display: flex;
    background-color: var(--bg-base);
    padding: 2px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.seg-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.seg-btn:hover {
    color: var(--text-primary);
}

.seg-btn.active {
    background-color: var(--bg-surface-raised);
    color: var(--accent-green);
    border: 1px solid var(--border-medium);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 255, 136, 0.15);
}

/* Slider Controls */
.control-slider-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
    box-sizing: border-box;
}

.slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.slider-val-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-green);
    background-color: rgba(0, 255, 136, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    direction: ltr !important;
    white-space: nowrap;
}

.styled-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-base);
    border-radius: 3px;
    outline: none;
    border: 1px solid var(--border-subtle);
    direction: ltr;
    margin: 4px 0;
    box-sizing: border-box;
}

.styled-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), #059669);
    border: 2px solid #030604;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    transition: transform 0.1s, box-shadow 0.2s;
}

.styled-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.95);
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 9.5px;
    color: var(--text-disabled);
    padding: 0 2px;
    direction: ltr;
}

.control-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}

.checkbox-row {
    padding-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.styled-checkbox {
    accent-color: var(--accent-green);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Color Palette Replacer Grid */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
    margin-top: 4px;
    max-height: 190px;
    overflow-y: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-green) transparent;
}

.palette-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(3, 6, 4, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 7px 4px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.palette-chip:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 255, 136, 0.35);
    background: rgba(0, 255, 136, 0.08);
}

.palette-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.palette-hex-code {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2px;
    direction: ltr !important;
}

.palette-path-count {
    font-size: 9px;
    color: var(--accent-mint);
    margin-top: 2px;
}

.palette-empty-msg {
    font-size: 11px;
    color: var(--text-muted);
    grid-column: 1 / -1;
    text-align: center;
    padding: 14px 0;
}

.bg-remover-controls {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
    animation: tabFadeIn 0.2s ease-out;
}

/* Sidebar Sticky Footer Button */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-subtle);
    background-color: rgba(7, 13, 9, 0.98);
    flex-shrink: 0;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.4);
}

#sidebarVectorizeBtn {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 800;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 18px rgba(0, 255, 136, 0.45);
}

/* ==========================================================================
   Footer Status Bar
   ========================================================================== */
.app-footer {
    height: var(--footer-height);
    background-color: rgba(7, 13, 9, 0.96);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 11px;
    color: var(--text-secondary);
    z-index: 50;
    box-sizing: border-box;
}

.footer-left, .footer-center, .footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.status-separator {
    width: 1px;
    height: 14px;
    background-color: var(--border-subtle);
}

.status-label {
    color: var(--text-muted);
}

.status-val {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

.status-item.highlight .status-val {
    color: var(--accent-green);
    font-weight: 700;
}

.author-footer-badge {
    color: #a7f3d0;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge-corel {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    background: rgba(0, 255, 136, 0.14);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: var(--radius-full);
    color: var(--accent-green);
    font-size: 9.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(3, 6, 4, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.2s;
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 255, 136, 0.2);
    overflow: hidden;
    animation: neonPulseGlow 4s infinite ease-in-out;
}

.modal-card.modal-medium {
    max-width: 760px;
    max-height: 85vh;
}

.modal-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-card-header);
    flex-shrink: 0;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-green);
}

.modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.btn-modal-close:hover {
    color: var(--accent-green);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    
    /* Glowing Neon Scrollbar for Modal Body */
    scrollbar-width: thin;
    scrollbar-color: #00ff88 rgba(0, 255, 136, 0.08);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 255, 136, 0.05);
    border-radius: 4px;
    margin: 6px 0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff88, #059669);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    border: 1px solid #030604;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #34d399, #10b981);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.85);
}

.code-textarea {
    width: 100%;
    height: 340px;
    background-color: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--text-primary);
    resize: none;
    outline: none;
    white-space: pre;
    direction: ltr !important;
}

.modal-prose {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 12.5px;
}

.modal-prose h4 {
    color: var(--accent-green);
    font-size: 13.5px;
    font-weight: 800;
    margin: 18px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
    padding-bottom: 4px;
}

.modal-prose h4:first-child {
    margin-top: 0;
}

.modal-prose p {
    margin-bottom: 12px;
}

.modal-prose ul, .modal-prose ol {
    margin-inline-start: 22px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-prose li strong {
    color: #ffffff;
}

.modal-prose code {
    background-color: var(--bg-surface-raised);
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 136, 0.25);
    direction: ltr;
    display: inline-block;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card-header);
}

.modal-meta {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--text-muted);
    direction: ltr;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 50px;
    inset-inline-end: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 120;
    pointer-events: none;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-inline-start: 4px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 255, 136, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.error {
    border-inline-start-color: var(--accent-rose);
}

.toast.success {
    border-inline-start-color: var(--accent-green);
}

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

/* Mobile Controls Default State */
.mobile-toggle-btn {
    display: none;
}

.mobile-sidebar-close {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

/* ==========================================================================
   Comprehensive Responsive Breakpoints (Zero Overflow Across All Screens & Mobile Phones)
   ========================================================================== */
@media (max-width: 1400px) {
    .wasm-status-badge {
        display: none;
    }
}

@media (max-width: 1200px) {
    .quick-presets-label {
        display: none;
    }
    .author-footer-badge {
        display: none;
    }
    :root {
        --sidebar-width: 360px;
    }
    .preset-pill {
        padding: 3px 6px;
        font-size: 10px;
    }
    .btn {
        padding: 4px 7px;
        font-size: 10.5px;
    }
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 330px;
    }
    .app-header {
        padding: 0 8px;
        gap: 4px;
    }
    .header-center {
        overflow-x: auto;
        justify-content: flex-start;
    }
    .logo-subtitle {
        display: none;
    }
    .btn span {
        font-size: 10px;
    }
}

/* Smartphones & Mobile Devices (Portrait & Landscape: 320px - 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 52px;
        --footer-height: 30px;
    }

    .mobile-toggle-btn {
        display: inline-flex;
    }

    .mobile-sidebar-close {
        display: inline-flex;
    }

    .app-main {
        grid-template-columns: 1fr;
        position: relative;
        height: calc(100vh - var(--header-height) - var(--footer-height));
    }

    .header-center {
        display: none;
    }

    .app-header {
        padding: 0 8px;
        gap: 4px;
    }

    .logo-title {
        font-size: 11.5px;
    }

    .badge-tik {
        display: none;
    }

    .tik-logo-emblem {
        width: 28px;
        height: 28px;
    }

    .btn {
        padding: 5px 7px;
        font-size: 10px;
    }

    .btn-export span {
        display: none;
    }

    .btn-export {
        padding: 5px 6px;
    }

    .header-menu-actions {
        padding-inline-start: 4px;
        gap: 2px;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
    }

    /* Mobile Sidebar as Slide-in Drawer */
    .sidebar-section {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 88vw;
        max-width: 380px;
        height: 100vh;
        z-index: 150;
        background: rgba(7, 13, 9, 0.98);
        backdrop-filter: blur(24px);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.95);
        border-inline-start: 1px solid var(--border-medium);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [dir="rtl"] .sidebar-section {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    [dir="ltr"] .sidebar-section {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    .sidebar-section.mobile-open {
        transform: translateX(0) !important;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(8px);
        z-index: 140;
        display: block;
        transition: opacity 0.25s;
    }

    .sidebar-backdrop.hidden {
        display: none !important;
    }

    /* Floating Viewport Controls for Mobile Thumb Reach */
    .floating-controls {
        bottom: 8px;
        max-width: calc(100vw - 16px);
        padding: 3px 6px;
        gap: 3px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .floating-controls::-webkit-scrollbar {
        display: none;
    }

    .btn-control span {
        display: none;
    }

    .btn-control {
        padding: 5px 6px;
    }

    /* Dropzone on Mobile */
    .dropzone-card {
        padding: 24px 16px;
        width: 92%;
        max-width: 400px;
    }

    .dropzone-heading {
        font-size: 15px;
    }

    .dropzone-sub {
        font-size: 11px;
    }

    .dropzone-actions .btn-large {
        padding: 10px 18px;
        font-size: 12px;
    }

    .sample-chips {
        gap: 5px;
    }

    .sample-chip {
        padding: 4px 8px;
        font-size: 10.5px;
    }

    /* Modals on Mobile */
    .modal-card {
        width: 95vw !important;
        max-height: 90vh !important;
        padding: 12px !important;
    }

    .mockup-selector-bar {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mockup-tab-btn {
        padding: 6px 8px;
        font-size: 10.5px;
    }

    .mockup-stage-container {
        height: 280px;
    }

    .mockup-surface {
        width: 220px;
        height: 220px;
    }

    .app-footer {
        padding: 2px 8px;
        font-size: 9.5px;
    }

    .footer-left {
        gap: 4px;
    }

    .status-badge-corel {
        display: none;
    }
}

/* ==========================================================================
   Interactive Cyber Ambient Effects, Laser Scanner & Magnifier Tool
   ========================================================================== */
.cyber-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
}

.laser-scan-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.4), #00ff88, #ffffff, #00ff88, rgba(0, 255, 136, 0.4), transparent);
    box-shadow: 0 0 16px #00ff88, 0 0 35px rgba(0, 255, 136, 0.85);
    z-index: 25;
    pointer-events: none;
    animation: laserScanMove 1.4s ease-in-out infinite alternate;
}

@keyframes laserScanMove {
    0% { top: 0%; opacity: 0.95; }
    100% { top: 100%; opacity: 0.95; }
}

/* Precision Magnifier Lens (4X) */
.magnifier-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2.5px solid var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.55), inset 0 0 20px rgba(0, 255, 136, 0.25), 0 12px 35px rgba(0, 0, 0, 0.85);
    background: #030604;
    overflow: hidden;
    pointer-events: none;
    z-index: 35;
    transform: translate(-50%, -50%);
}

.magnifier-hud {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(3, 6, 4, 0.88);
    border: 1px solid rgba(0, 255, 136, 0.4);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 9px;
    color: #00ff88;
    white-space: nowrap;
}

.magnifier-zoom-badge {
    background: #00ff88;
    color: #030604;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 8.5px;
}

/* Direct Path Inspector Tooltip */
.path-inspector-tooltip {
    position: absolute;
    background: rgba(7, 13, 9, 0.94);
    border: 1px solid var(--accent-green);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.4);
    border-radius: 6px;
    padding: 4px 9px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    z-index: 40;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    transform: translate(12px, 12px);
    transition: opacity 0.15s;
}

.inspector-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.inspector-badge {
    font-size: 9px;
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: var(--font-fa);
}

/* Layer Vector Hover Highlight */
.layer-vector svg path {
    transition: opacity 0.15s, filter 0.15s;
    cursor: pointer;
}

.layer-vector svg path:hover {
    filter: drop-shadow(0 0 8px #00ff88) drop-shadow(0 0 2px #ffffff);
}

/* Interactive Product Mockup Studio */
.modal-card.modal-large {
    max-width: 860px;
    max-height: 90vh;
}

.mockup-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 22px;
}

.mockup-selector-bar {
    display: flex;
    gap: 8px;
    background: rgba(3, 6, 4, 0.85);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.mockup-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mockup-tab-btn:hover {
    background: var(--bg-surface-raised);
    color: var(--accent-green);
}

.mockup-tab-btn.active {
    background: linear-gradient(135deg, #00ff88, #10b981);
    color: #030604;
    border-color: #00ff88;
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.45);
}

.mockup-stage-container {
    width: 100%;
    height: 380px;
    background: #020403;
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.04) 0%, transparent 70%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.9);
}

.mockup-surface {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
}

.mockup-surface.mockup-tshirt {
    background: #111513;
    background-image: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mockup-surface.mockup-wood {
    background: #4a2b12;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 2px, transparent 2px, transparent 6px);
    border: 2px solid #6b3e19;
}

.mockup-surface.mockup-acrylic {
    background: #060e0a;
    border: 2px solid #00ff88;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.45), inset 0 0 25px rgba(0, 255, 136, 0.18);
}

.mockup-surface.mockup-sticker {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.mockup-graphic-wrapper {
    width: 75%;
    height: 75%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-graphic-wrapper svg {
    max-width: 100%;
    max-height: 100%;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.mockup-surface.mockup-wood .mockup-graphic-wrapper svg path {
    fill: #1a0f06 !important;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.15));
}

.mockup-surface.mockup-acrylic .mockup-graphic-wrapper svg path {
    filter: drop-shadow(0 0 10px #00ff88);
}

/* Utilities */
.hidden {
    display: none !important;
}
