.image-converter-app {
    min-height: 100vh;
    padding: clamp(7.5rem, 12vw, 10rem) clamp(1rem, 2vw, 1.75rem) 2rem;
    background:
        radial-gradient(circle at top left, rgba(0, 243, 255, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 26%),
        linear-gradient(180deg, #080a12 0%, #050509 100%);
}

.image-converter-app * {
    box-sizing: border-box;
}

.converter-topbar,
.converter-shell,
.converter-panel,
.drop-zone,
.queue-card,
.stats-grid > div,
.preview-compare figure,
.inline-actions button,
.converter-top-actions button,
.converter-back,
.field-grid input,
.field-grid select,
.suffix-field input {
    border-radius: 8px;
}

.converter-topbar {
    max-width: 1600px;
    margin: 0 auto 1.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}

.converter-back,
.converter-top-actions button,
.inline-actions button,
.queue-card button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #d9e1f2;
    padding: 0.8rem 1rem;
    text-decoration: none;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s ease;
}

.converter-back:hover,
.converter-top-actions button:hover,
.inline-actions button:hover,
.queue-card button:hover {
    border-color: rgba(0, 243, 255, 0.42);
    color: #ffffff;
    background: rgba(0, 243, 255, 0.09);
}

.converter-top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.converter-top-actions .primary {
    background: #67e8f9;
    color: #071019;
    border-color: rgba(103, 232, 249, 0.7);
}

.converter-top-actions .primary:hover {
    background: #ffffff;
}

.converter-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.converter-logo {
    width: 3.25rem;
    height: 3.25rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.28), rgba(236, 72, 153, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-family: "Orbitron", sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
}

.converter-brand span {
    display: block;
    color: #ffffff;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.1rem, 2.4vw, 1.45rem);
    font-weight: 800;
}

.converter-brand small {
    display: block;
    margin-top: 0.25rem;
    color: #95a4c6;
    font-size: 0.9rem;
}

.converter-shell {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) minmax(280px, 360px);
    gap: 1rem;
    align-items: start;
}

.converter-sidebar,
.converter-main {
    min-width: 0;
}

.converter-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 11, 20, 0.8);
    backdrop-filter: blur(14px);
    padding: 1rem;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.25);
}

.converter-sidebar {
    display: grid;
    gap: 1rem;
}

.sticky {
    position: sticky;
    top: 7.5rem;
}

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.panel-title-row h1,
.panel-title-row h2 {
    margin: 0;
    color: #ffffff;
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    line-height: 1.3;
}

.panel-chip {
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #67e8f9;
    background: rgba(103, 232, 249, 0.08);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-chip.muted {
    color: #a5b1ca;
    background: rgba(255, 255, 255, 0.05);
}

.drop-zone {
    display: grid;
    gap: 0.45rem;
    justify-items: start;
    padding: 1rem;
    border: 1px dashed rgba(103, 232, 249, 0.3);
    background:
        linear-gradient(135deg, rgba(103, 232, 249, 0.08), rgba(236, 72, 153, 0.06)),
        rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: 0.2s ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
    border-color: rgba(236, 72, 153, 0.55);
    transform: translateY(-1px);
}

.drop-zone i {
    width: 1.5rem;
    height: 1.5rem;
    color: #67e8f9;
}

.drop-zone strong {
    color: #ffffff;
    font-size: 0.98rem;
}

.drop-zone span,
.panel-note,
.detail-empty {
    color: #8ea0be;
    font-size: 0.86rem;
    line-height: 1.55;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.field-grid label,
.suffix-field,
.toggle {
    display: grid;
    gap: 0.45rem;
    color: #c8d3e8;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.field-grid input,
.field-grid select,
.suffix-field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(1, 6, 15, 0.9);
    color: #ffffff;
    padding: 0.72rem 0.82rem;
    font: inherit;
}

.field-grid input[type="range"] {
    padding: 0;
}

.toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.95rem 0;
}

.toggle {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.toggle input {
    margin: 0;
}

.suffix-field {
    margin-top: 0.25rem;
}

.compact .inline-actions {
    margin-top: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.stats-grid > div {
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.stats-grid span {
    display: block;
    color: #8ea0be;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stats-grid strong {
    display: block;
    margin-top: 0.35rem;
    color: #ffffff;
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
}

.queue-list {
    display: grid;
    gap: 0.8rem;
}

.queue-card {
    display: grid;
    grid-template-columns: auto 88px minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: 0.2s ease;
}

.queue-card:hover,
.queue-card.is-active {
    border-color: rgba(103, 232, 249, 0.42);
    background: rgba(103, 232, 249, 0.08);
}

.queue-select {
    width: 1rem;
    height: 1rem;
}

.queue-thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.12), rgba(236, 72, 153, 0.08));
}

.queue-meta {
    min-width: 0;
}

.queue-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-subtitle,
.queue-dimensions {
    margin-top: 0.28rem;
    color: #8ea0be;
    font-size: 0.8rem;
}

.queue-progress {
    margin-top: 0.55rem;
    height: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.queue-progress > span {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #67e8f9, #ec4899);
    transition: width 0.2s ease;
}

.queue-actions {
    display: grid;
    gap: 0.55rem;
}

.queue-actions button {
    min-width: 7.5rem;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b7c4df;
}

.status-tag.is-success {
    color: #86efac;
}

.status-tag.is-error {
    color: #fda4af;
}

.detail-panel.hidden {
    display: none;
}

.preview-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.preview-compare figure {
    margin: 0;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.preview-compare figcaption {
    margin-bottom: 0.55rem;
    color: #8ea0be;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.preview-compare img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.08), rgba(236, 72, 153, 0.04));
}

.detail-metrics {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #d9e1f2;
    font-size: 0.86rem;
}

.metric-row span {
    color: #8ea0be;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #8ea0be;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

@media (max-width: 1360px) {
    .converter-shell {
        grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    }

    .detail-sidebar {
        grid-column: 1 / -1;
    }

    .sticky {
        position: static;
    }
}

@media (max-width: 980px) {
    .converter-topbar {
        grid-template-columns: 1fr;
    }

    .converter-top-actions {
        justify-content: flex-start;
    }

    .converter-shell {
        grid-template-columns: 1fr;
    }

    .field-grid,
    .preview-compare,
    .stats-grid,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .queue-card {
        grid-template-columns: auto 76px minmax(0, 1fr);
    }

    .queue-actions {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .queue-actions button {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .image-converter-app {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .converter-brand {
        align-items: flex-start;
    }

    .converter-top-actions,
    .inline-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .converter-top-actions .primary,
    .converter-top-actions button,
    .inline-actions button {
        width: 100%;
        min-height: 3rem;
    }

    .queue-card {
        grid-template-columns: auto 68px minmax(0, 1fr);
        padding: 0.8rem;
    }

    .queue-thumb {
        width: 68px;
        height: 68px;
    }
}
