/* ==========================================================================
   Unix 时间戳工作台 —— 「时钟仪表」皮肤（天蓝 / 青）
   ========================================================================== */

.ts-page {
    --ts-accent: #0284c7;
    --ts-accent-2: #06b6d4;
    --ts-line: var(--c-border, #e3e8f0);
    --ts-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--c-bg, #f6f8fb);
    padding: 26px 0 64px;
}

.ts-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- 首屏 ---------- */
.ts-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 14px 0 20px;
}

.ts-eyebrow {
    display: inline-block;
    font-family: var(--ts-mono);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    color: var(--ts-accent);
    background: rgba(2, 132, 199, 0.09);
    border: 1px solid rgba(2, 132, 199, 0.22);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 12px;
}

.ts-hero h1 {
    margin: 0 0 10px;
    font-size: 38px;
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--c-text, #101828);
}

.ts-hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, #0284c7, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ts-hero p {
    margin: 0 0 14px;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.85;
    color: var(--c-text-sub, #4b5563);
}

.ts-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.ts-chips span {
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--c-bg-card, #fff);
    border: 1px solid var(--ts-line);
    color: var(--c-text-sub, #4b5563);
}

/* 首屏小时钟 */
.ts-hero-clock {
    position: relative;
    width: 112px;
    height: 112px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(2, 132, 199, 0.25);
    background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.14), transparent 70%);
    display: grid;
    place-items: center;
}

.ts-clock-hand {
    position: absolute;
    width: 2px;
    height: 34px;
    background: linear-gradient(180deg, #0284c7, transparent);
    border-radius: 2px;
    transform-origin: bottom center;
    transform: translateY(-17px) rotate(38deg);
    animation: ts-tick 8s steps(8, end) infinite;
}

.ts-clock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.12);
}

@keyframes ts-tick { to { transform: translateY(-17px) rotate(398deg); } }

/* ---------- 实时条 ---------- */
.ts-live {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ts-live-block {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(2, 132, 199, 0.08), rgba(6, 182, 212, 0.04));
    border: 1px solid rgba(2, 132, 199, 0.18);
}

.ts-live-label {
    font-size: 11.5px;
    letter-spacing: 0.06em;
    color: #0369a1;
    opacity: 0.85;
}

.ts-live-value {
    font-family: var(--ts-mono);
    font-size: 24px;
    font-weight: 700;
    color: #0c4a6e;
    letter-spacing: 0.01em;
}

.ts-live-value--sm { font-size: 18px; }
.ts-live-value--time { font-size: 15px; font-weight: 600; }

.ts-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(2, 132, 199, 0.3);
    background: rgba(255, 255, 255, 0.6);
    color: #0369a1;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ts-live-block:hover .ts-copy { opacity: 1; }

/* ---------- 转换卡 ---------- */
.ts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ts-card {
    padding: 16px;
    border-radius: 16px;
    background: var(--c-bg-card, #fff);
    border: 1px solid var(--ts-line);
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.ts-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.ts-card-head h2 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--c-text, #101828);
}

.ts-tag {
    font-family: var(--ts-mono);
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.1);
    color: #0369a1;
}

.ts-input-row, .ts-date-row {
    display: flex;
    gap: 8px;
}

.ts-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--ts-line);
    background: var(--c-bg-soft, #fafbfd);
    color: var(--c-text, #101828);
    font-family: var(--ts-mono);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ts-input:focus {
    border-color: rgba(2, 132, 199, 0.55);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
    background: var(--c-bg-card, #fff);
}

.ts-input--date { font-size: 13px; }

.ts-btn {
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #0891b2);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.24);
    white-space: nowrap;
}

.ts-btn:active { transform: translateY(1px); }

.ts-results {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.ts-results li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--ts-line);
    font-size: 13px;
}

.ts-results li:last-child { border-bottom: 0; }

.ts-results .k {
    width: 76px;
    flex-shrink: 0;
    color: var(--c-text-muted, #7a8699);
    font-size: 12.5px;
}

.ts-results .v {
    flex: 1;
    font-family: var(--ts-mono);
    font-size: 13px;
    color: #0c4a6e;
    word-break: break-all;
}

.ts-copy--inline {
    position: static;
    opacity: 1;
    padding: 2px 8px;
}

.ts-error {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: #dc2626;
    min-height: 18px;
}

.ts-hint {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.75;
    color: var(--c-text-muted, #8a94a3);
}

.ts-quick {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ts-quick-label { font-size: 12px; color: var(--c-text-muted, #8a94a3); }

.ts-chip {
    border: 1px solid var(--ts-line);
    background: transparent;
    color: var(--c-text-sub, #5b6478);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.ts-chip:hover { color: #0369a1; border-color: rgba(2, 132, 199, 0.4); background: rgba(2, 132, 199, 0.07); }

/* ---------- 深色主题 ---------- */
:root[data-theme="dark"] .ts-page { background: #0a1018; }

:root[data-theme="dark"] .ts-card,
:root[data-theme="dark"] .ts-chips span {
    background: #131c2b;
    border-color: #223047;
}

:root[data-theme="dark"] .ts-hero h1,
:root[data-theme="dark"] .ts-card-head h2 { color: #e6edf9; }
:root[data-theme="dark"] .ts-hero p { color: #9fb0c6; }

:root[data-theme="dark"] .ts-live-block {
    background: linear-gradient(160deg, rgba(2, 132, 199, 0.2), rgba(6, 182, 212, 0.08));
    border-color: rgba(56, 189, 248, 0.28);
}

:root[data-theme="dark"] .ts-live-value { color: #7dd3fc; }
:root[data-theme="dark"] .ts-live-label { color: #7dd3fc; opacity: 0.75; }

:root[data-theme="dark"] .ts-input {
    background: #0d1622;
    border-color: #223047;
    color: #d6e2f0;
}

:root[data-theme="dark"] .ts-results li { border-color: #223047; }
:root[data-theme="dark"] .ts-results .v { color: #7dd3fc; }
:root[data-theme="dark"] .ts-copy { background: rgba(13, 22, 34, 0.8); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .ts-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-grid { grid-template-columns: 1fr; }
    .ts-hero-clock { display: none; }
}

@media (max-width: 640px) {
    .ts-hero h1 { font-size: 27px; }
    .ts-input-row, .ts-date-row { flex-direction: column; }
    .ts-btn { width: 100%; }
    .ts-live-value { font-size: 19px; }
    .ts-results .k { width: 62px; }
}
