:root {
    --bg: #0d0d0f;
    --panel: #17171b;
    --accent: #5b9cf6;
    --text: #e8e8ed;
    --border: #2a2a35;

    /* Easing */
    --ease-out: 200ms ease-out;
    --ease-in: 250ms ease-in;
    --spring: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --fast: 80ms ease;
    --hover: 180ms ease;

    /* Filter vars */
    --exp: 1;
    --bri: 100;
    --con: 100;
    --sat: 100;
    --warm-c: #ff8c00;
    --warm-o: 0;
    --tint-c: #ff00ff;
    --tint-o: 0;
    --vig-o: 0;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Hlavní layout */
.editor-layout {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: row;
}

/* Obrazová část */
.preview-area {
    flex: 1;
    background: #000;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-wrapper {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    will-change: filter, opacity;
    /* SVG filtr vkládáme sem, odděleně od ostatních CSS filtrů pro podporu Firefoxu */
    filter: url(#sharpness);
    transition: filter 0.1s ease-out, opacity 250ms ease;
}

.image-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Drop Zone */
.dropzone {
    position: absolute;
    inset: 20px;
    background: #17171b;
    border: 2px dashed #2a2a35;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    transition: all 200ms ease;
    opacity: 0;
    pointer-events: none;
}

.dropzone.active {
    opacity: 1;
    pointer-events: all;
}

.dropzone:hover {
    border-color: #5b9cf6;
}

.dropzone.drag-over {
    background: #1e1e24;
    border-color: #5b9cf6;
}

.dropzone-icon {
    margin-bottom: 16px;
    transition: transform 150ms ease-out;
}

.dropzone.drag-over .dropzone-icon {
    transform: translateY(4px);
}

.dropzone-text.primary {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.dropzone-text.secondary {
    color: #9898a6;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.dropzone-btn {
    border: 1px solid #2a2a35;
    color: #e8e8ed;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease;
}

.dropzone-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.05);
}

#image-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    will-change: filter, transform;
    filter: brightness(calc(var(--exp) * (var(--bri) / 100))) contrast(calc(var(--con) * 1%)) saturate(calc(var(--sat) * 1%));
    transition: filter 0.1s ease-out;
}

/* Vrstvy */
.overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

#warmth-layer {
    background-color: var(--warm-c);
    opacity: var(--warm-o);
}

#tint-layer {
    background-color: var(--tint-c);
    opacity: var(--tint-o);
}

#vignette-layer {
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, var(--vig-o)) 100%);
    mix-blend-mode: multiply;
}

/* Ořezový nástroj */
#crop-overlay {
    position: absolute;
    inset: 0;
    cursor: crosshair;
    display: none;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
}

#crop-box {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: none;
    cursor: move;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    /* Výplň okolo ořezu */
}

#crop-box.animating {
    transition: all var(--spring);
}

/* Pravidlo třetin */
#crop-box::before,
#crop-box::after {
    content: '';
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

#crop-box::before {
    top: 33.33%;
    bottom: 33.33%;
    left: 0;
    right: 0;
    border-left: none;
    border-right: none;
}

#crop-box::after {
    left: 33.33%;
    right: 33.33%;
    top: 0;
    bottom: 0;
    border-top: none;
    border-bottom: none;
}

/* Crop handles pro snazší resize */
.crop-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    /* Centrování na souřadnici */
    transition: all 150ms ease;
    border: none;
}

.crop-handle:hover {
    width: 12px;
    height: 12px;
}

.crop-handle.active-drag {
    width: 14px;
    height: 14px;
    box-shadow: 0 0 0 4px rgba(91, 156, 246, 0.4);
}

.crop-handle.nw {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}

.crop-handle.n {
    top: 0;
    left: 50%;
    cursor: ns-resize;
}

.crop-handle.ne {
    top: 0;
    left: 100%;
    cursor: nesw-resize;
}

.crop-handle.w {
    top: 50%;
    left: 0;
    cursor: ew-resize;
}

.crop-handle.e {
    top: 50%;
    left: 100%;
    cursor: ew-resize;
}

.crop-handle.sw {
    top: 100%;
    left: 0;
    cursor: nesw-resize;
}

.crop-handle.s {
    top: 100%;
    left: 50%;
    cursor: ns-resize;
}

.crop-handle.se {
    top: 100%;
    left: 100%;
    cursor: nwse-resize;
}

/* Crop Toolbar */
#crop-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(23, 23, 27, 0.9);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(10px);
    z-index: 11;
}

.aspect-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.aspect-btn {
    background: #09090b;
    border: 1px solid transparent;
    color: #a1a1aa;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.aspect-btn:hover {
    color: #fff;
}

.aspect-btn.active {
    color: #fff;
    background: var(--accent);
}

.straighten-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
}

.straighten-bar input {
    width: 120px;
}

/* End Duplicate Handle Removal */

/* Crop Toolbar - V4 Redesign */
#crop-toolbar {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: none;
}

#crop-toolbar.crop-toolbar-v4 {
    /* Resetting from old absolute overlay */
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
}

.aspect-bar {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.aspect-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #a1a1aa;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    flex: 1;
    text-align: center;
}

.aspect-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.aspect-btn.active {
    color: #fff;
    background: var(--accent);
}

.straighten-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #a1a1aa;
}

.straighten-track-wrap {
    flex: 1;
}

.straighten-bar input[type="range"] {
    width: 100%;
}

/* Pravý panel */
.controls {
    width: 356px;
    background: var(--panel);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    transition: opacity 300ms ease, filter 300ms ease;
}

.controls.disabled-state {
    opacity: 0.4;
    filter: grayscale(100%);
    pointer-events: none;
    user-select: none;
}

@media (min-width: 2560px) {
    .controls {
        width: 400px;
    }
}

/* Hlavička s tlačítky (Zone 1) */
.zone-toolbar {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.zone-toolbar .btn {
    flex: 1;
    padding: 8px 4px;
    font-size: 0.8rem;
}

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: #a1a1aa;
    box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    box-shadow: none;
}

.btn-toggle {
    background: #1e1e24;
    border: 1px solid var(--border);
    color: #fff;
}

.undo-redo-group {
    display: flex;
    gap: 4px;
    flex: 1;
}

.btn {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.btn:active:not(:disabled) {
    transform: translateY(0px);
    transition: all var(--fast);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 2px 4px rgba(91, 156, 246, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: #73abf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(91, 156, 246, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: none;
    background: #4a8deb;
    transition: all var(--fast);
}

.btn-success {
    background: #3ecf8e !important;
    color: #000 !important;
    transition: background 200ms ease;
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: transparent;
}

.btn-icon {
    flex: none;
    width: 40px;
    font-size: 1.1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-hold:active {
    background: var(--accent);
}

/* Obsah panelu a Tab Switcher */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 10px 0;
    position: relative;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 200ms ease;
    padding: 6px 10px;
    border-radius: 4px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #fff;
    background: transparent;
    border-color: transparent;
}

.tab-btn.active {
    color: #fff;
    background: #1e1e24;
    /* Zvýraznění aktivního backgroundu */
}

/* Sliding active indicator */
.tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    transition: transform 200ms ease, width 200ms ease;
    pointer-events: none;
}

.controls-scroll {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tool-panel {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.tool-panel.active {
    display: flex;
}

/* Histogram */
.histogram-container {
    height: 80px;
    background: #09090b;
    border-radius: 8px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

#histogram {
    width: 100%;
    height: 100%;
}

/* Slidery (Zone 3) */
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.slider-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.slider-group-title {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #9898a6;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.control-group {
    display: flex;
    flex-direction: column;
    height: 56px;
    justify-content: center;
    position: relative;
}

.label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #a1a1aa;
    align-items: center;
    font-weight: 500;
    margin-bottom: 4px;
}

.val-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
    position: relative;
}

.editable-val {
    cursor: pointer;
    transition: color 0.2s;
}

.editable-val:hover {
    color: #fff;
}

.inline-edit-input {
    width: 45px;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    font-variant-numeric: tabular-nums;
    text-align: right;
    outline: none;
    padding: 0;
    margin: 0;
    font-weight: 600;
}

/* Hide number arrows */
.inline-edit-input::-webkit-outer-spin-button,
.inline-edit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.inline-edit-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.reset-icon {
    opacity: 0;
    cursor: pointer;
    font-size: 1rem;
    color: #71717a;
    transition: all 0.2s;
    padding: 0;
    position: absolute;
    right: -20px;
}

.control-group:hover .reset-icon {
    opacity: 1;
}

.reset-icon:hover {
    color: #f87171;
    transform: rotate(-45deg);
}

.track-wrap {
    position: relative;
}

.range-labels {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #4a4a58;
    pointer-events: none;
}

/* Vzhled input range */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    background: #2a2a35;
    border-radius: 2px;
    outline: none;
    margin-top: 4px;
    position: relative;
    cursor: ew-resize;
    transition: height 0.1s;
}

input[type="range"]:hover {
    height: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: ew-resize;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: width var(--ease-out), height var(--ease-out), box-shadow var(--ease-out);
    margin-top: -5px;
    /* Vycentrovat vůči tracku */
}

input[type="range"]::-webkit-slider-thumb:hover {
    width: 18px;
    height: 18px;
    margin-top: -7px;
}

input[type="range"]:active::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
    margin-top: -9px;
    box-shadow: 0 0 0 4px rgba(91, 156, 246, 0.4);
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #2a2a35;
    border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    background: #fff;
    cursor: ew-resize;
    transition: width var(--ease-out), height var(--ease-out), box-shadow var(--ease-out);
}

input[type="range"]::-moz-range-thumb:hover {
    width: 18px;
    height: 18px;
}

input[type="range"]:active::-moz-range-thumb {
    width: 22px;
    height: 22px;
    box-shadow: 0 0 0 4px rgba(91, 156, 246, 0.4);
}

/* Tooltip pro hodnotu slideru */
.control-group {
    position: relative;
}

.slider-tooltip {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms ease-out;
    transition-delay: 0ms;
}

.control-group.dragging .slider-tooltip {
    opacity: 1;
    transition-delay: 150ms;
    /* Neukazovat hned */
}

#hidden-canvas {
    display: none;
}



/* Responzivní design */
@media (max-width: 768px) {
    .editor-layout {
        flex-direction: column;
    }

    .controls {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
        height: 50%;
    }

    .preview-area {
        height: 50%;
    }
}

/* Zone 4: Sticky Footer */
.zone-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel);
}

.btn-danger {
    color: #f87171;
}

.btn-danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

.btn-emerald {
    background: #3ecf8e;
    color: #000;
    border: none;
    font-weight: 600;
}

.btn-emerald:hover:not(:disabled) {
    background: #4ade80;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(62, 207, 142, 0.3);
}

.btn-emerald:active:not(:disabled) {
    transform: translateY(0px);
    background: #2db276;
    box-shadow: none;
}

.btn-emerald:disabled {
    opacity: 0.4;
    background: #3ecf8e;
    /* keep color but faded */
    color: #000;
}

.undo-redo-compact {
    display: flex;
    gap: 4px;
}

.btn-icon-small {
    background: transparent;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-small:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-icon-small:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Skeleton Loader */
.skeleton * {
    color: transparent !important;
    background: #2a2a35 !important;
    border-color: #2a2a35 !important;
    box-shadow: none !important;
    pointer-events: none !important;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.fab-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #17171b;
    border: 1px solid #2a2a35;
    color: #9898a6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 180ms ease;
    padding: 0;
}

.fab-btn:hover {
    border-color: #5b9cf6;
    color: #e8e8ed;
}

/* Modals Overlay */
.fab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-in;
}

.fab-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.fab-panel {
    background: #17171b;
    border: 1px solid #2a2a35;
    border-radius: 12px;
    padding: 20px;
    max-width: 280px;
    width: 100%;
    display: none;
    transform: translateY(8px);
    opacity: 0;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    bottom: 60px;
    /* 16px bottom + 36px button + 8px gap */
    left: 16px;
}

.fab-panel.active {
    display: block;
}

.fab-panel.show {
    transform: translateY(0);
    opacity: 1;
}

.fab-panel-title {
    font-size: 14px;
    color: #e8e8ed;
    font-weight: 600;
    margin-bottom: 8px;
}

.fab-panel-text {
    font-size: 12px;
    color: #9898a6;
    line-height: 1.6;
    margin-bottom: 16px;
}

.fab-panel-text:last-child {
    margin-bottom: 0;
}

.donate-buttons {
    display: flex;
    gap: 8px;
    width: 100%;
}

.donate-btn {
    flex: 1;
    height: 32px;
    background: #1e1e24;
    border: 1px solid #2a2a35;
    color: #e8e8ed;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-btn:hover {
    border-color: #5b9cf6;
    background: rgba(91, 156, 246, 0.1);
}

.donate-thanks-text {
    font-size: 13px;
    color: #e8e8ed;
    text-align: center;
    margin-bottom: 16px;
}

.donate-close-btn {
    width: 100%;
    height: 32px;
    background: transparent;
    border: 1px solid #2a2a35;
    color: #e8e8ed;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 180ms ease;
}

.donate-close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Toast Notification */
#toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: #17171b;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    opacity: 1;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

#toast-notification.toast-hidden {
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    pointer-events: none;
}

#toast-notification.toast-fade-out {
    opacity: 0;
    transition: opacity 250ms ease-in;
}

.toast-icon {
    font-size: 13px;
    color: #3ecf8e;
    font-weight: bold;
}

.toast-text-left {
    font-size: 13px;
    color: #9898a6;
}

.toast-sep {
    font-size: 13px;
    color: #2a2a35;
}

.toast-text-right {
    font-size: 13px;
    color: #5b9cf6;
    cursor: pointer;
    transition: color 150ms ease;
}

.toast-text-right:hover {
    color: #7ab3f8;
    text-decoration: underline;
}

.toast-close {
    font-size: 16px;
    color: #4a4a58;
    cursor: pointer;
    margin-left: 4px;
    transition: color 150ms ease;
    line-height: 1;
}

.toast-close:hover {
    color: #9898a6;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 15, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 200ms ease;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #2a2a35;
    border-top-color: #5b9cf6;
    border-radius: 50%;
    animation: spinner-rotate 700ms linear infinite;
    margin-bottom: 12px;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 12px;
    color: #9898a6;
}