/* ── 实时时间戳区 ── */
.ts-realtime {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ts-realtime-item {
    text-align: center;
    padding: 1.2rem;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
}

.ts-rt-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.ts-rt-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    color: #2563eb;
    letter-spacing: 0.5px;
}

.ts-rt-ms {
    font-size: 1.3rem;
}

.ts-rt-date {
    font-size: 1rem;
    font-family: 'Noto Sans SC', sans-serif;
}

/* ── 转换区块 ── */
.ts-block {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.ts-block-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.unix-form {
    grid-template-columns: 2fr 1fr;
}

/* ── 转换结果 ── */
.ts-result {
    margin-top: 1rem;
    background: #f8f9fb;
    border: 1px solid #e8eaf0;
    border-radius: 8px;
    overflow: hidden;
}

.ts-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    gap: 0.5rem;
}

.ts-result-row:last-child {
    border-bottom: none;
}

.ts-result-row span {
    color: #666;
    white-space: nowrap;
}

.ts-result-row strong {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

/* ── 复制按钮 ── */
.copy-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    background: #e8eaf0;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* ── 参考表 ── */
.ts-ref-table {
    max-width: 100%;
    overflow-x: auto;
}

.ref-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.ref-table th {
    background: #f5f7fa;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.ref-table td {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.ref-table td:last-child {
    font-family: 'Fira Code', monospace;
    font-weight: 500;
    color: #2563eb;
}

.ref-table tr:last-child td {
    border-bottom: none;
}

/* ── 代码示例 ── */
.code-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    max-width: 860px;
    margin: 0 auto;
}

.code-example {
    background: white;
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    overflow: hidden;
}

.code-lang {
    padding: 0.6rem 1rem;
    background: #f5f7fa;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e8eaf0;
}

.code-block {
    padding: 1rem;
    font-size: 0.82rem;
    font-family: 'Fira Code', monospace;
    color: #333;
    line-height: 1.8;
}

.code-block code {
    font-family: inherit;
    color: inherit;
}

/* ── Mobile ── */
@media (max-width: 900px) {
    .ts-realtime {
        grid-template-columns: 1fr;
    }

    .code-examples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .unix-form {
        grid-template-columns: 1fr;
    }

    .ts-rt-value {
        font-size: 1.4rem;
    }

    .ts-rt-ms {
        font-size: 1.1rem;
    }
}