/* ===== 智慧中国杂志社 - H5 样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* 顶部标题栏 */
.header {
    background: #fff;
    color: #c0392b;
    padding: 30px 20px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.header::before {
    content: none;
}

.header h1 {
    font-size: 0;
    font-weight: normal;
    letter-spacing: 0;
    position: relative;
    color: transparent;
}

.header .sub-title {
    display: inline-block;
    font-size: 13px;
    margin-top: 10px;
    position: relative;
    letter-spacing: 4px;
    padding: 5px 18px;
    background: linear-gradient(135deg, #fdf0ee 0%, #fce6e3 100%);
    border-radius: 20px;
    border: 1px solid #f5d5d0;
    color: #c0392b;
    font-weight: 500;
}

/* 导航 Tab */
.tab-bar {
    display: flex;
    background: #c0392b;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.2);
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-item.active {
    color: #fff;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* 主容器 */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-left: 10px;
    border-left: 3px solid #c0392b;
}

/* 表单 */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #c0392b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    position: relative;
}

.file-upload:hover,
.file-upload:active {
    border-color: #c0392b;
    background: #fff9f9;
}

.file-upload .upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: #c0392b;
}

.file-upload .upload-text {
    font-size: 14px;
    color: #666;
}

.file-upload .upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-info {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fff9f9;
    border: 1px solid #fadbd8;
    border-radius: 6px;
    display: none;
}

.file-info.show {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info .file-name {
    font-size: 13px;
    color: #c0392b;
    word-break: break-all;
    flex: 1;
}

.file-info .file-remove {
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

/* 按钮 */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    letter-spacing: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: #fff;
    color: #c0392b;
    border: 1px solid #c0392b;
}

/* 状态结果 */
.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item .label {
    width: 90px;
    color: #888;
    font-size: 14px;
    flex-shrink: 0;
}

.status-item .value {
    flex: 1;
    color: #333;
    font-size: 14px;
    word-break: break-all;
}

/* 成功页面 */
.success-wrapper {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-wrapper h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.success-wrapper p {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

.query-code-box {
    background: linear-gradient(135deg, #fff9f9, #fef5f5);
    border: 2px dashed #e74c3c;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.query-code-label {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.query-code-value {
    font-size: 28px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: 4px;
    font-family: "Courier New", monospace;
    user-select: all;
}

.tip-text {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    line-height: 1.8;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    animation: fadeIn 0.3s;
    max-width: 80%;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Loading */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* 分割线 */
.divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

/* 底部版权 */
.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
    line-height: 1.8;
}

.footer a {
    color: #c0392b;
    text-decoration: none;
}

/* 文件下载链接 */
.file-download {
    display: inline-flex;
    align-items: center;
    color: #c0392b;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    background: #fff9f9;
    border-radius: 6px;
    margin-top: 10px;
}

.file-download:active {
    background: #fadbd8;
}
