:root {
    /* 浅青绿色 / 玻璃感主题 */
    --bg-color:
        radial-gradient(circle at 15% 10%, rgba(209, 234, 237, 0.8) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(186, 222, 226, 0.6) 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(230, 246, 248, 0.7) 0%, transparent 45%),
        linear-gradient(135deg, #f0f8f9 0%, #d1eaed 100%);

    --panel-bg: rgba(255, 255, 255, 0.75);
    --surface-bg: rgba(245, 252, 254, 0.76);
    --surface-bg-soft: rgba(245, 252, 254, 0.52);
    --surface-bg-hover: rgba(235, 248, 250, 0.75);
    --border-color: rgba(144, 194, 199, 0.25);

    --text-primary: #2d4a4e;
    --text-secondary: #65898e;
    --text-muted: rgba(101, 137, 142, 0.72);

    --primary-color: #6bb3b9;
    --primary-hover: #569ea4;
    --primary-active: #45848a;
    --primary-light: rgba(107, 179, 185, 0.1);

    --success-color: #6fb98f;
    --error-color: #d97575;

    --radius-lg: 16px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[v-cloak],
.hidden {
    display: none !important;
}

body {
    min-height: 100vh;
    height: 100%;
    overflow: hidden;
    color: var(--text-primary);
    background: var(--bg-color);
    background-attachment: fixed;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem;
}

.auth-locked .header,
.auth-locked .main-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.72), transparent 34%),
        rgba(220, 241, 243, 0.42);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-modal {
    width: min(420px, 100%);
    padding: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 28px 70px rgba(45, 74, 78, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
    text-align: center;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1rem;
    border: 1px solid rgba(107, 179, 185, 0.22);
    border-radius: 50%;
    color: var(--primary-color);
    background: rgba(245, 252, 254, 0.78);
    box-shadow: 0 14px 28px rgba(107, 179, 185, 0.16);
}

.auth-badge .el-icon {
    font-size: 1.55rem;
}

.auth-modal h2 {
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 1.6rem;
    letter-spacing: 0;
}

.auth-modal p {
    margin-bottom: 1.35rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 1px solid rgba(144, 194, 199, 0.36);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    background: rgba(245, 252, 254, 0.82);
    font: inherit;
    transition: var(--transition);
}

.auth-input::placeholder {
    color: rgba(101, 137, 142, 0.58);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 3px rgba(107, 179, 185, 0.18);
}

.auth-error {
    min-height: 1.2rem;
    color: var(--error-color);
    font-size: 0.86rem;
    text-align: left;
}

.auth-submit {
    width: 100%;
    height: 46px;
    margin-top: 0.1rem;
    padding: 0;
}

.main-content {
    width: 100%;
}

.full-width {
    width: 100%;
}

.header {
    margin-bottom: 2rem;
    text-align: center;
}

.title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 50% 50% 50% 0;
    box-shadow:
        0 14px 28px rgba(107, 179, 185, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.logo-icon .el-icon {
    font-size: 24px;
}

h1 {
    margin-bottom: 0;
    color: #7b8b99;
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

h4 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 999px;
    color: var(--text-secondary);
    background: transparent;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn .el-icon {
    font-size: 1rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(240, 250, 252, 0.55);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #81c4ca, var(--primary-hover));
    box-shadow: 0 8px 20px rgba(107, 179, 185, 0.22);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--panel-bg);
    box-shadow:
        0 24px 60px rgba(45, 74, 78, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.grid-2,
#tab-single .panel.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

#tab-single .panel {
    height: 680px;
}

#tab-single .notice {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

#tab-zip .panel {
    display: flex;
    flex-direction: column;
    height: 680px;
    overflow: hidden;
}

#tab-zip .table-container {
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(144, 194, 199, 0.22);
    border-radius: 12px;
    color: var(--text-primary);
    background: rgba(245, 252, 254, 0.48);
    cursor: pointer;
}

.radio-group input {
    accent-color: var(--primary-color);
}

.text-input,
.text-area {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: var(--surface-bg);
    font-family: inherit;
    transition: var(--transition);
}

.text-input {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
}

.text-area {
    height: 120px;
    padding: 1rem;
    border-radius: 12px;
    resize: vertical;
}

.text-input::placeholder {
    color: rgba(101, 137, 142, 0.65);
}

.text-input:focus,
.text-area:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(245, 252, 254, 0.92);
    box-shadow: 0 0 0 3px rgba(107, 179, 185, 0.18);
}

.file-drop-area {
    position: relative;
    padding: 1rem;
    border: 2px dashed rgba(107, 179, 185, 0.35);
    border-radius: var(--radius-md);
    background: var(--surface-bg-soft);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--primary-color);
    background: var(--surface-bg-hover);
    box-shadow: 0 14px 32px rgba(107, 179, 185, 0.12);
}

.file-drop-area.file-selected {
    border-style: solid;
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 4px 16px rgba(107, 179, 185, 0.15);
}

.file-drop-area.file-selected .drop-text {
    color: var(--primary-color);
    font-weight: 600;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    pointer-events: none;
}

.drop-content .el-icon {
    color: var(--primary-color);
    font-size: 1.75rem;
}

.drop-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.drop-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.file-name-display {
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #81c4ca, var(--primary-hover));
    box-shadow: 0 10px 24px rgba(107, 179, 185, 0.24);
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-active));
    box-shadow: 0 14px 28px rgba(107, 179, 185, 0.28);
    transform: translateY(-1px);
}

.primary-btn:disabled {
    color: rgba(255, 255, 255, 0.8);
    background: #b4cacc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.action-btn {
    display: block;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    height: 44px;
    flex-shrink: 0;
    margin: 0 auto;
    padding: 0;
}

.sm-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(107, 179, 185, 0.45);
    color: var(--primary-color);
    background-color: var(--primary-light);
    font-size: 0.875rem;
    text-decoration: none;
}

.sm-btn:hover {
    color: #ffffff;
    background-color: var(--primary-color);
}

.result-box {
    margin-bottom: 1.5rem;
}

.result-box h4 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.result-box h4 .el-icon {
    color: var(--primary-color);
    font-size: 1rem;
}

.code-block {
    width: 100%;
    height: 300px;
    padding: 1rem;
    overflow: auto;
    overflow-wrap: anywhere;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #d6f2f5;
    background: #2c3b3e;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
}

.notice {
    margin-bottom: 1.5rem;
    padding: 0.6rem 0 0.6rem 1rem;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    background: rgba(245, 252, 254, 0.42);
    font-size: 0.9rem;
}

.batch-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1rem;
}

.batch-controls .form-group {
    flex: 1;
    margin-bottom: 0;
}

.batch-controls .btn {
    width: auto;
}

.progress-section {
    margin-bottom: 1rem;
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

#local-status-text,
#zip-status-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-bar-container {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(90, 140, 145, 0.12);
}

.progress-bar {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(to right, #77d1b3, #81c4ca);
    transition: width 0.3s ease;
}

.table-container {
    position: relative;
    max-height: 330px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(245, 252, 254, 0.58);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: center;
}

.data-table th,
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--text-secondary);
    background: linear-gradient(180deg, rgba(244, 253, 254, 0.98), rgba(232, 248, 250, 0.98));
    background-clip: padding-box;
    box-shadow:
        inset 0 -1px 0 var(--border-color),
        0 6px 12px rgba(45, 74, 78, 0.08);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    word-break: keep-all;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(107, 179, 185, 0.06);
}

.empty-row {
    color: var(--text-secondary);
    text-align: center;
}

.status-ok {
    color: var(--success-color);
    font-weight: 600;
}

.status-err {
    color: var(--error-color);
    font-weight: 600;
}

.el-button,
.el-input__wrapper,
.el-textarea__inner {
    font-family: inherit;
}

/* 临时隐藏批量测试：需要隐藏时取消下面注释 */
/* .tab-btn[data-target="tab-zip"],
#tab-zip {
    display: none !important;
} */

@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }

    .auth-modal {
        padding: 1.65rem;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .tabs {
        gap: 1rem;
        margin-bottom: 1.2rem;
    }

    .panel {
        padding: 1.4rem;
    }

    #tab-single .panel.grid-2 {
        grid-template-columns: 1fr 1.5fr;
        gap: 1.2rem;
        height: 680px;
    }

    #tab-single .notice {
        grid-column: 1 / -1;
    }

    .file-drop-area {
        padding: 2rem 1rem;
    }

    .drop-text {
        white-space: normal;
        word-break: keep-all;
    }

    .text-area {
        height: 120px;
    }

    .code-block {
        height: 300px;
    }
}
