/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    min-height: 100vh;
    line-height: 1.5;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ========== 布局 ========== */
.container { max-width: 1152px; margin: 0 auto; padding: 50px 32px 28px; }

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.full-width { margin-bottom: 18px; }

/* ========== 头部 ========== */
.header { text-align: center; margin-bottom: 20px; }
.header h1 {
    font-size: 30px;
    font-weight: 700;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
}
.header p { color: #94a3b8; font-size: 14px; margin-top: 8px; }
.header-icon { color: #06b6d4; vertical-align: middle; margin-right: 8px; }

/* ========== 实时时钟 ========== */
.clock-bar {
    padding: 18px 28px;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    box-shadow: 0 2px 12px rgba(6,182,212,0.08);
}
.clock-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.clock-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 700;
    color: #0e7490;
    letter-spacing: 0.05em;
}
.clock-sep {
    color: #a5f3fc;
    font-size: 24px;
    font-weight: 300;
}
.ts-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.clock-label-inline {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.clock-label { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.ts-value { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 600; }
.ts-cyan { color: #0891b2; }
.ts-blue { color: #2563eb; }

/* ========== 模块标题 ========== */
.module-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.module-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.module-title h2 { font-size: 15px; font-weight: 600; color: #1e293b; }

/* ========== 输入框 ========== */
.input-field {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}
.input-field::placeholder { color: #94a3b8; }

/* ========== 按钮 ========== */
.btn-primary {
    width: 100%;
    padding: 9px 20px;
    background: #0891b2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(6,182,212,0.35);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    padding: 9px 18px;
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover { background: #f8fafc; color: #1e293b; border-color: #cbd5e1; }
.btn-secondary.active {
    background: rgba(6,182,212,0.1);
    color: #0891b2;
    border-color: rgba(6,182,212,0.5);
}

/* ========== 结果区域 ========== */
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.result-item:hover { background: #f1f5f9; }
.result-label { font-size: 12px; color: #94a3b8; margin-bottom: 2px; }
.result-value { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: #1e293b; }

.copy-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.copy-btn:hover { background: #e2e8f0; }

/* ========== 标签页 ========== */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tab {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
}
.tab:hover { color: #334155; background: #f1f5f9; }
.tab.active {
    color: #0891b2;
    background: rgba(6,182,212,0.1);
    border-color: rgba(6,182,212,0.3);
}

/* ========== 代码块 ========== */
.code-block {
    position: relative;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    max-height: 320px;
    overflow-y: auto;
}
.code-block pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.code-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.code-copy-btn:hover { background: #f1f5f9; color: #1e293b; }
.code-copy-btn.copied { color: #16a34a; border-color: #16a34a; }

/* ========== 底部特性 ========== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding-bottom: 16px; }
.feature-card {
    text-align: center;
    padding: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.feature-card h3 { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.feature-card p { font-size: 12px; color: #64748b; }

/* ========== 提示条 ========== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; }

/* ========== SVG 图标 ========== */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 40px; height: 40px; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .container { padding: 20px 16px; }
    .clock-row { gap: 12px; }
    .clock-time { font-size: 22px; }
    .ts-value { font-size: 15px; }
    .grid-2 { grid-template-columns: 1fr; }
    .features { grid-template-columns: 1fr; }
}

/* ========== 底部 ========== */
.footer {
    text-align: center;
    padding: 20px 0 8px;
    font-size: 12px;
    color: #94a3b8;
}
.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover { color: #0891b2; }

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.3s ease forwards; }
