:root {
    --panel: rgba(255, 255, 255, 0.94);
    --ink: #111111;
    --muted: #667085;
    --line: #e5e7eb;
    --accent: #40a629;
    --danger: #c21f2b;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f6f7f5 url("../img/background.png") center / cover fixed no-repeat;
}

body::before {
    position: fixed;
    inset: 0;
    content: "";
    background: rgba(255, 255, 255, 0.16);
    pointer-events: none;
}

.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(16px, 4vw, 48px);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}

.brand-leaf {
    display: inline-grid;
    place-items: center;
    min-width: 50px;
    height: 34px;
    padding: 0 8px;
    color: #fff;
    background: var(--accent);
    border-radius: 6px;
    font-size: 0.9rem;
}

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

.account-email {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.workspace {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 24px clamp(16px, 5vw, 64px) 56px;
}

.transfer-panel {
    width: min(430px, 100%);
    padding: 26px;
    background: var(--panel);
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(16, 24, 40, 0.18);
    backdrop-filter: blur(8px);
}

.transfer-panel h1,
.result-pane h2,
.modal-title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.muted-copy {
    margin: 6px 0 0;
    color: var(--muted);
}

.drop-zone {
    display: grid;
    place-items: center;
    min-height: 210px;
    padding: 22px;
    text-align: center;
    border: 1px dashed #bfc7d1;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s ease, transform .2s ease;
}

.drop-zone.drag-over {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.add-files {
    width: 62px;
    height: 62px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 14px;
    color: #fff;
    background: var(--ink);
    border: 0;
    border-radius: 50%;
}

.add-files svg {
    width: 30px;
    height: 30px;
}

.selected-files {
    margin-top: 14px;
    max-height: 168px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.file-row {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.file-row:last-child {
    border-bottom: 0;
}

.file-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-meta strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 270px;
    font-size: .92rem;
}

.file-meta small {
    display: block;
    color: var(--muted);
}

.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}

.mode-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-weight: 700;
}

.mode-tab.active {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.form-label {
    margin: 14px 0 6px;
    font-weight: 700;
}

.form-control {
    min-height: 46px;
    border-radius: 6px;
}

textarea.form-control {
    min-height: 92px;
}

.captcha-wrap {
    min-height: 1px;
    margin-top: 16px;
}

.transfer-button,
.btn-icon-text,
#verifyDownloadBtn,
.download-panel .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.transfer-button {
    min-height: 50px;
    margin-top: 16px;
}

.progress {
    height: 12px;
    margin-top: 16px;
    background: #e9ecef;
}

.progress-bar {
    background: var(--accent);
}

.result-pane {
    text-align: center;
}

#qrCode {
    display: inline-grid;
    place-items: center;
    width: 164px;
    height: 164px;
    margin-bottom: 14px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.copy-line {
    display: grid;
    grid-template-columns: 1fr 50px;
    gap: 8px;
    margin-top: 16px;
}

.status-icon {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 14px;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
}

.status-icon.danger {
    background: var(--danger);
}

.message-box {
    margin: 16px 0;
    padding: 12px;
    color: #263238;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.modal-content {
    border: 0;
    border-radius: 8px;
}

.compact-tabs .nav-link {
    color: var(--muted);
    font-weight: 700;
}

.compact-tabs .nav-link.active {
    color: var(--ink);
}

.auth-form {
    display: none;
}

.auth-form.active.show {
    display: grid;
    gap: 10px;
}

.activation-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.2;
}

@media (max-width: 720px) {
    body {
        background-position: center top;
    }

    .topbar {
        min-height: 68px;
        align-items: flex-start;
    }

    .brand-mark span:last-child,
    .account-email {
        display: none;
    }

    .workspace {
        align-items: flex-start;
        padding-top: 12px;
    }

    .transfer-panel {
        padding: 20px;
    }

    .drop-zone {
        min-height: 188px;
    }

    .file-meta strong {
        max-width: 190px;
    }
}
