/* ═══════════════════════════════════════════
   Quickie Swap — v1.2.1
   ═══════════════════════════════════════════ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('./fonts/Inter.var.woff2') format('woff2-variations');
}

:root {
    --teal: #14BBA6;
    --cyan: #06D6D6;
    --grad: linear-gradient(135deg, #14BBA6, #06D6D6);

    --bg: #0B131F;
    --bg-2: #0f1a2b;
    --bg-3: #132238;

    --text: #FFFFFF;
    --muted: rgba(255, 255, 255, 0.62);
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);

    --danger: #ff5c7a;
    --danger-glow: rgba(255, 92, 122, 0.25);
    --success-glow: rgba(20, 187, 166, 0.25);

    --radius: 20px;
    --radius-sm: 12px;

    --inner-hl: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 80px;
    overflow-x: hidden;
    letter-spacing: -0.011em;
}

/* SPLASH */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: grid;
    place-items: center;
    transition: opacity .5s ease, transform .5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.splash.hiding {
    opacity: 0;
    transform: translateY(-24px) scale(1.02);
    pointer-events: none;
}

.splash-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.splash-logo {
    width: 160px;
    height: 160px;
    opacity: 0;
    transform: scale(0.85);
    animation: splashLogoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 20px 60px rgba(20, 187, 166, 0.35));
}

@keyframes splashLogoIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.splash-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    opacity: 0;
    transform: translateY(12px);
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    background-position: -100% 0;
    animation: splashTextIn 0.5s ease 0.4s forwards, shimmer 1s ease 0.9s forwards;
}

@keyframes splashTextIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    to {
        background-position: 200% 0;
    }
}

.splash-tagline {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    opacity: 0;
    animation: splashTextIn 0.5s ease 0.7s forwards;
}

/* AURORA */
.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.5;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    will-change: transform;
}

.aurora-blob-1 {
    width: 500px;
    height: 500px;
    background: var(--teal);
    top: -200px;
    left: -150px;
    opacity: 0.35;
    animation: drift1 24s ease-in-out infinite;
}

.aurora-blob-2 {
    width: 400px;
    height: 400px;
    background: var(--cyan);
    bottom: -150px;
    right: -100px;
    opacity: 0.28;
    animation: drift2 30s ease-in-out infinite;
}

@keyframes drift1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(80px, 60px) scale(1.1);
    }
}

@keyframes drift2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-100px, -40px) scale(1.15);
    }
}

.app-header,
.trust-badge,
.tabs,
main,
.app-footer {
    position: relative;
    z-index: 1;
}

/* HEADER */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 8px;
    max-width: 920px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), filter .25s ease;
    filter: drop-shadow(0 4px 12px rgba(20, 187, 166, 0.25));
}

.brand:hover .brand-logo {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 6px 18px rgba(20, 187, 166, 0.5));
}

.brand-text h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.tagline {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}

.install-btn {
    background: var(--grad);
    color: #0B131F;
    border: 0;
    padding: 9px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 4px 16px rgba(20, 187, 166, 0.3);
}

.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(20, 187, 166, 0.5);
}

.install-btn:active {
    transform: scale(0.97);
}

.trust-badge {
    max-width: 920px;
    margin: 0 auto;
    padding: 6px 20px 0;
    font-size: 0.78rem;
    color: var(--teal);
    opacity: 0.95;
    font-weight: 500;
}

/* TABS */
.tabs {
    max-width: 920px;
    margin: 18px auto 0;
    padding: 0 20px;
    display: flex;
    gap: 8px;
}

.tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line-strong);
}

.tab.active {
    color: #FFFFFF;
    background: rgba(20, 187, 166, 0.12);
    border-color: rgba(6, 214, 214, 0.5);
    box-shadow: 0 0 0 1px rgba(6, 214, 214, 0.15) inset, 0 4px 20px rgba(20, 187, 166, 0.15);
}

.tab:active {
    transform: scale(0.98);
}

/* PANELS */
main {
    max-width: 920px;
    margin: 0 auto;
    padding: 18px 20px;
}

.panel {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.panel.active {
    display: flex;
    animation: panelIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* DROPZONE */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    padding: 36px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--cyan);
    background: rgba(6, 214, 214, 0.04);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(20, 187, 166, 0.12);
}

.dropzone.dragover {
    border-style: solid;
    background: rgba(6, 214, 214, 0.08);
}

.dz-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: block;
    color: var(--teal);
    opacity: 0.8;
    transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropzone:hover .dz-icon {
    color: var(--cyan);
    opacity: 1;
    transform: translateY(-3px) scale(1.05);
}

.dz-title {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    color: #FFFFFF;
    letter-spacing: -0.015em;
}

.dz-sub {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
}

/* SETTINGS */
.settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    box-shadow: var(--inner-hl);
}

.settings label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.settings select {
    background: var(--bg-3);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238fa3c9' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
    text-transform: none;
    letter-spacing: -0.005em;
}

.settings select:hover {
    border-color: var(--line-strong);
}

.settings select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(6, 214, 214, 0.15);
}

/* CONVERT ALL */
.convert-all {
    background: var(--grad);
    color: #0B131F;
    font-weight: 800;
    border: 0;
    border-radius: 16px;
    padding: 15px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(20, 187, 166, 0.3);
    position: relative;
    overflow: hidden;
}

.convert-all::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .6s ease;
}

.convert-all:hover::before {
    transform: translateX(100%);
}

.convert-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(20, 187, 166, 0.45);
}

.convert-all:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 12px rgba(20, 187, 166, 0.3);
}

.convert-all:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* CONVERSION NOTE */
.conversion-note {
    text-align: center;
    font-size: 0.74rem;
    color: var(--muted);
    margin: 4px 0 0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* FILE LIST */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fileIn .4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--inner-hl);
    transition: border-color .2s ease;
}

.file-item:hover {
    border-color: var(--line-strong);
}

@keyframes fileIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.file-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #FFFFFF;
}

.file-meta {
    font-size: 0.74rem;
    color: var(--muted);
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.file-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.file-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--grad);
    transition: width .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.file-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmerBar 1.4s linear infinite;
}

@keyframes shimmerBar {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.btn:active {
    transform: scale(0.97);
}

.btn.primary {
    background: var(--grad);
    color: #0B131F;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(20, 187, 166, 0.25);
}

.btn.primary:hover {
    box-shadow: 0 4px 16px rgba(20, 187, 166, 0.4);
}

.btn.danger {
    color: var(--danger);
    border-color: rgba(255, 92, 122, 0.3);
}

.btn.danger:hover {
    background: rgba(255, 92, 122, 0.08);
    box-shadow: 0 0 12px var(--danger-glow);
}

.file-status {
    font-size: 0.74rem;
    color: var(--muted);
    font-weight: 600;
}

.file-status.ok {
    color: var(--teal);
    text-shadow: 0 0 12px var(--success-glow);
}

.file-status.err {
    color: var(--danger);
    text-shadow: 0 0 12px var(--danger-glow);
}

.file-size-note {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* OVERLAYS */
.drag-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(11, 19, 31, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    pointer-events: none;
}

.drag-overlay-inner {
    font-size: 1.3rem;
    font-weight: 700;
    padding: 24px 36px;
    border-radius: var(--radius);
    background: var(--grad);
    color: #0B131F;
    box-shadow: 0 20px 60px rgba(20, 187, 166, 0.5);
    animation: dragPulse 1.4s ease-in-out infinite;
}

@keyframes dragPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

.boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(11, 19, 31, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
}

.boot-card {
    text-align: center;
    padding: 32px 40px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--cyan);
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* FOOTER */
.app-footer {
    text-align: center;
    font-size: 0.74rem;
    color: var(--muted);
    padding: 20px;
    margin-top: 20px;
    font-weight: 500;
}

/* MOBILE */
@media (max-width: 560px) {
    .settings {
        grid-template-columns: 1fr;
    }

    .tabs {
        padding: 0 14px;
    }

    main {
        padding: 14px;
    }

    .app-header {
        padding: 14px 16px 6px;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .splash-logo {
        width: 130px;
        height: 130px;
    }

    .splash-title {
        font-size: 1.4rem;
    }
}