/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%);
    color: #1a2634;
    line-height: 1.5;
    padding-top: 76px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

/* ========== 导航栏 ========== */
.navbar {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.navbar-subtitle {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 400;
    border-left: 1px solid #e2e8f0;
    padding-left: 0.8rem;
}

.nav-link {
    font-weight: 500;
    color: #334155 !important;
    transition: 0.3s;
}

.nav-link:hover {
    color: #2563eb !important;
}

/* ========== 卡片样式 ========== */
.card-custom {
    background: white;
    border-radius: 28px;
    border: none;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: visible;
}

.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 40px -14px rgba(0,0,0,0.12);
}

.card-header-custom {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-bottom: 1px solid #eef2f6;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-custom h3 {
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0;
    color: #0f172a;
}

.card-body-custom {
    padding: 1.5rem;
}

.principle-footer {
    background: linear-gradient(135deg, #f1f5f9, #f8fafc);
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 28px 28px;
    padding: 1rem 1.5rem;
    margin-top: auto;
}

.principle-footer h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.principle-footer p {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 0;
    line-height: 1.5;
}

/* ========== 表单元素 ========== */
.form-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-control, .input-group-text, .form-select {
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: 0.2s;
}

.input-group-text {
    background-color: #f8fafc;
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
    z-index: 1;
}

/* ========== 按钮 ========== */
.btn-primary-custom {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: none;
    border-radius: 40px;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.35);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.btn-primary-custom:disabled {
    opacity: 0.65;
    transform: none;
}

.btn-outline-secondary, .btn-outline-danger {
    border-radius: 40px;
    padding: 0.7rem 1rem;
    font-weight: 500;
}

/* ========== 进度条 ========== */
.progress-wrapper {
    background: #f1f5f9;
    border-radius: 60px;
    padding: 0.2rem;
}

.progress {
    height: 10px;
    border-radius: 60px;
    background-color: #e2e8f0;
}

.progress-bar {
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 60px;
    transition: width 0.3s ease;
    line-height: 10px;
    color: white;
    font-size: 0.6rem;
}

/* ========== 日志区域 ========== */
.log-area {
    background: #0f172a;
    border-radius: 20px;
    padding: 0.8rem;
    overflow-y: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    flex: 1;
    min-height: 200px;
    max-height: 400px;   /* 控制最大高度，超出滚动 */
}

.log-line {
    color: #94a3b8;
    border-left: 3px solid #2563eb;
    padding-left: 0.8rem;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.fail-count {
    color: #ef4444;
    font-weight: 600;
}

.intro-text h5 {
    font-weight: 600;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    color: #0f172a;
    font-size: 1rem;
}

.intro-text p, .intro-text ul {
    color: #334155;
    line-height: 1.5;
    font-size: 0.85rem;
}

.intro-text code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.footer {
    background: white;
    border-top: 1px solid #eef2f6;
    padding: 1.5rem 0;
    text-align: center;
    color: #64748b;
    margin-top: 2rem;
    font-size: 0.8rem;
}

.footer a {
    color: #2563eb;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    .card-body-custom {
        padding: 1rem;
    }
    .card-header-custom {
        padding: 1rem;
    }
    .navbar-subtitle {
        display: none;
    }
    .btn-outline-secondary, .btn-outline-danger {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}