/* 通用样式，抽取自 index.html 供各工具页复用 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #28a745;
    text-decoration: none;
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: #f8f9fa;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #28a745;
    background: white;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 面包屑导航 - 水平布局，位置左移 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb-item {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.25rem 0;
}

.breadcrumb-item:hover {
    color: #28a745;
}

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

.breadcrumb-separator {
    color: #adb5bd;
    font-size: 0.8rem;
    user-select: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.category-tab:hover {
    border-color: #28a745;
    color: #28a745;
}

.category-tab.active {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #28a745;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.card-icon.json {
    background: #fff5f5;
    color: #e53e3e;
}

.card-icon.timestamp {
    background: #fffaf0;
    color: #dd6b20;
}

.card-icon.timeclock {
    background: #f0fff4;
    color: #38a169;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.card-description {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.card-category {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
}

.btn-enter {
    padding: 0.4rem 0.8rem;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-enter:hover {
    background: #218838;
}

.btn-favorite {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    transition: all 0.2s;
}

.btn-favorite:hover {
    color: #ffc107;
}

.btn-favorite.active {
    color: #ffc107;
}



/* === 统一覆盖区域 === */
body {
    background: #f8f9fa !important;
}

body .header {
    background: white !important;
    color: inherit !important;
    border-bottom: 1px solid #e9ecef !important;
    padding: 1.5rem 0 !important;
    text-align: left !important;
    box-shadow: none !important;
}

body .header .logo {
    color: #28a745 !important;
}

/* Footer 样式 */
.footer {
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 1.5rem 0;
}

/* 让 Footer 贴底 */
body {
    /* 恢复默认布局并为固定 footer 预留空间 */
    display: block;
    padding-bottom: 3.5rem; /* 与 footer 高度相当 */
}
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: #6c757d;
    padding: 1rem 0;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    z-index: 5000; /* 保障 footer 位于所有内容之上 */
}
