

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.preview-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: var(--gray-900, #111111);
    border: 1px solid var(--accent, #F97316);
    border-radius: var(--radius-sm, 4px);
    color: var(--accent, #F97316);
    font-size: 30px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    font-weight: 300;
}

.preview-close:hover {
    background: var(--orange-dim, rgba(249, 115, 22, 0.15));
    transform: rotate(90deg);
}

.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#preview-modal-canvas {
    cursor: grab;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: absolute;
    transition: width 0.15s ease-out, height 0.15s ease-out, left 0.15s ease-out, top 0.15s ease-out;
}

#preview-modal-canvas:active {
    cursor: grabbing;
}

.preview-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid var(--border-strong, #252525);
    border-radius: var(--radius-md, 8px);
    padding: 12px 24px;
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

#zoom-level {
    color: var(--accent, #F97316);
    font-weight: bold;
    font-size: 18px;
    min-width: 60px;
    text-align: center;
}

.preview-hint {
    color: var(--muted, #777777);
    font-size: 12px;
    white-space: nowrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.preview-modal {
    animation: fadeIn 0.2s ease;
}
