:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --success: #16a34a;
    --danger: #dc2626;
    --danger-dark: #b91c1c;

    --text: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.76);
    --text-muted: rgba(248, 250, 252, 0.58);

    --glass-bg: rgba(15, 23, 42, 0.66);
    --glass-bg-strong: rgba(15, 23, 42, 0.84);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-border-hover: rgba(255, 255, 255, 0.24);

    --input-bg: rgba(15, 23, 42, 0.58);
    --input-border: rgba(255, 255, 255, 0.16);

    --shadow:
        0 24px 60px rgba(2, 6, 23, 0.32),
        0 8px 24px rgba(2, 6, 23, 0.22);

    --shadow-small:
        0 12px 30px rgba(2, 6, 23, 0.22);

    --radius-large: 24px;
    --radius: 16px;
    --radius-small: 10px;
    --sidebar-width: 250px;
    --transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: #020617;
    font-family:
        Inter,
        "PingFang SC",
        "Microsoft YaHei",
        "Noto Sans CJK SC",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition:
        color var(--transition),
        background-color var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

a:hover {
    color: #c7d2fe;
}

img,
video,
audio,
iframe {
    max-width: 100%;
}

img {
    display: block;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.2;
}

h2 {
    margin-bottom: 16px;
    font-size: 22px;
    line-height: 1.3;
}

h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

p {
    margin-bottom: 14px;
    color: var(--text-secondary);
}

::selection {
    color: #fff;
    background: rgba(99, 102, 241, 0.72);
}

.bg {
    position: fixed;
    z-index: -10;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 15% 18%,
            rgba(99, 102, 241, 0.34),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 20%,
            rgba(14, 165, 233, 0.27),
            transparent 34%
        ),
        radial-gradient(
            circle at 75% 82%,
            rgba(168, 85, 247, 0.25),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #020617 0%,
            #0f172a 46%,
            #111827 100%
        );
}

.bg::before,
.bg::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}

.bg::before {
    top: -180px;
    left: -130px;
    background: #4f46e5;
}

.bg::after {
    right: -180px;
    bottom: -200px;
    background: #0891b2;
}

.glass {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.panel {
    width: 100%;
    margin-bottom: 24px;
    padding: clamp(20px, 3vw, 32px);
    overflow: hidden;
    border-radius: var(--radius-large);
}

.panel:last-child {
    margin-bottom: 0;
}

.max-600 {
    max-width: 600px;
}

.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 75px);
    padding: 28px 18px;
}

.auth-box {
    width: min(440px, 100%);
    padding: clamp(26px, 5vw, 42px);
    border-radius: 28px;
}

.auth-box h1,
.auth-box > p {
    text-align: center;
}

.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 22px;
}

form {
    margin: 0;
}

label {
    display: block;
    margin: 16px 0 7px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 650;
}

label:first-child {
    margin-top: 0;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-small);
    outline: none;
    background: var(--input-bg);
    transition:
        border-color var(--transition),
        background-color var(--transition),
        box-shadow var(--transition);
}

textarea {
    min-height: 125px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(226, 232, 240, 0.42);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.82);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.17);
}

input[type="file"] {
    min-height: 48px;
    padding: 7px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 7px 13px;
    color: #fff;
    cursor: pointer;
    border: 0;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.86);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: auto;
    margin: 0 8px 0 0;
    padding: 0;
    accent-color: var(--primary);
}

.ajax-form .btn {
    margin-top: 22px;
}

.btn,
.small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    word-break: keep-all;
    border: 1px solid transparent;
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.24);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

.btn {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
}

.small-btn {
    min-height: 33px;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 650;
}

.btn:hover,
.small-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.33);
}

.btn:disabled,
.small-btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.btn.full {
    width: 100%;
}

.btn.secondary {
    color: var(--text);
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.small-btn.danger,
.btn.danger {
    background:
        linear-gradient(
            135deg,
            var(--danger),
            var(--danger-dark)
        );
}

.layout {
    display: grid;
    grid-template-columns:
        var(--sidebar-width)
        minmax(0, 1fr);
    gap: 24px;
    width: min(1500px, calc(100% - 40px));
    min-height: calc(100vh - 95px);
    margin: 0 auto;
    padding: 24px 0 32px;
}

.sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    min-height: calc(100vh - 48px);
    padding: 24px 16px;
    border-radius: var(--radius-large);
}

.sidebar h2 {
    padding: 5px 12px 20px;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar > a,
.sidebar-logout {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 45px;
    margin-bottom: 6px;
    padding: 10px 13px;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.sidebar > a:hover,
.sidebar-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar > a.active {
    color: #fff;
    background:
        linear-gradient(
            135deg,
            rgba(99, 102, 241, 0.35),
            rgba(79, 70, 229, 0.22)
        );
}

.sidebar-logout-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-logout {
    margin: 0;
    color: #fca5a5;
}

.main {
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 0;
}

.panel-head h1 {
    margin-bottom: 7px;
}

.panel-head p:last-child {
    margin-bottom: 0;
}

/* 上传区域 */

.upload-section {
    width: 100%;
    margin: 22px 0 26px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            rgba(99, 102, 241, 0.12),
            rgba(14, 165, 233, 0.05)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.upload-section-head {
    margin-bottom: 15px;
}

.upload-section-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.upload-section-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.upload-form {
    display: block;
    width: 100%;
}

.upload-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.upload-file-field {
    min-width: 0;
}

.upload-file-field input[type="file"] {
    display: block;
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0;
}

.upload-submit-btn {
    width: auto;
    min-width: 125px;
    height: 48px;
    min-height: 48px;
    margin: 0 !important;
    padding-right: 24px;
    padding-left: 24px;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    flex-shrink: 0;
}

.upload-progress {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    margin-top: 15px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.28);
}

.upload-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 8px;
}

.upload-progress-text {
    min-width: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-progress-percent {
    flex: 0 0 auto;
    min-width: 44px;
    color: #c7d2fe;
    text-align: right;
    font-size: 13px;
    font-weight: 800;
}

.upload-progress-track {
    display: block;
    width: 100%;
    height: 11px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
}

.upload-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #6366f1,
            #3b82f6,
            #06b6d4
        );
    background-size: 200% 100%;
    box-shadow:
        0 0 14px rgba(59, 130, 246, 0.6);
    transition: width 0.15s linear;
}

.upload-progress.is-uploading {
    border-color: rgba(99, 102, 241, 0.28);
}

.upload-progress.is-uploading
.upload-progress-bar {
    animation: upload-progress-flow 1.15s linear infinite;
}

.upload-progress.is-success {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(22, 163, 74, 0.1);
}

.upload-progress.is-success
.upload-progress-percent {
    color: #86efac;
}

.upload-progress.is-success
.upload-progress-bar {
    background:
        linear-gradient(
            90deg,
            #16a34a,
            #22c55e
        );
}

.upload-progress.is-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(220, 38, 38, 0.1);
}

.upload-progress.is-error
.upload-progress-percent {
    color: #fca5a5;
}

.upload-progress.is-error
.upload-progress-bar {
    background:
        linear-gradient(
            90deg,
            #dc2626,
            #ef4444
        );
}

@keyframes upload-progress-flow {
    from {
        background-position: 100% 0;
    }

    to {
        background-position: -100% 0;
    }
}

.notice {
    margin: 18px 0;
    padding: 14px 16px;
    color: rgba(224, 231, 255, 0.92);
    border: 1px solid rgba(129, 140, 248, 0.23);
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    line-height: 1.7;
    word-break: break-word;
}

.file-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(min(220px, 100%), 1fr)
        );
    gap: 18px;
    margin-top: 22px;
}

.file-card {
    position: relative;
    min-width: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.035)
        );
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        border-color var(--transition);
}

.file-card:hover {
    border-color: rgba(129, 140, 248, 0.3);
    transform: translateY(-3px);
}

.file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    color: #fff;
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            rgba(99, 102, 241, 0.95),
            rgba(14, 165, 233, 0.82)
        );
    font-size: 12px;
    font-weight: 800;
}

.file-card h3 {
    min-height: 46px;
    margin-bottom: 12px;
    overflow: hidden;
    word-break: break-all;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.file-card p {
    margin-bottom: 6px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.empty {
    grid-column: 1 / -1;
    width: 100%;
    padding: 42px 22px;
    color: var(--text-muted);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
    text-align: center;
}

.stats {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    border-radius: var(--radius);
}

.stat b {
    margin-bottom: 5px;
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
}

.stat span {
    color: var(--text-muted);
    font-size: 14px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.2);
}

table {
    width: 100%;
    min-width: 900px;
    border-spacing: 0;
    border-collapse: separate;
    color: var(--text-secondary);
    font-size: 13px;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    text-align: left;
    vertical-align: middle;
}

th {
    position: sticky;
    z-index: 2;
    top: 0;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.96);
    white-space: nowrap;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.045);
}

td {
    max-width: 260px;
    word-break: break-word;
}

.preview-wrap {
    width: min(1500px, calc(100% - 40px));
    min-height: calc(100vh - 75px);
    margin: 0 auto;
    padding: 24px 0 32px;
}

.preview-box {
    width: 100%;
    min-height: calc(100vh - 130px);
    padding: clamp(18px, 3vw, 30px);
    overflow: hidden;
    border-radius: var(--radius-large);
}

.preview-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.55);
}

.preview-content iframe {
    width: 100%;
    height: calc(100vh - 245px);
    min-height: 560px;
    border: 0;
    background: #fff;
}

.preview-content .preview-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 230px);
    object-fit: contain;
}

.preview-content video {
    width: 100%;
    max-height: calc(100vh - 235px);
    background: #000;
}

.preview-content audio {
    width: min(650px, calc(100% - 40px));
    margin: 80px auto;
}

footer {
    width: 100%;
    min-height: 65px;
    padding: 20px;
    color: rgba(226, 232, 240, 0.5);
    text-align: center;
    font-size: 13px;
}

#app-toast-container > div {
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(129, 140, 248, 0.48);
    outline-offset: 2px;
}

@media (max-width: 1050px) {
    :root {
        --sidebar-width: 215px;
    }

    .layout {
        gap: 18px;
        width: min(100% - 28px, 1400px);
    }

    .preview-wrap {
        width: calc(100% - 28px);
    }
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    .layout {
        display: block;
        width: calc(100% - 20px);
        min-height: 0;
        padding: 10px 0 24px;
    }

    .sidebar {
        position: relative;
        top: auto;
        display: flex;
        align-items: center;
        min-height: auto;
        margin-bottom: 14px;
        padding: 10px;
        overflow-x: auto;
        border-radius: 16px;
    }

    .sidebar h2 {
        display: none;
    }

    .sidebar > a,
    .sidebar-logout {
        flex: 0 0 auto;
        width: auto;
        min-height: 39px;
        margin: 0 6px 0 0;
        padding: 8px 12px;
        white-space: nowrap;
        font-size: 13px;
    }

    .sidebar-logout-form {
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .panel {
        margin-bottom: 14px;
        padding: 18px;
        border-radius: 18px;
    }

    .panel-head {
        display: block;
    }

    .upload-section {
        margin: 18px 0 20px;
        padding: 15px;
    }

    .upload-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .upload-file-field,
    .upload-file-field input[type="file"] {
        width: 100%;
    }

    .upload-submit-btn {
        width: 100%;
        min-width: 0;
        white-space: nowrap !important;
    }

    .upload-progress {
        margin-top: 12px;
        padding: 12px;
    }

    .file-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 14px;
    }

    .preview-wrap {
        width: calc(100% - 20px);
        padding: 10px 0 24px;
    }

    .preview-box {
        padding: 14px;
        border-radius: 18px;
    }

    .preview-content {
        min-height: 420px;
    }

    .preview-content iframe {
        height: 68vh;
        min-height: 460px;
    }

    .auth-wrap {
        padding: 16px 10px;
    }

    .auth-box {
        padding: 24px 18px;
        border-radius: 20px;
    }
}

@media (max-width: 430px) {
    h1 {
        font-size: 25px;
    }

    .panel,
    .auth-box {
        padding-right: 15px;
        padding-left: 15px;
    }

    .upload-section {
        padding: 14px;
    }

    .upload-section-head h2 {
        font-size: 17px;
    }

    .upload-progress-info {
        gap: 8px;
    }

    .upload-progress-text {
        font-size: 12px;
    }

    .upload-progress-percent {
        min-width: 39px;
        font-size: 12px;
    }

    .card-actions {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .card-actions .small-btn {
        width: 100%;
    }

    #app-toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@supports not (
    (backdrop-filter: blur(10px)) or
    (-webkit-backdrop-filter: blur(10px))
) {
    .glass {
        background: var(--glass-bg-strong);
    }
}
/* =========================================================
   自定义确认弹窗
   ========================================================= */

.app-modal-overlay {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.app-modal-overlay.is-open {
    visibility: visible;
    opacity: 1;
}

.app-modal {
    width: min(430px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.98),
            rgba(15, 23, 42, 0.98)
        );
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.48),
        0 10px 30px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

.app-modal-overlay.is-open .app-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.app-modal-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 25px 25px 20px;
}

.app-modal-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 15px;
    background: rgba(220, 38, 38, 0.12);
}

.app-modal-icon svg {
    width: 24px;
    height: 24px;
}

.app-modal-icon.is-primary {
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.26);
    background: rgba(99, 102, 241, 0.14);
}

.app-modal-icon.is-warning {
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.12);
}

.app-modal-content {
    min-width: 0;
    flex: 1;
}

.app-modal-title {
    margin: 1px 0 8px;
    color: #f8fafc;
    font-size: 19px;
    font-weight: 750;
    line-height: 1.35;
}

.app-modal-message {
    margin: 0;
    color: rgba(226, 232, 240, 0.7);
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-line;
    word-break: break-word;
}

.app-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px 22px;
}

.app-modal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    min-height: 42px;
    padding: 9px 18px;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.app-modal-button:hover {
    transform: translateY(-1px);
}

.app-modal-button:active {
    transform: translateY(0);
}

.app-modal-button:focus-visible {
    outline: 3px solid rgba(129, 140, 248, 0.42);
    outline-offset: 2px;
}

.app-modal-cancel {
    color: rgba(248, 250, 252, 0.86);
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.07);
}

.app-modal-cancel:hover {
    border-color: rgba(255, 255, 255, 0.23);
    background: rgba(255, 255, 255, 0.12);
}

.app-modal-confirm {
    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        );
    box-shadow: 0 9px 22px rgba(79, 70, 229, 0.26);
}

.app-modal-confirm:hover {
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.36);
}

.app-modal-confirm.is-danger {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #b91c1c
        );
    box-shadow: 0 9px 22px rgba(220, 38, 38, 0.24);
}

.app-modal-confirm.is-danger:hover {
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.34);
}

.app-modal-confirm.is-warning {
    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #d97706
        );
    box-shadow: 0 9px 22px rgba(217, 119, 6, 0.24);
}

body.app-modal-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .app-modal-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .app-modal {
        width: 100%;
        border-radius: 20px;
        transform: translateY(30px) scale(0.98);
    }

    .app-modal-body {
        gap: 13px;
        padding: 21px 18px 17px;
    }

    .app-modal-icon {
        width: 43px;
        height: 43px;
        border-radius: 13px;
    }

    .app-modal-title {
        font-size: 17px;
    }

    .app-modal-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 13px 18px 18px;
    }

    .app-modal-button {
        width: 100%;
        min-width: 0;
    }
}
/* =========================================================
   白色半透明确认弹窗 UI
   直接添加到 style.css 最后面
   ========================================================= */

.app-dialog-overlay {
    background: rgba(148, 163, 184, 0.22) !important;
    backdrop-filter: blur(12px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(135%) !important;
}

.app-dialog-box {
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.94),
            rgba(248, 250, 252, 0.84)
        ) !important;
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.18),
        0 10px 30px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(24px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(140%) !important;
}

/* 弹窗标题 */

.app-dialog-title {
    color: #0f172a !important;
}

/* 弹窗说明文字 */

.app-dialog-message {
    color: #64748b !important;
}

/* 普通信息图标 */

.app-dialog-icon {
    color: #4f46e5 !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
    background:
        linear-gradient(
            145deg,
            rgba(238, 242, 255, 0.95),
            rgba(224, 231, 255, 0.72)
        ) !important;
    box-shadow:
        0 8px 20px rgba(99, 102, 241, 0.1) !important;
}

/* 删除操作图标 */

.app-dialog-icon.is-danger {
    color: #dc2626 !important;
    border-color: rgba(239, 68, 68, 0.18) !important;
    background:
        linear-gradient(
            145deg,
            rgba(254, 242, 242, 0.98),
            rgba(254, 226, 226, 0.76)
        ) !important;
    box-shadow:
        0 8px 20px rgba(220, 38, 38, 0.1) !important;
}

/* 警告操作图标 */

.app-dialog-icon.is-warning {
    color: #d97706 !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    background:
        linear-gradient(
            145deg,
            rgba(255, 251, 235, 0.98),
            rgba(254, 243, 199, 0.78)
        ) !important;
    box-shadow:
        0 8px 20px rgba(217, 119, 6, 0.1) !important;
}

/* 取消按钮 */

.app-dialog-cancel {
    color: #334155 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    background: rgba(255, 255, 255, 0.7) !important;
    box-shadow:
        0 5px 14px rgba(15, 23, 42, 0.06) !important;
}

.app-dialog-cancel:hover {
    color: #0f172a !important;
    border-color: rgba(100, 116, 139, 0.36) !important;
    background: rgba(248, 250, 252, 0.98) !important;
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.09) !important;
}

/* 普通确认按钮 */

.app-dialog-confirm {
    color: #ffffff !important;
    border-color: transparent !important;
    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        ) !important;
    box-shadow:
        0 9px 22px rgba(79, 70, 229, 0.22) !important;
}

.app-dialog-confirm:hover {
    background:
        linear-gradient(
            135deg,
            #818cf8,
            #4f46e5
        ) !important;
    box-shadow:
        0 12px 28px rgba(79, 70, 229, 0.3) !important;
}

/* 删除确认按钮 */

.app-dialog-confirm.is-danger {
    color: #ffffff !important;
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #dc2626
        ) !important;
    box-shadow:
        0 9px 22px rgba(220, 38, 38, 0.2) !important;
}

.app-dialog-confirm.is-danger:hover {
    background:
        linear-gradient(
            135deg,
            #f87171,
            #dc2626
        ) !important;
    box-shadow:
        0 12px 28px rgba(220, 38, 38, 0.28) !important;
}

/* 警告确认按钮 */

.app-dialog-confirm.is-warning {
    color: #ffffff !important;
    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #d97706
        ) !important;
    box-shadow:
        0 9px 22px rgba(217, 119, 6, 0.2) !important;
}

.app-dialog-confirm.is-warning:hover {
    background:
        linear-gradient(
            135deg,
            #fbbf24,
            #d97706
        ) !important;
    box-shadow:
        0 12px 28px rgba(217, 119, 6, 0.28) !important;
}

/* 按钮焦点 */

.app-dialog-button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.22) !important;
    outline-offset: 3px !important;
}

/* 手机端保持白色半透明效果 */

@media (max-width: 520px) {
    .app-dialog-overlay {
        background: rgba(148, 163, 184, 0.18) !important;
    }

    .app-dialog-box {
        border-color: rgba(255, 255, 255, 0.95) !important;
        background:
            linear-gradient(
                160deg,
                rgba(255, 255, 255, 0.97),
                rgba(248, 250, 252, 0.91)
            ) !important;
        box-shadow:
            0 -12px 45px rgba(15, 23, 42, 0.14),
            0 20px 60px rgba(15, 23, 42, 0.12) !important;
    }
}
/* =========================================================
   网站白色半透明主题
   不修改 app-dialog 和 app-modal 弹窗
   ========================================================= */

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #0284c7;
    --success: #16a34a;
    --danger: #dc2626;
    --danger-dark: #b91c1c;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-strong: rgba(255, 255, 255, 0.94);
    --glass-border: rgba(255, 255, 255, 0.86);
    --glass-border-hover: rgba(99, 102, 241, 0.3);

    --input-bg: rgba(255, 255, 255, 0.72);
    --input-border: rgba(148, 163, 184, 0.35);

    --shadow:
        0 24px 60px rgba(15, 23, 42, 0.1),
        0 8px 24px rgba(15, 23, 42, 0.07);

    --shadow-small:
        0 12px 30px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   页面基础
   ========================================================= */

html {
    color-scheme: light;
}

body {
    color: var(--text);
    background: #eef4ff;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary-dark);
}

a:hover {
    color: #3730a3;
}

::selection {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.75);
}


/* =========================================================
   浅色渐变背景
   ========================================================= */

.bg {
    background:
        radial-gradient(
            circle at 12% 16%,
            rgba(129, 140, 248, 0.3),
            transparent 34%
        ),
        radial-gradient(
            circle at 88% 18%,
            rgba(56, 189, 248, 0.25),
            transparent 32%
        ),
        radial-gradient(
            circle at 76% 82%,
            rgba(196, 181, 253, 0.28),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #f8faff 0%,
            #eef4ff 46%,
            #f5f3ff 100%
        );
}

.bg::before {
    background: #a5b4fc;
    opacity: 0.32;
}

.bg::after {
    background: #67e8f9;
    opacity: 0.27;
}


/* =========================================================
   白色透明玻璃容器
   ========================================================= */

.glass {
    border-color: var(--glass-border);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.82),
            rgba(255, 255, 255, 0.62)
        );
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.panel,
.auth-box,
.sidebar,
.stat,
.preview-box {
    color: var(--text);
}


/* =========================================================
   标题和说明文字
   ========================================================= */

h1,
h2,
h3 {
    color: #0f172a;
}

.auth-box > p,
.panel-head p,
.upload-section-head p {
    color: var(--text-muted);
}


/* =========================================================
   表单
   ========================================================= */

label {
    color: #334155;
}

input,
textarea,
select {
    color: var(--text);
    border-color: var(--input-border);
    background: var(--input-bg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input::placeholder,
textarea::placeholder {
    color: rgba(100, 116, 139, 0.62);
}

input:hover,
textarea:hover,
select:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.86);
}

input:focus,
textarea:focus,
select:focus {
    color: #0f172a;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

select option {
    color: #0f172a;
    background: #ffffff;
}

input[type="file"] {
    color: #475569;
    background: rgba(255, 255, 255, 0.78);
}

input[type="file"]::file-selector-button {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );
}

input[type="checkbox"] {
    accent-color: var(--primary);
}


/* =========================================================
   按钮
   ========================================================= */

.btn,
.small-btn {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );
    box-shadow:
        0 8px 20px rgba(79, 70, 229, 0.2);
}

.btn:hover,
.small-btn:hover {
    color: #ffffff;
    box-shadow:
        0 12px 26px rgba(79, 70, 229, 0.28);
}

.btn.secondary {
    color: #334155;
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.7);
    box-shadow:
        0 5px 14px rgba(15, 23, 42, 0.05);
}

.btn.secondary:hover {
    color: #0f172a;
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.08);
}

.small-btn.danger,
.btn.danger {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--danger),
            var(--danger-dark)
        );
}


/* =========================================================
   侧边栏
   ========================================================= */

.sidebar {
    border-color: rgba(255, 255, 255, 0.88);
    background:
        linear-gradient(
            160deg,
            rgba(255, 255, 255, 0.82),
            rgba(248, 250, 252, 0.64)
        );
}

.sidebar h2 {
    color: #0f172a;
}

.sidebar > a,
.sidebar-logout {
    color: #475569;
}

.sidebar > a:hover,
.sidebar-logout:hover {
    color: #0f172a;
    border-color: rgba(99, 102, 241, 0.12);
    background: rgba(255, 255, 255, 0.7);
}

.sidebar > a.active {
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.18);
    background:
        linear-gradient(
            135deg,
            rgba(238, 242, 255, 0.96),
            rgba(224, 231, 255, 0.72)
        );
    box-shadow:
        0 6px 16px rgba(99, 102, 241, 0.08);
}

.sidebar-logout-form {
    border-top-color: rgba(148, 163, 184, 0.2);
}

.sidebar-logout {
    color: #dc2626;
}

.sidebar-logout:hover {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.14);
    background: rgba(254, 226, 226, 0.58);
}


/* =========================================================
   上传区域
   ========================================================= */

.upload-section {
    border-color: rgba(99, 102, 241, 0.14);
    background:
        linear-gradient(
            145deg,
            rgba(238, 242, 255, 0.75),
            rgba(240, 249, 255, 0.65)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 22px rgba(15, 23, 42, 0.04);
}

.upload-section-head h2 {
    color: #0f172a;
}

.upload-section-head p {
    color: #64748b;
}

.upload-progress {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.64);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.upload-progress-text {
    color: #475569;
}

.upload-progress-percent {
    color: #4f46e5;
}

.upload-progress-track {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(148, 163, 184, 0.18);
}

.upload-progress.is-uploading {
    border-color: rgba(99, 102, 241, 0.32);
    background: rgba(238, 242, 255, 0.78);
}

.upload-progress.is-success {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(240, 253, 244, 0.82);
}

.upload-progress.is-success .upload-progress-text {
    color: #166534;
}

.upload-progress.is-success .upload-progress-percent {
    color: #15803d;
}

.upload-progress.is-error {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(254, 242, 242, 0.86);
}

.upload-progress.is-error .upload-progress-text {
    color: #991b1b;
}

.upload-progress.is-error .upload-progress-percent {
    color: #dc2626;
}


/* =========================================================
   通知
   ========================================================= */

.notice {
    color: #3730a3;
    border-color: rgba(99, 102, 241, 0.2);
    background:
        linear-gradient(
            135deg,
            rgba(238, 242, 255, 0.88),
            rgba(224, 231, 255, 0.58)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}


/* =========================================================
   文件卡片
   ========================================================= */

.file-card {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.82),
            rgba(248, 250, 252, 0.66)
        );
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.file-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.96),
            rgba(248, 250, 252, 0.82)
        );
    box-shadow:
        0 18px 38px rgba(15, 23, 42, 0.1);
}

.file-card h3 {
    color: #0f172a;
}

.file-card p {
    color: #64748b;
}

.file-icon {
    color: #ffffff;
    box-shadow:
        0 10px 22px rgba(79, 70, 229, 0.2);
}

.empty {
    color: #64748b;
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(255, 255, 255, 0.46);
}


/* =========================================================
   统计卡片
   ========================================================= */

.stat {
    border-color: rgba(255, 255, 255, 0.86);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.82),
            rgba(248, 250, 252, 0.64)
        );
}

.stat b {
    color: #0f172a;
}

.stat span {
    color: #64748b;
}


/* =========================================================
   表格
   ========================================================= */

.table-wrap {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

table {
    color: #475569;
}

th,
td {
    border-bottom-color: rgba(148, 163, 184, 0.17);
}

th {
    color: #1e293b;
    background: rgba(248, 250, 252, 0.97);
    box-shadow:
        0 1px 0 rgba(148, 163, 184, 0.15);
}

td {
    color: #475569;
}

tbody tr {
    background: transparent;
}

tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.38);
}

tbody tr:hover {
    background: rgba(238, 242, 255, 0.7);
}


/* =========================================================
   文件预览
   ========================================================= */

.preview-content {
    border-color: rgba(148, 163, 184, 0.2);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.78),
            rgba(248, 250, 252, 0.62)
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.preview-content iframe {
    background: #ffffff;
}

.preview-content video {
    background: #0f172a;
}


/* =========================================================
   页脚
   ========================================================= */

footer {
    color: #64748b;
}


/* =========================================================
   滚动条
   ========================================================= */

* {
    scrollbar-width: thin;
    scrollbar-color:
        rgba(99, 102, 241, 0.35)
        rgba(148, 163, 184, 0.12);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background:
        rgba(99, 102, 241, 0.35);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background:
        rgba(79, 70, 229, 0.5);
    background-clip: padding-box;
}


/* =========================================================
   焦点状态
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline-color: rgba(99, 102, 241, 0.36);
}


/* =========================================================
   不支持毛玻璃时的兼容背景
   ========================================================= */

@supports not (
    (backdrop-filter: blur(10px)) or
    (-webkit-backdrop-filter: blur(10px))
) {
    .glass {
        background: rgba(255, 255, 255, 0.95);
    }

    .sidebar,
    .panel,
    .auth-box,
    .stat,
    .preview-box {
        background: rgba(255, 255, 255, 0.95);
    }
}