/* ==================== 全局重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand .logo {
    font-size: 24px;
}

.navbar-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.navbar-links a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-links a:hover {
    background: #f0f0f5;
    color: #667eea;
}

.navbar-links a.active {
    background: #667eea;
    color: #fff;
}

/* ==================== 容器 ==================== */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ==================== 卡片 ==================== */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a2e;
}

.card-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group label .text-muted {
    color: #999;
    font-size: 0.85em;
    font-weight: normal;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e8;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    background: #fafafe;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.form-control::placeholder {
    color: #bbb;
}

/* ==================== 验证码行 ==================== */
.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-row .form-control {
    flex: 1;
}

.captcha-img {
    height: 48px;
    width: 160px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #e0e0e8;
    background: #f0f0f5;
    flex-shrink: 0;
}

.captcha-img:hover {
    border-color: #667eea;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f0f5;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e8;
}

.btn-block {
    width: 100%;
}

/* ==================== 消息提示 ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ==================== 步骤指示器 ==================== */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e0e0e8;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e8;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
}

.step.active .step-circle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.step.done .step-circle {
    background: #28a745;
    color: #fff;
}

.step-label {
    font-size: 13px;
    color: #888;
}

.step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

/* ==================== 验证码输入区 ==================== */
.code-section {
    display: none;
}

.code-section.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ==================== 表格 ==================== */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f8fc;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

tr:hover {
    background: #fafafe;
}

/* ==================== 标签 ==================== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-info    { background: #d1ecf1; color: #0c5460; }

/* ==================== 首页 ==================== */
.hero {
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero-actions .btn {
    padding: 14px 32px;
    font-size: 16px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    color: #fff;
}

.feature-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    opacity: 0.85;
}

/* ==================== JSON 展示 ==================== */
.json-display {
    background: #1e1e2e;
    color: #a6e3a1;
    padding: 16px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
}

/* ==================== 响应式 ==================== */
@media (max-width: 600px) {
    .card { padding: 24px; }
    .navbar { padding: 0 16px; }
    .navbar-links { gap: 4px; }
    .navbar-links a { padding: 6px 10px; font-size: 13px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
