:root{
    --bg:#0d1117;
    --panel:#161b22;
    --text:#c9d1d9;
    --muted:#8b949e;
    --border:rgba(240,246,252,0.14);
    --accent:#7dd3fc;
    --header-h:64px;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    min-height:100vh;
    font-family:system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

.topbar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:10;
    height:var(--header-h);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 20px;
    background:rgba(22,27,34,0.74);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(240,246,252,0.08);
}

.logo{
    display:block;
    height:34px;
}

.logo img{
    display:block;
    width:auto;
    height:100%;
}

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

.nav a{
    color:var(--text);
    text-decoration:none;
    padding:8px 10px;
    border-radius:8px;
    font-size:14px;
}

.nav a:hover{
    background:rgba(240,246,252,0.08);
}

.tool-shell{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:calc(var(--header-h) + 32px) 20px 40px;
}

.tool-panel{
    width:min(760px, 100%);
    border:1px solid var(--border);
    border-radius:8px;
    background:rgba(22,27,34,0.88);
    padding:24px;
}

.tool-heading{
    margin-bottom:18px;
}

.eyebrow{
    margin:0 0 6px;
    color:var(--accent);
    font-size:13px;
    font-weight:700;
    text-transform:uppercase;
}

h1{
    margin:0;
    font-size:2rem;
    line-height:1.1;
}

.mode-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:1px;
    margin-bottom:18px;
    border:1px solid var(--border);
    background:var(--border);
}

.mode-tab{
    border:0;
    border-radius:0;
    padding:12px;
    background:var(--panel);
    color:var(--text);
    font:inherit;
    cursor:pointer;
}

.mode-tab.is-active{
    background:rgba(125,211,252,0.16);
    color:#ffffff;
}

.drop-zone{
    position:relative;
    display:grid;
    justify-items:center;
    gap:16px;
    padding:34px 20px;
    border:2px dashed var(--border);
    border-radius:8px;
    background:rgba(13,17,23,0.5);
    text-align:center;
}

.drop-zone.is-dragging{
    border-color:var(--accent);
    background:rgba(125,211,252,0.08);
}

.file-input{
    position:absolute;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}

.drop-copy h2{
    margin:0 0 6px;
    font-size:1.25rem;
}

.drop-copy p,
.status{
    margin:0;
    color:var(--muted);
}

.choose-button,
.primary-button,
.download-button{
    border:1px solid var(--border);
    border-radius:8px;
    padding:10px 14px;
    color:var(--text);
    background:rgba(240,246,252,0.08);
    font:inherit;
    text-decoration:none;
    cursor:pointer;
}

.primary-button{
    background:var(--accent);
    color:#061018;
    border-color:transparent;
    font-weight:700;
}

.primary-button:disabled,
.download-button.is-disabled{
    opacity:0.45;
    cursor:not-allowed;
    pointer-events:none;
}

.file-list{
    display:grid;
    gap:8px;
    margin:16px 0;
}

.file-item{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:6px;
    background:rgba(13,17,23,0.45);
    font-size:14px;
}

.file-size{
    color:var(--muted);
    white-space:nowrap;
}

.actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:12px;
}

@media (max-width:640px){
    .topbar{
        padding:0 12px;
    }

    .nav{
        gap:2px;
    }

    .nav a{
        padding:8px;
    }

    .tool-panel{
        padding:18px;
    }

    h1{
        font-size:1.65rem;
    }
}
