/* ==========================================================================
   535 DESIGN — UPSCALER IA & SUPER-RESOLUÇÃO DE OFICINA
   Design System: #22212e | #1c1b26 | #282637 | #f07d00 | Asap Condensed
   ========================================================================== */

/* Tipografia Técnica & Kerning Respirado para Títulos */
.font-asap-condensed,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Asap Condensed', sans-serif !important;
    letter-spacing: 0.035em !important;
}

/* Blueprint Technical Grid (Milimétrica de Oficina) */
.blueprint-grid {
    background-color: #171620;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(240, 125, 0, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 125, 0, 0.08) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
    background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}

/* Custom Range Sliders */
input[type="range"].range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #15141e;
    border-radius: 9999px;
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

input[type="range"].range-slider:hover {
    border-color: rgba(240, 125, 0, 0.4);
}

input[type="range"].range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f07d00;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(240, 125, 0, 0.6);
    border: 2px solid #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"].range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(240, 125, 0, 0.85);
}

input[type="range"].range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f07d00;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(240, 125, 0, 0.6);
    border: 2px solid #ffffff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Split Slider (Antes vs Depois) */
.split-slider-wrapper {
    position: relative;
    overflow: hidden;
    user-select: none;
}

#canvas-upscaled {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.split-slider-before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
    clip-path: inset(0 calc(100% - 50%) 0 0);
    border-right: none;
    pointer-events: none;
}

.split-slider-before canvas,
#canvas-original {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
    object-fit: contain !important;
}

.split-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f07d00;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    box-shadow: 0 0 20px rgba(240, 125, 0, 0.8), 0 0 0 3px rgba(255, 255, 255, 0.9);
    z-index: 25;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.split-slider-handle::before,
.split-slider-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: #f07d00;
    box-shadow: 0 0 8px rgba(240, 125, 0, 0.8);
    pointer-events: auto;
    cursor: ew-resize;
}

.split-slider-handle::before {
    bottom: 100%;
    height: 1000px;
}

.split-slider-handle::after {
    top: 100%;
    height: 1000px;
}

.split-slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 25px rgba(240, 125, 0, 1), 0 0 0 4px #ffffff;
}

/* Badges de Comparação Antes / Depois */
.badge-before {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 15;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.badge-after {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    background: rgba(240, 125, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

/* Estilo de pixelização para o original quando ampliado */
.pixelated-render {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Animações e Transições */
.modal-enter {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Glow e Sombras de Oficina */
.glow-orange {
    box-shadow: 0 0 30px rgba(240, 125, 0, 0.25);
}

.glow-green {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
}
