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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

.site-header {
    position: relative;
}

.compact-header {
    margin-bottom: 20px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.brand-block {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #13315c;
    line-height: 1;
}

.brand-sub {
    margin-top: 4px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7a90;
}

.hero-copy {
    text-align: center;
}

.lang-switch {
    border: none;
    background: linear-gradient(135deg, #1f6feb, #0ea5e9);
    color: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(31, 111, 235, 0.26);
}

.home-anchor {
    color: inherit;
    text-decoration: none;
}

.floating-feedback {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 192px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    padding: 14px;
    z-index: 9999;
    text-align: center;
    backdrop-filter: blur(8px);
}

.floating-feedback-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f6feb;
    margin-bottom: 10px;
}

.floating-feedback-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e5edf5;
    display: block;
    margin-bottom: 10px;
}

body.lang-en .floating-feedback-img {
    display: none;
}

.floating-feedback-text {
    font-size: 12px;
    color: #667085;
    line-height: 1.6;
    margin-bottom: 10px;
}

.floating-feedback-link {
    display: inline-block;
    width: 100%;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 10px;
    background: #1f6feb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 20px;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.subtitle {
    color: #667085;
    font-size: 15px;
    line-height: 1.8;
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 30px 0;
}

.hero-note {
    background: linear-gradient(135deg, #f7fbff, #eef6ff);
    border: 1px solid #d9ebff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.hero-note-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f6feb;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.hero-note p {
    font-size: 14px;
    color: #475467;
    line-height: 1.8;
}

.status-bar {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-bar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-online .dot {
    background: #4caf50;
}

.status-offline {
    background: #fff3e0;
    color: #e65100;
}

.status-offline .dot {
    background: #ff9800;
}

.upload-area {
    border: 2px dashed #c0c4cc;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: #fff;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #409eff;
    background: #ecf5ff;
}

.upload-icon {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
    color: #1f6feb;
}

.upload-area p {
    color: #606266;
    margin: 4px 0;
}

.link {
    color: #409eff;
    cursor: pointer;
    text-decoration: underline;
}

.hint {
    font-size: 12px;
    color: #909399;
    margin-top: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e4e7ed;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #409eff, #67c23a);
    border-radius: 4px;
    transition: width .3s;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #606266;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    margin-top: 20px;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.query-code {
    font-size: 32px;
    font-weight: bold;
    color: #409eff;
    letter-spacing: 3px;
    padding: 16px;
    background: #f0f7ff;
    border-radius: 8px;
    margin: 16px 0;
    user-select: all;
    font-family: 'Consolas', 'Courier New', monospace;
}

.result-link {
    color: #409eff;
    word-break: break-all;
    font-size: 14px;
}

.how-it-works {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.how-it-works h2 {
    font-size: 22px;
    color: #303133;
    margin-bottom: 10px;
    text-align: center;
}

.how-intro {
    font-size: 15px;
    color: #606266;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.8;
}

.how-intro strong {
    color: #409eff;
}

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

.explain-grid-final {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.explain-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #e8ecf1;
}

.explain-card-highlight {
    border: 2px solid #67c23a;
    background: #f0f9eb;
}

.demo-label {
    font-size: 13px;
    font-weight: 600;
    color: #409eff;
    margin-bottom: 8px;
    text-align: center;
}

.demo-label-gray {
    color: #909399;
}

.explain-card-highlight .demo-label {
    color: #67c23a;
}

.demo-img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #e4e7ed;
    display: block;
}

.demo-desc {
    font-size: 13px;
    color: #667085;
    text-align: center;
    margin-top: 8px;
    line-height: 1.7;
}

.flow-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 18px;
    color: #1f6feb;
    font-size: 14px;
    font-weight: 700;
}

.flow-plus,
.flow-arrow {
    color: #98a2b3;
}

.output-note {
    background: #fafafa;
    border-radius: 8px;
    padding: 14px 16px;
    border-left: 3px solid #409eff;
}

.output-note p {
    font-size: 13px;
    color: #606266;
    margin: 0 0 4px;
    line-height: 1.7;
}

.note-detail {
    font-size: 12px !important;
    color: #909399 !important;
    padding-left: 4px;
}

.query-section {
    text-align: center;
}

.query-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #303133;
}

.query-form {
    display: flex;
    gap: 8px;
    max-width: 360px;
    margin: 0 auto;
}

.query-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: 1px;
}

.query-form input:focus {
    border-color: #409eff;
}

.query-form button {
    padding: 10px 24px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}

.query-form button:hover {
    background: #3a8ee6;
}

.status-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    border-left: 4px solid #f0ad4e;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.status-icon {
    font-size: 32px;
}

.status-text {
    font-size: 22px;
    font-weight: bold;
}

.task-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f2f6fc;
}

.detail-row .label {
    color: #909399;
    font-size: 14px;
}

.detail-row .value {
    color: #303133;
    font-size: 14px;
    font-weight: 500;
}

.download-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 40px;
    background: #67c23a;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: background .2s;
}

.download-btn:hover {
    background: #5daf34;
}

.error-msg {
    margin-top: 20px;
    padding: 14px;
    background: #fef0f0;
    border-radius: 8px;
    color: #f56c6c;
    font-size: 14px;
}

.result-tip {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e6edf5;
    color: #667085;
    font-size: 13px;
    line-height: 1.7;
}

.error-card {
    border-left-color: #d9534f;
    text-align: center;
}

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: #409eff;
}

.admin-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 160px minmax(220px, 1fr) 120px;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-toolbar input,
.admin-toolbar select,
.admin-toolbar button {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    font-size: 14px;
}

.admin-toolbar button {
    background: #1f6feb;
    color: #fff;
    border: none;
    cursor: pointer;
}

.admin-message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.admin-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-message.error {
    background: #fef0f0;
    color: #d32f2f;
}

.admin-table-wrap {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    overflow: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.admin-table th {
    color: #667085;
    background: #f8fafc;
    font-weight: 600;
}

.empty-cell {
    text-align: center;
    color: #98a2b3;
    padding: 28px 12px;
}

.mono-cell {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
}

.file-cell {
    font-weight: 600;
    margin-bottom: 6px;
    word-break: break-word;
}

.muted-row {
    color: #98a2b3;
    font-size: 12px;
    word-break: break-word;
}

.actions-cell {
    white-space: nowrap;
}

.table-btn,
.table-link {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: #e8f0fe;
    color: #1d4ed8;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

.table-btn.danger {
    background: #fde8e8;
    color: #c62828;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-queued {
    background: #fff4e5;
    color: #b26a00;
}

.status-processing {
    background: #e8f1ff;
    color: #1f6feb;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-failed,
.status-expired {
    background: #fef0f0;
    color: #d32f2f;
}

@media (max-width: 900px) {
    .container {
        padding: 28px 16px 40px;
    }

    .explain-grid,
    .explain-grid-final,
    .admin-toolbar {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .floating-feedback {
        position: static;
        width: auto;
        margin: 14px 16px 0;
    }

    .topbar {
        flex-direction: column;
        align-items: center;
    }

    .brand-block {
        align-items: center;
    }
}
