:root {
    --bg-color: #F8F8F8;
    --primary-blue: #3284FF;
    --primary-blue-dark: #217AFF;
    --text-dark: #424242;
    --text-gray: #767676;
    --text-light-gray: #AFAFAF;
    --border-light: #E2E2E2;
    --border-active: #3284FF;

    --grad-btn-border: linear-gradient(180deg, #EBEBEB 0%, #767676 110.87%);
    --grad-btn-bg: linear-gradient(180deg, #A0C5FF -30.07%, #8FBDF1 133.78%);
    --grad-btn-bg-real: linear-gradient(180deg, #4FA4FF -30.07%, #2D8BFF 133.78%);
    /* Adjusted to look blue */

    font-family: 'Manrope', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

:focus-visible {
    outline: 2px solid #3284FF;
    outline-offset: 2px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-family: 'Manrope', system-ui, sans-serif;
}

/* Base utilities & backgrounds */
.bg-blur {
    position: absolute;
    width: 369px;
    height: 345px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
}

.blur-cyan {
    background-color: #00A7AE;
    opacity: 0.05;
    bottom: 20%;
    right: 0;
}

.blur-blue {
    background-color: #3E8BFF;
    opacity: 0.08;
    left: -5%;
    top: 50%;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    overflow-x: clip;
}

.container {
    max-width: 1512px;
    width: 100%;
    padding-left: 48px;
    padding-right: 48px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 68px;
    transition: opacity 0.26s ease;
}

.container.bm-lg {
    margin-bottom: 98px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1512px;
    width: 100%;
    padding-left: 48px;
    padding-right: 48px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 32px;
    margin-bottom: 68px;
    box-sizing: border-box;
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links-group {
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background:
        linear-gradient(in oklab 180deg, oklab(97% -0.003 -0.014) -56.46%, oklab(94.4% -0.007 -0.026) 157.24%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 200ms ease;
}

.logo-icon:hover {
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.5);
}

.logo-icon:active {
    transform: scale(0.96);
}

#menu-lottie {
    width: 22px;
    height: 22px;
    display: block;
}

/* Nav menu panel */
.nav-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 48px;
    width: 448px;
    border-radius: 32px;
    border: 1px solid #9EC5FF;
    background: radial-gradient(ellipse at 50% 78%, #E9F3FF 0%, #ffffff 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-menu.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Nav menu inner content ─────────────────────────────── */
.nav-menu-header img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.nav-menu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 24px 24px 8px;
    color: #3586FF;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 24px 24px;
}

.nav-menu-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.nav-menu-card:not(.disabled):hover {
    background-color: #ECF2FB;
}

.nav-menu-card:not(.disabled):hover .nav-menu-card-title {
    color: #2F82FF;
}

.nav-menu-card.disabled {
    cursor: default;
}

.nav-menu-card.disabled:hover {
    background-color: #ECF2FB;
}

.nav-menu-card.disabled:hover .nav-menu-card-title {
    color: #2F82FF;
}

.nav-menu-card-thumb {
    width: 100%;
    border-radius: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.nav-menu-card-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

.nav-menu-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-menu-card-title {
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #637BA2;
    line-height: 16px;
    transition: color 0.15s ease;
}

.nav-menu-card-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-menu-card-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 4px;
    border-radius: 9999px;
    border: 1px solid #BBD6FF;
    background-color: #E1EDFF;
    box-shadow: #FFFFFFAD 0px 0px 14px inset;
    color: #698ABE;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 9px;
    font-weight: 500;
}

.nav-coming-soon {
    display: none;
}

.nav-menu-card-tag--soon {
    border-color: #A8DEDE;
    background-color: #DAFAFF;
    box-shadow: #FFFFFFAD 0px 0px 14px inset;
    color: #3A9898;
}

.nav-menu-card-tag--soon-pink {
    border-color: #F2B8D8;
    background-color: #FDE8F3;
    box-shadow: #FFFFFFAD 0px 0px 14px inset;
    color: #C4578A;
}

.nav-upgrade-card {
    background: linear-gradient(123deg, #1A4B8F 20%, #2B8FE0 50%, #1FA89A 80%);
    border-radius: 17px;
    padding: 1px;
}

.nav-upgrade-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    min-height: 120px;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    overflow: hidden;
}

.nav-upgrade-bg {
    position: absolute;
    top: -5px;
    left: -13px;
    width: 186px;
    height: 130px;
    border-radius: 13px;
    background: linear-gradient(#45A5FB40, #EDF4FF63);
    opacity: 0.55;
}

.nav-upgrade-title {
    position: relative;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #067AF0;
    text-align: center;
    line-height: 18px;
}

.nav-upgrade-btn {
    position: relative;
    width: 100%;
    padding: 10px 26px;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(180deg, #1a1a2e -30%, #111827 134%);
    box-shadow: #FFFFFF66 0px 0px 20px inset;
    color: #ffffff;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.logo-icon .row {
    display: flex;
    gap: 4px;
}

.logo-icon .dot {
    width: 6px;
    height: 6px;
    background-color: #3586FF;
    border-radius: 999px;
}

.nav-link {
    text-decoration: none;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 14px;
    line-height: 18px;
    color: #9B9B9B;
    font-weight: 500;
}

.center-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-compress-header {
    background:
        linear-gradient(in oklab 180deg, oklab(97% -0.003 -0.014) -0.03%, oklab(94.4% -0.007 -0.026) 100.01%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-blue);
    cursor: pointer;
    box-shadow: none;
    transition: all 200ms ease;
}

.btn-compress-header:hover {
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.5);
}

.btn-compress-header:active {
    transform: scale(0.98);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.username {
    font-size: 14px;
    color: #424242;
    font-weight: 500;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Main Content */
.main-content {
    display: flex;
    justify-content: space-between;
    gap: 153px;
    width: 100%;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 520px;
}

.file-name {
    font-size: 40px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-dark);
    word-break: break-all;
}

.editable-name {
    outline: none;
    border-bottom: 2px dashed transparent;
    transition: border-bottom-color 0.2s;
    cursor: text;
}

.editable-name:hover,
.editable-name:focus {
    border-bottom-color: var(--primary-blue);
}

.file-extension-static {
    color: var(--text-gray);
}

.upload-header {
    display: none;
}

.upload-area-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #F7FAFF;
    border: 2px dashed #ABC3E9;
    border-radius: 30px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.upload-area-right:hover {
    background-color: #F0F6FF;
    border: 2px solid #488FFF;
}

.upload-icon-wrapper {
    width: 76px;
    height: 76px;
    background:
        linear-gradient(in oklab 180deg, oklab(97% -0.003 -0.014) -56.46%, oklab(94.4% -0.007 -0.026) 157.24%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
    color: #3284FF;
}

.upload-icon-wrapper svg path {
    transition: stroke 0.2s ease;
}

.upload-area-right:hover .upload-icon-wrapper {
    background: linear-gradient(0deg, #217AFF 0%, #66A1FF 100%);
    border: 1px solid transparent;
    border-radius: 999px;
}

.upload-area-right:hover .upload-icon-wrapper svg path {
    stroke: #FFFFFF;
}

.upload-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.upload-text {
    font-family: inherit;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    color: #A9A9A9;
    transition: color 0.2s ease;
}

.upload-subtext {
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 14px;
    color: #C4C4C4;
    font-weight: 500;
    transition: color 0.2s ease;
}

.upload-area-right:hover .upload-text {
    color: #217AFF;
}

.upload-area-right:hover .upload-subtext {
    color: #A6B7D0;
}

/* Controls */
.controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.config-controls {
    display: flex;
    flex-direction: column;
    gap: 48px;
    /* Gap between controls and the bottom footer */
    transition: opacity 0.3s ease;
}

.config-controls.idle-state {
    opacity: 0.5;
    pointer-events: none;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.png-convert-note {
    font-size: 12px;
    color: #8a97a8;
    padding: 0 12px;
    margin: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease;
}

.png-convert-note.visible {
    opacity: 1;
    max-height: 40px;
}

.control-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
}

.control-header.split {
    justify-content: space-between;
}

.control-header .left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.right-icon-toggle {
    display: flex;
    align-items: center;
    height: 15px;
}

.toggle-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    cursor: pointer;
    background-color: rgba(217, 217, 217, 0.5);
    /* inactive bg */
    transition: background-color 0.2s;
}

.toggle-icon:first-child {
    padding: 4px 3px 4px 4px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.toggle-icon:last-child {
    padding: 4px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.toggle-icon.active {
    background-color: #D9D9D9;
}

.segmented-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 16px 20px;
    gap: 6px;
}

.segment {
    flex: 1;
    background:
        linear-gradient(in oklab 180deg, oklab(100% 0 0) -56.46%, oklab(93.7% 0 0) 157.24%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92.2% 0 0) 0%, oklab(77% 0 0) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #484848;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0);
    transition: all 200ms ease;
}

.segment.active {
    background:
        linear-gradient(in oklab 180deg, oklab(98.4% -0.002 -0.008) 0%, oklab(96.5% -0.004 -0.016) 100.05%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #3284FF;
}

.segment:hover:not(.active) {
    background:
        linear-gradient(in oklab 180deg, oklab(100% 0 0) -56.46%, oklab(93.7% 0 0) 157.24%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.5);
}

.segment.active svg {
    color: #217AFF;
}

/* Custom Dropdowns */
.custom-dropdown {
    width: 100%;
    position: relative;
    outline: none;
}

.custom-dropdown .dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #E2E2E2;
    border-radius: 999px;
    padding: 16px 20px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    color: #AFAFAF;
}

.custom-dropdown .dropdown-val {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: inherit;
    font-family: "Manrope", system-ui, sans-serif;
}

.custom-dropdown .dropdown-current-text {
    pointer-events: none;
}

.custom-dropdown .chevron {
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

/* Dropdown Hover State */
.custom-dropdown .dropdown-selected:hover {
    border-color: #A2C8FF;
    color: #7D94B8;
}

/* Dropdown Open/Active State */
.custom-dropdown.open .dropdown-selected {
    border-color: #A2C8FF;
    color: #217AFF;
}

.custom-dropdown.open .chevron {
    transform: rotate(180deg);
}

/* Dropdown Options Panel */
.custom-dropdown .dropdown-options {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    border-radius: 24px;
    border: 1px solid #B5C6E0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(249, 250, 253, 0.96) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    z-index: 100;
    flex-direction: column;
}

.custom-dropdown.open .dropdown-options {
    display: flex;
}

/* Dropdown Option Items */
.custom-dropdown .dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #8DA2C0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.custom-dropdown .dropdown-option:hover {
    background-color: #F3F5F9;
}

.custom-dropdown .dropdown-option.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.custom-dropdown .dropdown-option.selected {
    background-color: #f2f7ff;
    color: #5A7AAC;
    font-weight: 600;
}

/* Resolution Toggle */
.resolution-toggle {
    display: flex;
    align-items: center;
    background-color: #eeeeee;
    border-radius: 999px;
    padding: 0;
    width: fit-content;
    position: relative;
    overflow: hidden;
}

.res-pill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #E1EDFF;
    border: 1px solid #BBD6FF;
    box-shadow: inset 0px 0px 14px rgba(255, 255, 255, 0.68);
    border-radius: 999px;
    transition: transform 100ms ease, width 100ms ease;
    pointer-events: none;
    z-index: 0;
}

.res-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    padding: 5px 4px;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 10px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: color 100ms ease;
    background-color: transparent;
    color: #7D94B8;
    border-radius: 999px;
    position: relative;
    z-index: 1;
}

.res-segment.active {
    color: #3284FF;
}


/* Stats Footer */
.stats-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
}

.stats-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text {
    color: #217AFF;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

.sub-text {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 500;
    margin-top: 2px;
}

.stats-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.value-highlight {
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 36px;
    font-weight: 300;
    color: #217AFF;
    line-height: 44px;
}

.value-strikethrough {
    font-size: 18px;
    color: var(--text-gray);
    text-decoration: line-through;
    font-weight: 300;
}

/* Button Primary */
.btn-primary {
    position: relative;
    width: 100%;
    padding: 32px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(in oklab 180deg, oklab(63.1% -0.039 -0.196) -30.07%, oklab(56.3% -0.038 -0.238) 133.78%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(46.5% -0.032 -0.193) 110.87%) border-box;
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-color: rgba(0, 102, 255, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 0.5;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Slide sweep animation overlay */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
}

.btn-primary.btn-sliding::after {
    animation: btn-slide-sweep 600ms ease-in-out forwards;
}

@keyframes btn-slide-sweep {
    0%   { width: 0%;   opacity: 0.3; }
    83%  { width: 100%; opacity: 0.3; }
    100% { width: 100%; opacity: 0;   }
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-text,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-text {
    color: white;
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
}

/* Right Panel Preview */
.right-panel {
    width: 702px;
    background: linear-gradient(in oklab 180deg, oklab(96.4% -0.004 -0.017) 0%, oklab(97% -0.004 -0.014) 100%);
    border-radius: 40px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.preview-container {
    width: 100%;
    flex-grow: 1;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background-color: transparent;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 30px;
}

.image-wrapper.empty {
    background-image: none;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px dashed #dcdcdc;
    border-radius: 30px;
}

.empty-state-text {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 500;
}

/* Before/After comparison layers */
.compare-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.compare-source {
    z-index: 1;
}

.compare-source::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.compare-result {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    /* Show right portion: compressed image on the right */
}

/* Glass labels */
.image-glass-labels {
    position: absolute;
    top: 16px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.badge {
    background:
        linear-gradient(in oklab 180deg, oklab(100% 0 0) -56.46%, oklab(93.7% 0 0) 157.24%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92.2% 0 0) 0%, oklab(77% 0 0) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 700;
    color: #484848;
    backdrop-filter: blur(10px);
}

.badge-blue {
    background:
        linear-gradient(in oklab 180deg, oklab(98.4% -0.002 -0.008) 0%, oklab(96.5% -0.004 -0.016) 100.05%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    color: var(--primary-blue);
}

/* Split slider — draggable divider */
.split-slider-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    z-index: 5;
    transform: translateX(-50%);
    cursor: grab;
}

.split-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    background: white;
    border: 3px solid rgba(232, 239, 251, 0.75);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: grab;
    user-select: none;
}

.split-slider-handle:active {
    cursor: grabbing;
}

/* Preview Stats */
.preview-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-block.text-right {
    align-items: flex-end;
}

.stat-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
}

.stat-title.color-blue {
    color: var(--primary-blue-dark);
}

.stat-subtitle {
    font-size: 12px;
    color: var(--text-light-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-subtitle b {
    color: var(--text-gray);
}

/* Loading pulse for compressed size display while background compression runs */
@keyframes size-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.size-loading {
    animation: size-pulse 1s ease-in-out infinite;
}

/* ── Landing Page Hero ─────────────────────────── */

.hero {
    display: flex;
    flex-direction: column;
    gap: 48px;
    width: 100%;
    background-color: #F8F8F8;
}

/* Top row: headline + CTA side by side */
.hero-top {
    display: flex;
    align-items: flex-end;
    gap: 72px;
    justify-content: space-between;
    width: 100%;
}

/* Left: badge + title */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

/* NEWS badge row */
.hero-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-badge-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(in oklab 180deg, oklab(97% -0.003 -0.014) -56.46%, oklab(96.5% -0.004 -0.016) 157.24%);
    border-radius: 6px;
    padding: 5px 8px;
    color: var(--primary-blue);
    font-size: 8px;
    font-weight: 700;
    line-height: 10px;
}

.hero-badge-text {
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 600;
    line-height: 12px;
}

/* Title */
.hero-title {
    display: flex;
    flex-direction: column;
}

.hero-title-line {
    display: flex;
    gap: 12px;
}

.hero-title-word {
    color: #424242;
    font-size: clamp(48px, calc(-13.54px + 6.154vw), 72px);
    font-weight: 400;
    line-height: 110%;
    letter-spacing: -1px;
}

.hero-title-word.accent {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Right: description + buttons */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 24px;
    padding-left: 40px;
    width: 100%;
    min-width: 300px;
}

.hero-desc {
    color: var(--text-gray);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 143%;
    text-align: right;
    width: 100%;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Learn More: same gradient-border style as .btn-compress-header, larger padding */
.btn-learn-more {
    background:
        linear-gradient(in oklab 180deg, oklab(97% -0.003 -0.014) 0%, oklab(94.4% -0.007 -0.026) 100%) padding-box,
        linear-gradient(in oklab 180deg, oklab(92% -0.008 -0.038) 0%, oklab(81.6% -0.020 -0.091) 100%) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 19px 28px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-learn-more:hover {
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.5);
}

.btn-learn-more:active {
    transform: scale(0.98);
}

/* Try for Free: blue gradient fill */
.btn-try-free {
    display: flex;
    align-items: center;
    gap: 12px;
    background-image: linear-gradient(in oklab 180deg, oklab(63.1% -0.039 -0.196) -30.07%, oklab(56.3% -0.038 -0.238) 133.78%);
    box-shadow: #FFFFFF80 0px 0px 20px inset;
    border-radius: 999px;
    padding: 19px 28px;
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
    color: #FFFFFF;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Hero visual: full-bleed image placeholder */
.hero-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 -72px;
    width: calc(100% + 144px);
}

.hero-visual-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-lottie-wrap {
    position: absolute;
    top: 31%;
    left: 48%;
    transform: translate(-50%, -50%);
    width: clamp(160px, 20%, 320px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-lottie-wrap.visible {
    opacity: 1;
}

.hero-visual-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, #F8F8F8 0%, transparent 100%) top / 100% 30% no-repeat,
        linear-gradient(to top, #F8F8F8 0%, transparent 100%) bottom / 100% 30% no-repeat,
        linear-gradient(to right, #F8F8F8 0%, transparent 100%) left / 18% 100% no-repeat,
        linear-gradient(to left, #F8F8F8 0%, transparent 100%) right / 18% 100% no-repeat;
}

.hero-visual-fade {
    background-color: #F5FEFF;
    height: 89px;
    width: 100%;
    flex-shrink: 0;
}

/* ── Hero Entrance Animations ─────────────────── */

@keyframes hero-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes hero-text-reveal {
    from {
        transform: translateY(110%);
    }

    to {
        transform: translateY(0);
    }
}

.hero-title-mask {
    overflow: hidden;
}

.hero-badge {
    animation: hero-fade-in 400ms ease-out 1.5s both;
}

.hero-anim-line-1 {
    animation: hero-text-reveal 700ms cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
}

.hero-anim-line-2 {
    animation: hero-text-reveal 700ms cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}

.hero-desc {
    animation: hero-fade-in 500ms ease-out 1.2s both;
}

.btn-learn-more {
    animation: hero-fade-in 400ms ease-out 1.3s both;
}

.btn-try-free {
    animation: hero-fade-in 400ms ease-out 1.5s both;
}

@media (prefers-reduced-motion: reduce) {

    .hero-badge,
    .hero-anim-line-1,
    .hero-anim-line-2,
    .hero-desc,
    .btn-learn-more,
    .btn-try-free {
        animation: none;
    }
}

/* ============================================
   Responsive: Large desktop fluid adjustment (1025px – 1400px)
   ============================================ */
@media (max-width: 1400px) and (min-width: 1025px) {

    .hero-top {
        gap: 40px;
    }
}

/* ============================================
   Responsive: Tablet (768px – 1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 768px) {

    .container {
        padding-left: 40px;
        padding-right: 40px;
    }

    .header {
        padding-left: 40px;
        padding-right: 40px;
        margin-top: 32px;
        margin-bottom: 48px;
    }

    .nav-links {
        gap: 24px;
    }

    .hero {
        gap: 22px;
    }

    /* Stack hero vertically, left-aligned */
    .hero-top {
        flex-direction: column;
        gap: 22px;
        align-items: flex-start;
    }

    .hero-left {
        align-items: flex-start;
        width: 100%;
    }

    .hero-title-word {
        font-size: 52px;
    }

    /* Right col loses the side-by-side padding, aligns left */
    .hero-right {
        align-items: flex-start;
        padding-left: 0;
        width: 100%;
    }

    .hero-desc {
        text-align: left;
        max-width: 700px;
        width: auto;
    }

    .hero-visual {
        margin: 0 -40px;
        width: calc(100% + 80px);
    }

    /* Compression tool: reduce gap */
    .main-content {
        gap: 48px;
    }

    .left-panel {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .right-panel {
        flex: 1;
        min-width: 0;
        width: auto;
    }
}

/* ============================================
   Responsive: Mobile (≤ 767px)
   ============================================ */
@media (max-width: 767px) {

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Nav: center-logo left, logo-icon right, hide nav links and actions */
    .header {
        padding-left: 20px;
        padding-right: 20px;
        margin-top: 20px;
        margin-bottom: 32px;
    }

    .nav-links-group {
        display: none;
    }

    .header-actions {
        display: none;
    }

    /* Swap: frostbyte logo to left, dot-grid menu to right */
    .center-logo {
        order: -1;
    }

    /* Hero layout: stack vertically, center-aligned */
    .hero {
        gap: 26px;
    }

    .hero-top {
        flex-direction: column;
        gap: 18px;
        align-items: center;
    }

    .hero-left {
        align-items: center;
        width: 100%;
    }

    .hero-badge {
        justify-content: center;
    }

    .hero-title-line {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .hero-title-word {
        font-size: 36px;
        letter-spacing: -0.5px;
        text-align: center;
    }

    .hero-right {
        align-items: center;
        padding-left: 0;
        width: 100%;
    }

    .hero-desc {
        text-align: center;
        max-width: 90%;
        width: auto;
    }

    .hero-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn-try-free {
        justify-content: center;
    }

    .hero-visual {
        margin: 0 -20px;
        width: calc(100% + 40px);
    }

    /* Compression tool: stack panels, right panel between filename and controls */
    .main-content {
        flex-direction: column;
        gap: 24px;
    }

    .left-panel {
        display: contents;
    }

    .file-name {
        order: 1;
        font-size: 28px;
    }

    .right-panel {
        order: 2;
        width: 100%;
        border-radius: 24px;
        padding: 16px;
    }

    .preview-container {
        min-height: unset;
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }

    .upload-area-right {
        padding: 48px 24px;
    }

    .config-controls {
        order: 3;
        width: 100%;
    }

    /* Footer mobile */
    .footer-inner {
        padding-left: 20px;
        padding-right: 20px;
        gap: 32px;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-links {
        gap: 48px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        text-align: center;
    }

    .footer-copy {
        text-align: center;
    }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #F5FEFF;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding-top: 64px;
}

.footer-inner {
    max-width: 1512px;
    width: 100%;
    padding-left: 48px;
    padding-right: 48px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 380px;
}

.footer-logo img {
    height: 22px;
    width: auto;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-col-title {
    font-size: 13px;
    font-weight: 500;
    color: #AFAFAF;
}

.footer-link {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
}

.footer-link.muted {
    color: #AFAFAF;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-credit a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-gray);
}

.footer-credit {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-gray);
}

.footer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    object-fit: cover;
}

.footer-watermark {
    width: 100%;
    margin-top: 40px;
    pointer-events: none;
    user-select: none;
    line-height: 0;
    max-height: 160px;
    overflow: hidden;
}

.footer-watermark-full {
    width: 100%;
    height: auto;
    display: block;
}