/* ===== 基础样式 ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    padding: 20px;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Header ===== */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: #7f8c8d;
    font-size: 14px;
}

/* ===== 导航栏样式 - 左上角垂直导航 ===== */
.tool-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tool-nav .nav-btn {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    white-space: nowrap;
    text-align: left;
    text-decoration: none;
    display: inline-block;
}
.tool-nav .nav-btn:hover {
    background: rgba(255,255,255,0.3);
}
.tool-nav .nav-btn.active {
    background: white;
    color: #6a11cb;
    border-color: white;
}
.tool-nav .nav-btn i {
    margin-right: 5px;
}
.tool-nav .nav-separator {
    height: 1px;
    background: rgba(255,255,255,0.3);
    margin: 4px 0;
}
.tool-nav .nav-home {
    background: rgba(255,255,255,0.25);
    border-style: dashed;
}
.tool-nav .nav-home:hover {
    background: rgba(255,255,255,0.4);
}

/* ===== 主内容区 ===== */
.main-content {
    padding-top: 0;
    padding-left: 140px;
}

/* ===== 卡片通用样式 ===== */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: none;
}
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
    font-weight: 600;
    padding: 15px 20px;
}
.card-body {
    padding: 25px;
}

/* ===== 按钮样式 ===== */
.btn-primary {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    border: none;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* ===== Loading ===== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== JSON 语法高亮 ===== */
.json-output {
    min-height: 300px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-radius: 10px;
    padding: 15px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow: auto;
    max-height: 500px;
}
.json-key { color: #9cdcfe; }
.json-string { color: #ce9178; }
.json-number { color: #b5cea8; }
.json-boolean { color: #569cd6; }
.json-null { color: #569cd6; }
.json-bracket { color: #ffd700; }

/* ===== 首页导航卡片 ===== */
.nav-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 50px;
}
.nav-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    width: 300px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.nav-card .icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #2c3e50;
}
.nav-card p {
    color: #7f8c8d;
    font-size: 14px;
}
