/* 简洁实用的工具站样式 */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --border: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

/* ========== 导航栏 ========== */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--primary) !important;
}

.navbar-nav .nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

/* ========== Hero 区域 ========== */
.hero-section {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 80px 0;
    color: white;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.gradient-text {
    color: #fbbf24;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-section .btn {
    padding: 12px 30px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 6px;
    margin: 5px;
}

.hero-section .btn-primary {
    background: #ffffff;
    color: var(--primary);
    border: none;
}

.hero-section .btn-primary:hover {
    background: #f3f4f6;
}

.hero-section .btn-outline-light {
    border: 2px solid #ffffff;
    background: transparent;
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-icon {
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ========== 工具区域 ========== */
#tools {
    padding: 80px 0;
    background: #f9fafb;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* ========== 工具卡片 ========== */
.tool-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    height: 100%;
    transition: all 0.2s;
    margin-bottom: 30px;
}

.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-icon i {
    font-size: 28px;
    color: white;
}

.tool-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.tool-card p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.tool-card .btn {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* ========== 特性区域 ========== */
.features-section {
    padding: 80px 0;
    background: #ffffff;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gray-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 32px;
    color: var(--primary);
}

.feature-item h5 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.feature-item p {
    color: var(--gray);
}

/* ========== 统计数据 ========== */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.stat-card .number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--gray);
    font-size: 1rem;
    margin: 0;
}

/* ========== 页脚 ========== */
.footer {
    background: #f9fafb;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark);
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary);
}

.footer .text-muted {
    color: var(--gray) !important;
}

/* ========== 工具页面 ========== */
.tool-page {
    background: #f9fafb;
    min-height: 100vh;
}

.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    margin-top: 40px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.tool-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.tool-header p {
    font-size: 1.1rem;
    color: var(--gray);
}

/* ========== 表单元素 ========== */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 200px;
    font-family: 'Courier New', monospace;
}

/* ========== 按钮组 ========== */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--gray);
    color: var(--gray);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gray);
    color: white;
}

/* ========== 卡片 ========== */
.card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.card-body {
    padding: 20px;
}

/* ========== 警告框 ========== */
.alert {
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.25rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .hero-icon {
        font-size: 8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tool-container {
        padding: 25px 20px;
        margin: 20px;
    }

    .tool-header h1 {
        font-size: 1.75rem;
    }

    .stat-card .number {
        font-size: 2.5rem;
    }
}

/* ========== 辅助类 ========== */
.animate-fade-in {
    animation: fadeIn 0.4s ease;
}

.animate-fade-in-delay {
    animation: fadeIn 0.4s ease 0.1s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.4s ease 0.2s both;
}

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

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

/* ========== 输入组 ========== */
.input-group .btn {
    border-radius: 0 6px 6px 0;
}

.input-group .form-control {
    border-radius: 6px 0 0 6px;
}

/* ========== 列表组 ========== */
.list-group-item {
    border: 1px solid var(--border);
    padding: 12px 16px;
}

.list-group-item:hover {
    background: var(--gray-light);
}

/* ========== 表格 ========== */
.table {
    width: 100%;
}

.table th {
    background: var(--gray-light);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.table td,
.table th {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.table-sm td,
.table-sm th {
    padding: 8px;
}

/* ========== Toast 提示样式 ========== */
.toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

.toast-header {
    border-bottom: none;
    font-weight: 600;
}

.toast-body {
    padding: 16px;
    font-size: 0.95rem;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

/* Toast 动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

#toast-container .toast {
    animation: slideInRight 0.3s ease-out;
}