/* 便民工具网 - 前端样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 15px 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333 !important;
}

.navbar-brand i {
    margin-right: 8px;
}

.navbar-nav .nav-link {
    color: #666 !important;
    font-size: 17px;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #007bff !important;
}

.navbar-nav .nav-item.active .nav-link {
    color: #007bff !important;
    font-weight: 500;
}

/* 二级菜单（Mega Dropdown）样式 */
.mega-dropdown {
    position: static;
}

.mega-dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    padding: 20px 0;
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 0;
}

.mega-dropdown-column {
    padding: 10px;
}

.mega-category-link {
    display: block;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    color: #333 !important;
    border: 1px solid #e9ecef;
}

.mega-category-link:hover {
    background: #007bff;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
    text-decoration: none;
}

.mega-category-link i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.mega-category-link span {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

/* 响应式：移动端 */
@media (max-width: 768px) {
    .mega-dropdown-menu {
        position: relative !important;
        width: 100%;
        box-shadow: none;
        border: 1px solid #e9ecef;
        margin-top: 10px;
    }

    .mega-dropdown-column {
        padding: 5px;
    }

    .mega-category-link {
        padding: 10px;
    }

    .mega-category-link i {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .mega-category-link span {
        font-size: 12px;
    }
}

/* 主体内容 */
.main-content {
    min-height: calc(100vh - 200px);
    padding-top: 20px;
    padding-bottom: 10px;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2px 0 10px;
    margin-top: 10px;
}

.footer h5 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

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

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

.footer ul li a {
    color: #bdc3c7;
    transition: all 0.3s ease;
}

.footer ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer hr {
    border-color: rgba(255,255,255,0.1);
    margin: 30px 0 20px;
}

.footer .text-muted {
    color: #95a5a6 !important;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 表单样式 */
.form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

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

/* 徽章样式 */
.badge {
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

.badge-danger {
    background-color: #dc3545;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-primary {
    background-color: #007bff;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
}

.pagination .page-link {
    color: #667eea;
    border: 1px solid #ddd;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination .page-link:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 15px 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #999;
}

.breadcrumb-item a {
    color: #666;
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .tool-card {
        margin-bottom: 15px;
    }
    
    .stat-item .stat-number {
        font-size: 2rem !important;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-md-3 {
        margin-bottom: 30px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px 0;
}

.loading i {
    font-size: 3rem;
    color: #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示信息 */
.alert {
    border-radius: 5px;
    border: none;
    padding: 15px 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

