:root { 
    --primary: #6366f1; /* Indigo */
    --accent: #d946ef;  /* Magenta */
    --cyan: #06b6d4;    /* Cyan */
    --glass: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
}

body { 
    margin: 0; 
    font-family: 'Outfit', sans-serif; 
    background-color: #020617; 
    color: var(--text); 
    overflow-x: hidden; 
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 25%), 
        radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.15) 0%, transparent 25%);
    min-height: 100vh; 
}

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 50px; position: fixed; width: 100%; top: 0; z-index: 100; box-sizing: border-box; }
.logo { font-size: 1.8rem; font-weight: 800; letter-spacing: 1px; display: flex; align-items: center; text-shadow: 0 0 20px rgba(99,102,241,0.5); }
.logo-icon { color: var(--primary); margin-right: 12px; }
.ai-badge { background: linear-gradient(90deg, var(--primary), var(--accent)); padding: 2px 10px; border-radius: 4px; font-size: 0.9rem; margin-left: 10px; font-weight: 700; box-shadow: 0 0 15px var(--primary); }
.server-info { font-family: 'Courier New', monospace; color: var(--cyan); background: rgba(6, 182, 212, 0.1); padding: 6px 15px; border-radius: 20px; font-size: 0.85rem; border: 1px solid rgba(6, 182, 212, 0.3); backdrop-filter: blur(5px); }

/* Main Layout */
.main-container { margin-top: 100px; padding: 20px; display: flex; flex-direction: column; align-items: center; }
.hero-section { text-align: center; margin-bottom: 50px; }
.hero-section h1 { 
    font-size: 4rem; 
    margin: 0; 
    font-weight: 800; 
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.1));
}
.hero-section p { color: #94a3b8; font-size: 1.1rem; letter-spacing: 2px; text-transform: uppercase; margin-top: 10px; }

/* Upload Zone */
.upload-zone { 
    position: relative; width: 100%; max-width: 700px; height: 300px; 
    border: 2px dashed rgba(255,255,255,0.2); border-radius: 30px; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    cursor: pointer; transition: 0.4s; background: rgba(255,255,255,0.02); 
    backdrop-filter: blur(5px);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--cyan); background: rgba(6, 182, 212, 0.05); transform: scale(1.02); }
.upload-zone.drag { border-style: solid; box-shadow: 0 0 30px rgba(6,182,212,0.3); }
.upload-icon { font-size: 4rem; color: #475569; margin-bottom: 20px; transition: 0.3s; }
.upload-zone:hover .upload-icon { color: var(--cyan); filter: drop-shadow(0 0 20px var(--cyan)); }
.upload-text h3 { font-size: 1.5rem; margin: 0 0 5px 0; }
.upload-text p { color: #64748b; margin: 0; }

/* Editor */
.editor-container { width: 100%; max-width: 1200px; display: flex; flex-direction: column; gap: 40px; align-items: center; }

.split-view { 
    display: flex; 
    gap: 30px; 
    width: 100%; 
    justify-content: center; 
    align-items: center; 
}

/* Glass Panels */
.view-box { 
    flex: 1; 
    background: var(--glass); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px; 
    padding: 20px; 
    border: 1px solid var(--glass-border); 
    position: relative; 
    display: flex; flex-direction: column; 
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.input-box { border-top: 2px solid rgba(6, 182, 212, 0.5); }
.output-box { border-top: 2px solid rgba(217, 70, 239, 0.5); }

.label-badge { 
    position: absolute; 
    top: -18px; 
    left: 50%; 
    transform: translateX(-50%);
    padding: 8px 20px; 
    border-radius: 30px; 
    font-size: 0.8rem; 
    font-weight: 800; 
    letter-spacing: 1.5px; 
    text-transform: uppercase; 
    z-index: 10; 
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.badge-source { background: #0f172a; color: var(--cyan); border: 1px solid var(--cyan); box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); }
.badge-output { background: #0f172a; color: var(--accent); border: 1px solid var(--accent); box-shadow: 0 0 15px rgba(217, 70, 239, 0.3); }

.image-wrapper { 
    position: relative; 
    border-radius: 16px; 
    overflow: hidden; 
    background: #000; 
    flex-grow: 1; 
    display: flex; align-items: center; justify-content: center; 
    min-height: 400px; 
    border: 1px solid rgba(255,255,255,0.05);
}
.image-wrapper img { max-width: 100%; max-height: 500px; object-fit: contain; display: block; }


/* --- NEW FUSION CORE BRIDGE --- */
.energy-bridge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 150px;
    height: 60px;
}

.laser-beam {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 6px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, var(--cyan), #fff, var(--accent), #fff, var(--cyan));
    background-size: 200% 100%;
    border-radius: 3px;
    box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--accent);
    animation: flow-energy 2s linear infinite;
    z-index: 1;
}

.bridge-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 20px var(--cyan) inset, 0 0 10px var(--cyan);
    z-index: 2;
}

/* Rotating Ring */
.bridge-icon::before {
    content: '';
    position: absolute;
    top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--cyan);
    border-bottom-color: var(--accent);
    animation: spin-ring 3s linear infinite;
}

.bridge-icon i {
    color: #fff;
    font-size: 1.2rem;
    text-shadow: 0 0 5px var(--cyan), 0 0 15px var(--cyan);
    animation: pulse-arrow 1.5s ease-in-out infinite alternate;
}

/* Bridge Animations */
@keyframes flow-energy { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes spin-ring { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse-arrow { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.2); opacity: 1; } }


/* --- PANEL ANIMATIONS (Clean "Pulse") --- */
.input-wrapper.leaking img { 
    animation: simplePulse 2s infinite ease-in-out;
    border-radius: 12px;
}
@keyframes simplePulse {
    0% { opacity: 1; box-shadow: 0 0 0 rgba(6, 182, 212, 0); }
    50% { opacity: 0.7; box-shadow: 0 0 15px rgba(6, 182, 212, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 0 rgba(6, 182, 212, 0); }
}

.output-wrapper img { opacity: 0.2; filter: blur(10px) grayscale(1); transition: 1s; }
.output-wrapper.reconstructing img { opacity: 0.8; filter: blur(2px) grayscale(0.5); animation: hologram 2s infinite; }
.output-wrapper.finished img { opacity: 1; filter: none; transform: scale(1); box-shadow: 0 0 40px rgba(217, 70, 239, 0.2); }
@keyframes hologram { 0% { opacity: 0.6; } 50% { opacity: 0.9; } 100% { opacity: 0.6; } }

/* Controls */
.controls { display: flex; gap: 20px; margin-top: 10px; }
button { 
    padding: 18px 45px; border-radius: 16px; 
    font-weight: 700; cursor: pointer; border: none; font-size: 1rem; 
    display: flex; align-items: center; gap: 10px; 
    text-transform: uppercase; letter-spacing: 1px;
    transition: 0.3s;
}
.btn-primary { 
    background: linear-gradient(135deg, var(--primary), var(--accent)); 
    color: white; 
    box-shadow: 0 10px 40px -10px var(--primary); 
}
.btn-primary:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -10px var(--primary); }

.btn-secondary { 
    background: rgba(255,255,255,0.05); 
    color: white; 
    border: 1px solid rgba(255,255,255,0.1); 
    text-decoration: none;
    display: flex; align-items: center; gap: 10px;
    padding: 18px 45px; border-radius: 16px; font-weight: 700;
}
.btn-secondary:hover:not(.disabled) { background: rgba(255,255,255,0.1); border-color: white; }
.btn-secondary.disabled { opacity: 0.3; pointer-events: none; }

.btn-reset { background: transparent; color: #64748b; }
.btn-reset:hover { color: #fff; }

.loading-overlay { 
    position: absolute; top:0; left:0; width:100%; height:100%; 
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 20; 
}
.spinner { 
    width: 60px; height: 60px; 
    border: 4px solid rgba(255,255,255,0.1); 
    border-top-color: var(--accent); 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- MOBILE FIX --- */
@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .hero-section h1 { font-size: 2.2rem; }
    .upload-zone { height: 200px; }
    .upload-icon { font-size: 2.5rem; }

    .split-view { flex-direction: column; gap: 20px; }
    
    .view-box { width: 100%; min-height: 300px; box-sizing: border-box; }
    .image-wrapper { min-height: 250px; }

    /* Rotate New Bridge Vertical */
    .energy-bridge-container { width: 60px; height: 120px; flex-direction: column; }
    .laser-beam { width: 6px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, var(--cyan), #fff, var(--accent), #fff, var(--cyan)); background-size: 100% 200%; }
    .bridge-icon i { transform: rotate(90deg); } 
    @keyframes flow-energy { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } }

    .controls { flex-direction: column; width: 100%; }
    button, .btn-secondary { width: 100%; justify-content: center; }
}
/* --- High-Speed Animations when Engaged --- */

/* Speed up the laser beam flow */
.energy-bridge-container.active .laser-beam {
    animation: flow-energy 0.2s linear infinite; /* Ultra fast flow */
    filter: brightness(1.5); /* Make it glow brighter */
}

/* Speed up the reactor ring spin */
.energy-bridge-container.active .bridge-icon::before {
    animation: spin-ring 0.5s linear infinite; /* High speed spin */
    border-top-color: #fff; /* Turn ring white hot */
}

/* Make the arrow pulse frantically */
.energy-bridge-container.active .bridge-icon i {
    animation: pulse-arrow 0.2s ease-in-out infinite alternate;
    color: var(--accent); /* Turn arrow magenta */
}

/* ===========================================================================
   LUMINA v2 — extended components (slider, zoom, progress, batch, history,
   crop, adjustments, presets, share, light theme). Extends the holographic
   aesthetic; does not replace it.
   =========================================================================== */

.muted { color: #94a3b8; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.privacy-badge {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; color: var(--cyan);
    background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3);
    padding: 6px 14px; border-radius: 20px; backdrop-filter: blur(5px);
}
.icon-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    color: var(--text); width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; font-size: 1rem; transition: 0.25s;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); border-color: var(--primary); }

/* ---- Upload stage + URL import ---- */
.upload-stage { width: 100%; max-width: 700px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.url-import {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 8px 8px 8px 18px; backdrop-filter: blur(8px);
}
.url-import i { color: var(--cyan); }
.url-import input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text); font-family: 'Outfit', sans-serif; font-size: 0.95rem;
}
.btn-mini {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; border: none; padding: 10px 20px; border-radius: 12px;
    font-weight: 700; cursor: pointer; font-size: 0.85rem; letter-spacing: 0.5px;
    text-transform: uppercase; transition: 0.25s; white-space: nowrap;
}
.btn-mini:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px var(--primary); }
.btn-mini.ghost { background: transparent; border: 1px solid var(--glass-border); color: var(--text); }

/* ---- Toolbar: presets + view modes ---- */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between;
    width: 100%; max-width: 1200px; padding: 14px 20px; box-sizing: border-box;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 18px; backdrop-filter: blur(10px);
}
.toolbar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: #64748b; }
.chip {
    background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
    color: var(--text); padding: 9px 16px; border-radius: 12px; cursor: pointer;
    font-size: 0.85rem; font-weight: 500; transition: 0.2s; display: inline-flex;
    align-items: center; gap: 7px; font-family: 'Outfit', sans-serif;
}
.chip:hover { border-color: var(--primary); }
.chip.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent; color: #fff; box-shadow: 0 6px 20px -8px var(--primary);
}
.view-mode { width: 100%; display: flex; justify-content: center; }

/* ---- Slider compare ---- */
.compare {
    position: relative; width: 100%; max-width: 900px; margin: 0 auto;
    border-radius: 16px; overflow: hidden; user-select: none; background: #000;
    aspect-ratio: 16 / 10; touch-action: none;
}
.compare-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.compare-clip { position: absolute; top: 0; left: 0; height: 100%; width: 50%; overflow: hidden; }
.compare-clip .compare-input { width: 900px; max-width: none; }
.compare-handle {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 4px; height: 100%; background: linear-gradient(var(--cyan), var(--accent));
    cursor: ew-resize; box-shadow: 0 0 18px var(--accent); z-index: 5;
}
.compare-handle i {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 44px; height: 44px; border-radius: 50%; background: #0f172a;
    border: 2px solid var(--cyan); display: flex; align-items: center;
    justify-content: center; color: #fff; box-shadow: 0 0 20px var(--cyan);
}

/* ---- Zoom & pan ---- */
.zoom-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.zoom-hint { font-size: 0.8rem; color: #64748b; margin-left: auto; }
.zoom-stage {
    position: relative; width: 100%; height: 480px; overflow: hidden;
    background: #000; border-radius: 16px; cursor: grab;
    border: 1px solid rgba(255,255,255,0.05);
}
.zoom-stage.grabbing { cursor: grabbing; }
.zoom-stage img {
    position: absolute; top: 50%; left: 50%; max-width: none;
    transform-origin: center; transition: transform 0.05s linear; will-change: transform;
}

/* ---- Progress panel ---- */
.progress-panel { width: 100%; max-width: 1200px; }
.progress-steps { display: flex; justify-content: space-between; margin-bottom: 12px; gap: 6px; }
.progress-steps .step {
    flex: 1; text-align: center; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 1px; color: #475569; padding: 6px 4px; border-radius: 8px;
    transition: 0.3s; border: 1px solid transparent;
}
.progress-steps .step.active { color: #fff; background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.4); }
.progress-steps .step.complete { color: var(--cyan); }
.progress-track { height: 10px; background: rgba(255,255,255,0.06); border-radius: 10px; overflow: hidden; }
.progress-fill {
    height: 100%; width: 0%; border-radius: 10px;
    background: linear-gradient(90deg, var(--cyan), var(--primary), var(--accent));
    background-size: 200% 100%; animation: flow-energy 2s linear infinite;
    transition: width 0.4s ease;
}
.progress-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.85rem; color: #94a3b8; }
#progressEta { color: var(--cyan); font-weight: 700; }

/* ---- Metadata panel ---- */
.meta-panel {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center;
    width: 100%; max-width: 900px; padding: 18px 28px; box-sizing: border-box;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 18px; backdrop-filter: blur(10px);
}
.meta-col { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.meta-head { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.5px; color: #64748b; }
.meta-val { font-size: 1.3rem; font-weight: 800; }
.meta-sub { font-size: 0.78rem; color: #94a3b8; }
.meta-arrow { color: var(--accent); font-size: 1.2rem; }
.meta-time .meta-val { color: var(--cyan); }

/* ---- Adjustments ---- */
.adjust-panel {
    width: 100%; max-width: 900px; background: var(--glass);
    border: 1px solid var(--glass-border); border-radius: 18px; backdrop-filter: blur(10px);
    overflow: hidden;
}
.adjust-head {
    display: flex; align-items: center; gap: 10px; padding: 16px 24px;
    cursor: pointer; font-weight: 700; user-select: none;
}
.adjust-caret { margin-left: auto; transition: 0.3s; }
.adjust-panel.open .adjust-caret { transform: rotate(180deg); }
.adjust-body { display: none; padding: 0 24px 22px; gap: 18px; flex-direction: column; }
.adjust-panel.open .adjust-body { display: flex; }
.adjust-body label { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: #cbd5e1; }
.adjust-body label span { color: var(--cyan); font-weight: 700; }
.adjust-body input[type="range"] { -webkit-appearance: none; height: 6px; border-radius: 6px; background: rgba(255,255,255,0.1); outline: none; }
.adjust-body input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent)); cursor: pointer;
    box-shadow: 0 0 12px var(--primary);
}

/* ---- Error overlay ---- */
.error-overlay {
    position: absolute; inset: 0; background: rgba(2,6,23,0.92); backdrop-filter: blur(8px);
    display: none; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 24px; z-index: 25;
}
.error-overlay.show { display: flex; }
.error-illustration {
    width: 90px; height: 90px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 2.4rem; margin-bottom: 18px;
    background: rgba(239,68,68,0.12); color: #f87171; border: 2px solid rgba(239,68,68,0.4);
}
.error-overlay h3 { margin: 0 0 8px; }

/* ---- Batch queue ---- */
.batch-panel {
    width: 100%; max-width: 700px; margin-top: 24px; background: var(--glass);
    border: 1px solid var(--glass-border); border-radius: 18px; backdrop-filter: blur(10px); overflow: hidden;
}
.batch-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--glass-border); font-weight: 700; }
.batch-list { display: flex; flex-direction: column; }
.batch-item { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.batch-item:last-child { border-bottom: none; }
.batch-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #000; }
.batch-info { flex: 1; min-width: 0; }
.batch-name { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-status { font-size: 0.74rem; color: #94a3b8; }
.batch-status.done { color: #10b981; }
.batch-status.error { color: #f87171; }
.batch-status.processing { color: var(--cyan); }

/* ---- History drawer ---- */
.drawer {
    position: fixed; top: 0; right: -380px; width: 360px; height: 100%; z-index: 200;
    background: rgba(2,6,23,0.96); backdrop-filter: blur(16px); border-left: 1px solid var(--glass-border);
    display: flex; flex-direction: column; transition: right 0.35s ease;
}
.drawer.open { right: 0; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px; border-bottom: 1px solid var(--glass-border); font-weight: 700; }
.drawer-head > div { display: flex; align-items: center; gap: 8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { text-align: center; padding: 14px; font-size: 0.75rem; }
.history-item { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px; cursor: pointer; transition: 0.2s; }
.history-item:hover { border-color: var(--primary); transform: translateX(-3px); }
.history-item img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #000; }
.history-meta { font-size: 0.78rem; color: #94a3b8; }
.history-meta strong { display: block; color: var(--text); font-size: 0.85rem; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; opacity: 0; pointer-events: none; transition: 0.35s; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }

/* ---- Crop modal ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.show { display: flex; }
.modal-card { background: rgba(15,23,42,0.97); border: 1px solid var(--glass-border); border-radius: 22px; padding: 28px; max-width: 640px; width: 100%; box-shadow: 0 30px 80px -20px #000; }
.modal-card h3 { margin: 0 0 6px; }
.crop-stage { position: relative; margin: 18px 0; display: inline-block; max-width: 100%; line-height: 0; border-radius: 12px; overflow: hidden; background: #000; }
.crop-stage canvas { max-width: 100%; display: block; cursor: crosshair; }
.crop-box { position: absolute; border: 2px dashed var(--cyan); background: rgba(6,182,212,0.12); display: none; pointer-events: none; }
.modal-actions { display: flex; gap: 14px; justify-content: flex-end; }
.modal-actions .btn-primary, .modal-actions .btn-secondary { padding: 14px 28px; }

/* ---- Share toast ---- */
.share-toast {
    position: fixed; bottom: -120px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px; z-index: 250;
    background: rgba(15,23,42,0.98); border: 1px solid var(--primary);
    padding: 12px 14px; border-radius: 16px; box-shadow: 0 20px 60px -10px var(--primary);
    transition: bottom 0.4s ease; max-width: 92vw;
}
.share-toast.show { bottom: 30px; }
.share-toast i.fa-link { color: var(--cyan); }
.share-toast input { background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-radius: 10px; padding: 10px 14px; color: var(--text); width: 320px; max-width: 50vw; font-family: 'Courier New', monospace; font-size: 0.82rem; }

/* ---- Share page card ---- */
.share-card { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; max-width: 800px; }
.meta-row { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; color: #94a3b8; font-size: 0.9rem; }
.meta-row i { color: var(--cyan); margin-right: 6px; }
.privacy-line { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.privacy-line i { color: var(--cyan); }
a.logo { text-decoration: none; color: var(--text); }

/* ===========================================================================
   LIGHT THEME — overrides only. Holographic structure unchanged.
   =========================================================================== */
html[data-theme="light"] {
    --glass: rgba(255,255,255,0.72);
    --glass-border: rgba(15,23,42,0.1);
    --text: #0f172a;
}
html[data-theme="light"] body {
    background-color: #eef2ff; color: var(--text);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99,102,241,0.18) 0%, transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(217,70,239,0.15) 0%, transparent 30%);
}
html[data-theme="light"] .hero-section h1 { background: linear-gradient(to right, #1e293b, #6366f1); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .hero-section p { color: #475569; }
html[data-theme="light"] .upload-text p,
html[data-theme="light"] .muted,
html[data-theme="light"] .meta-sub,
html[data-theme="light"] .batch-status { color: #475569; }
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .chip { background: rgba(15,23,42,0.04); }
html[data-theme="light"] .image-wrapper,
html[data-theme="light"] .compare,
html[data-theme="light"] .zoom-stage { background: #0f172a; }
html[data-theme="light"] .drawer,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .share-toast { background: rgba(255,255,255,0.98); }
html[data-theme="light"] .error-overlay { background: rgba(241,245,249,0.94); }
html[data-theme="light"] .error-overlay h3 { color: #0f172a; }