/* 时间戳工具特有样式 */

/* ========== 紧凑时钟信息条 ========== */
.timestamp-clock-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 14px;
    margin: 12px 0 10px;
    height: 36px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.clock-bar-time {
    font-family: var(--font-family-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.clock-bar-date {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.clock-bar-sep {
    width: 1px;
    height: 16px;
    background-color: var(--border-color);
    flex-shrink: 0;
}

.clock-bar-label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.clock-bar-value {
    font-family: var(--font-family-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
    position: relative;
    white-space: nowrap;
}

.clock-bar-value:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    color: white;
}

.clock-bar-timezone {
    font-size: 11px;
    color: var(--text-muted);
    background-color: var(--bg-tertiary);
    padding: 2px 20px 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 10px;
    min-width: 120px;
    max-width: 200px;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.clock-bar-timezone:hover {
    border-color: var(--accent-light);
}

.clock-bar-timezone optgroup {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
}

.clock-bar-timezone option {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
}

/* Tooltip 样式 */
.tooltip-container {
    position: relative;
}

.tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    pointer-events: none;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-primary);
}

.tooltip-container.has-valid-result:hover .tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}

/* 复制成功提示 */
.copy-success {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-light);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 11;
    pointer-events: none;
}

.copy-success::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--accent-light);
}

.copy-success.show {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}

/* 当显示复制成功时隐藏普通tooltip */
.copy-success.show ~ .tooltip {
    opacity: 0 !important;
    visibility: hidden !important;
}

.timestamp-converter-container {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.converter-section {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
}

.converter-input {
    margin-bottom: 24px;
}

/* 单行排列的输入控件 */
.converter-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.converter-input-row .form-group {
    margin-bottom: 0;
}

/* 日期时间选择按钮 */
.datetime-picker-trigger {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: 4px 10px;
    height: 30px;
    line-height: 1;
}

/* 紧凑下拉框 */
.compact-select {
    font-size: 12px;
    padding: 4px 22px 4px 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 10px;
    flex-shrink: 0;
    height: 30px;
}

.conversion-result {
    flex: 1;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.result-item label {
    display: inline;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 0;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.result-item label::after {
    content: ':';
}

.result-value {
    font-family: var(--font-family-mono);
    font-size: 12px;
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    min-height: 22px;
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    word-break: break-all;
    cursor: default;
    transition: all 0.2s ease;
    user-select: none;
}

.result-value.has-valid-result {
    cursor: pointer;
    user-select: all;
}

.result-value.has-valid-result:hover {
    background-color: var(--bg-primary);
    border-color: var(--accent-light);
}

.result-value.selectable {
    /* 保持向后兼容性 */
}

.result-value.selectable:hover {
    /* 使用统一的hover样式 */
}

.time-calculation-container {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.calculation-section {
    flex: 1;
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    flex-direction: column;
}

.calculation-input {
    flex: 1;
}

.calculation-result {
    flex: 1;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.form-row .form-group {
    flex: 1;
}

/* 日期时间输入容器 */
.datetime-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 使用当前时间按钮 */
.btn-use-current {
    height: 55px;
    padding: 8px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: auto;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}


.datetime-display {
    flex: 1;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.datetime-display:hover,
.datetime-display:focus {
    border-color: var(--accent-light);
    background-color: var(--border-color);
}

.datetime-picker-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.datetime-picker-btn:hover {
    background-color: var(--border-color);
    border-color: var(--accent-light);
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.quick-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.quick-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
    border-color: var(--accent-light);
}

/* 日期时间选择器弹出面板 */
.datetime-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.datetime-picker-overlay.show {
    display: flex;
}

.datetime-picker-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 560px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: panelFadeIn 0.3s ease-out;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.datetime-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.datetime-picker-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.datetime-picker-body {
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* 日历部分 */
.calendar-section {
    flex: 1;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}

.nav-btn {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nav-btn:hover {
    background-color: var(--border-color);
    border-color: var(--accent-light);
}

.calendar-title {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background-color: var(--border-color);
}

.calendar-day.selected {
    background-color: var(--accent-light);
    color: var(--bg-primary);
    font-weight: 600;
}

.calendar-day.other-month {
    color: var(--text-muted);
    opacity: 0.5;
}

.calendar-day.today {
    background-color: var(--bg-secondary);
    font-weight: 600;
    border: 2px solid var(--accent-color);
}

.calendar-day.today.selected {
    background-color: var(--accent-light);
    color: var(--bg-primary);
}

/* 时间选择部分 */
.time-section {
    display: flex;
    gap: 12px;
    min-width: 180px;
}

.time-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-column label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.time-scroll {
    height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-tertiary);
    width: 100%;
}

.time-item {
    padding: 8px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

.time-item:hover {
    background-color: var(--border-color);
}

.time-item.selected {
    background-color: var(--accent-light);
    color: var(--bg-primary);
    font-weight: 600;
}

.time-item:last-child {
    border-bottom: none;
}

/* 底部按钮 */
.datetime-picker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

/* 滚动条样式 */
.time-scroll::-webkit-scrollbar {
    width: 6px;
}

.time-scroll::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.time-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.time-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 历史记录样式 */
.result-container-section {
    margin-top: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: 6px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}

/* 说明文档样式 */
.documentation-section {
    margin-top: 32px;
}

.documentation-content {
    padding: 0;
}

.documentation-content p {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: justify;
}

.result-container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    grid-column: 1 / -1;
}

.result-container-header h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.clear-history-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    outline: none;
}

.clear-history-btn:hover {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.history-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-top: 3px;
}

.history-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    min-height: 60px;
    text-align: center;
}

.history-item:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-light);
    transform: translateY(-1px);
}

.history-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    align-items: center;
    width: 100%;
}

.history-timestamp {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family-mono);
    font-size: 11px;
    word-break: break-all;
    line-height: 1.2;
}

.history-datetime {
    color: var(--text-secondary);
    font-size: 9px;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
}

.history-time {
    color: var(--text-muted);
    font-size: 9px;
    margin-top: 2px;
    text-align: center;
}

/* 历史记录滚动条 */
.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 时间差异计算样式 */
.result-section {
    margin-bottom: 16px;
}

.result-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* 时间戳工具响应式样式 */
@media (max-width: 1300px) {
    .timestamp-converter-container {
        gap: 10px;
    }
    
    .time-calculation-container {
        gap: 10px;
    }
    
    /* 历史记录中等屏幕响应式 */
    .history-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .history-item {
        min-height: 58px;
        padding: 7px 5px;
    }
    
    .history-timestamp {
        font-size: 10px;
    }
    
    .history-datetime {
        font-size: 8px;
    }
    
    .history-time {
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .converter-section {
        padding: 8px 10px;
    }

    .converter-input-row {
        flex-wrap: wrap;
    }
    
    .calculation-section {
        padding: 20px;
    }
    
    /* 日期时间选择器响应式 */
    .datetime-picker-panel {
        width: 90vw;
        max-width: 480px;
    }
    
    .datetime-picker-body {
        flex-direction: column;
        gap: 16px;
    }
    
    .time-section {
        min-width: auto;
    }
    
    .quick-actions {
        gap: 6px;
    }
    
    .quick-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .datetime-input-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .datetime-picker-btn {
        min-width: auto;
        height: auto;
        padding: 8px 12px;
    }
    
    /* 历史记录响应式 */
    .result-container-section {
        grid-template-columns: 1fr;
        padding: 8px;
        margin-top: 8px;
    }
    
    .result-container-header h4 {
        font-size: 12px;
    }
    
    .clear-history-btn {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .history-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .history-item {
        padding: 6px 4px;
        font-size: 11px;
        min-height: 55px;
    }
    
    .history-timestamp {
        font-size: 10px;
    }
    
    .history-datetime {
        font-size: 8px;
    }
    
    .history-time {
        font-size: 8px;
    }
    
    /* 说明文档响应式 */
    .documentation-section {
        margin-top: 24px;
    }
    
    .documentation-content p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* 时间差异计算响应式 */
    .time-calculation-container {
        flex-direction: column;
    }
    
    .result-section {
        margin-bottom: 12px;
    }
    
    .result-section h4 {
        font-size: 13px;
    }
}

/* 超小屏幕响应式 */
@media (max-width: 480px) {
    /* 历史记录超小屏幕响应式 */
    .history-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .history-item {
        min-height: 50px;
        padding: 5px 3px;
        font-size: 10px;
    }
    
    .history-timestamp {
        font-size: 9px;
    }
    
    .history-datetime {
        font-size: 7px;
    }
    
    .history-time {
        font-size: 7px;
    }
    
    /* 说明文档超小屏幕响应式 */
    .documentation-section {
        margin-top: 20px;
    }
    
    .documentation-content p {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* 时间戳文档样式扩展 */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.timeline-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.timeline-item h4 {
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-size: 16px;
}

.timeline-item code {
    display: block;
    background: var(--bg-primary);
    color: var(--accent-light);
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    font-family: var(--font-family-mono);
    font-size: 14px;
    font-weight: 600;
}

.timeline-item p {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ISO 8601 格式样式 */
.iso-formats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.format-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.format-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.format-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.format-examples {
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.6;
}

.format-examples code {
    color: var(--accent-light);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 比较表格样式 */
.comparison-table {
    margin: 24px 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.comparison-table td {
    color: var(--text-secondary);
    font-size: 13px;
}

.comparison-table td code {
    background: var(--bg-primary);
    color: var(--accent-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-family-mono);
    font-size: 12px;
}

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

.comparison-table tr:hover {
    background: var(--bg-tertiary);
}

/* 编程语言支持样式 */
.language-support {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.language-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.language-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.language-item h4 {
    color: var(--accent-light);
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.language-item pre {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    margin: 0;
    overflow-x: auto;
}

.language-item code {
    color: var(--text-primary);
    font-family: var(--font-family-mono);
    font-size: 12px;
    line-height: 1.4;
}

/* 时区网格样式 */
.timezone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.timezone-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.timezone-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.timezone-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.timezone-item p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.timezone-item strong {
    color: var(--text-primary);
}

/* DST 信息样式 */
.dst-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.dst-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.dst-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.dst-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.dst-item ul {
    margin: 0;
    padding-left: 16px;
}

.dst-item li {
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.dst-item strong {
    color: var(--text-primary);
}

/* FAQ 样式 */
.faq-section {
    margin: 24px 0;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-light);
}

.faq-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.faq-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.faq-item strong {
    color: var(--text-primary);
}

.faq-item br {
    margin-bottom: 8px;
}

/* 时间差异计算器专用样式 */
.dev-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.scenario-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.scenario-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.scenario-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.scenario-item ul {
    margin: 8px 0 0 0;
    padding-left: 16px;
}

.scenario-item li {
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 原理解释样式 */
.principle-explanation {
    margin: 24px 0;
}

.principle-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.principle-item:hover {
    border-color: var(--accent-light);
}

.principle-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.formula {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    font-family: var(--font-family-mono);
    font-size: 14px;
}


/* 精度对比样式 */
.precision-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.precision-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.precision-item:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.precision-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.precision-example {
    font-family: var(--font-family-mono);
    font-size: 12px;
    line-height: 1.6;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
}


/* 时区影响样式 */
.timezone-impact {
    margin: 24px 0;
}

.impact-scenario {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.impact-scenario:hover {
    border-color: var(--accent-light);
}

.impact-scenario h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.timezone-table {
    margin: 16px 0;
    overflow-x: auto;
}

.timezone-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 6px;
    overflow: hidden;
}

.timezone-table th,
.timezone-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.timezone-table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
}

.timezone-table td {
    color: var(--text-secondary);
}

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

/* DST影响样式 */
.dst-impact {
    margin: 24px 0;
}

.dst-scenario {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.dst-scenario:hover {
    border-color: var(--accent-light);
}

.dst-scenario h4 {
    color: var(--text-primary);
    margin: 0 0 16px 0;
    font-size: 16px;
}

.dst-example {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.dst-example h5 {
    color: var(--accent-light);
    margin: 0 0 8px 0;
    font-size: 14px;
}

.best-practices {
    margin: 16px 0;
}

.practice-item {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.practice-item h5 {
    color: var(--accent-light);
    margin: 0 0 8px 0;
    font-size: 14px;
}

.code-example {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0;
    font-family: var(--font-family-mono);
    font-size: 12px;
    line-height: 1.4;
}

.code-example code {
    color: var(--text-primary);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* 国际化考虑样式 */
.international-considerations {
    margin: 24px 0;
}

.consideration-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.consideration-item:hover {
    border-color: var(--accent-light);
}

.consideration-item h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    font-size: 16px;
}

.dst-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.schedule-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
}

.schedule-item h5 {
    color: var(--accent-light);
    margin: 0 0 8px 0;
    font-size: 14px;
}

.schedule-item p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 扩展响应式优化 */
@media (max-width: 768px) {
    .timeline-grid,
    .iso-formats,
    .language-support,
    .timezone-grid,
    .dst-info,
    .dev-scenarios,
    .precision-comparison,
    .dst-schedule {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .comparison-table,
    .timezone-table {
        font-size: 12px;
    }
    
    .comparison-table th,
    .comparison-table td,
    .timezone-table th,
    .timezone-table td {
        padding: 8px 12px;
    }
    
    .language-item pre,
    .code-example,
    .formula,
    .precision-example {
        padding: 12px;
        font-size: 11px;
    }
    
    .language-item code {
        font-size: 11px;
    }
}

/* 详细差异时间样式 */
.result-item.detailed-diff {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--accent-light);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.result-item.detailed-diff label {
    color: var(--accent-light);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.result-value.detailed-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family-mono);
    letter-spacing: 0.5px;
    line-height: 1.4;
    word-break: break-all;
    white-space: pre-wrap;
}

.result-value.detailed-time:hover {
    color: var(--accent-light);
    transform: translateY(-1px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-value.detailed-time {
        font-size: 16px;
        letter-spacing: 0.3px;
    }
    
    .result-item.detailed-diff {
        padding: 12px;
    }
}

/* ========== 批量时间戳提取 & 时间线 ========== */
.batch-extraction-section {
    margin-bottom: 16px;
}

.batch-extraction-section > .section-header {
    margin-bottom: 8px;
}

.batch-container {
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    min-height: 720px;
}

/* 左侧输入面板 */
.batch-input-section {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.batch-format-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    flex-wrap: wrap;
}

.format-btn-group {
    display: flex;
    gap: 2px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border-color);
}

.format-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.format-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.format-btn.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
}

.batch-unit-select {
    font-size: 12px;
    padding: 4px 24px 4px 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 10px;
    margin-left: auto;
}

.batch-input-textarea {
    flex: 1;
    width: 100%;
    border: none;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family-mono);
    font-size: 13px;
    line-height: 1.5;
    padding: 12px;
    resize: none;
    outline: none;
    min-height: 200px;
}

.batch-input-textarea::placeholder {
    color: var(--text-tertiary);
}

/* 拖拽分隔条 - 复用项目标准模式 */
.batch-container > .resize-handle {
    width: 12px;
    background-color: var(--bg-secondary);
    cursor: col-resize;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    min-width: 8px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.batch-container > .resize-handle .resize-line {
    width: 2px;
    height: 60px;
    background-color: var(--border-color);
    border-radius: 1px;
    transition: background-color 0.2s ease;
}

.batch-container > .resize-handle:hover .resize-line {
    background-color: var(--text-secondary);
}

.batch-container > .resize-handle:active .resize-line {
    background-color: var(--accent-light);
}

/* 拖拽时全局样式 */
body.batch-resizing {
    user-select: none;
    cursor: col-resize;
}

body.batch-resizing .batch-timeline-section {
    pointer-events: none;
}

body.batch-resizing .resize-line {
    background-color: var(--accent-light) !important;
}

/* 右侧时间线面板 */
.batch-timeline-section {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    overflow: hidden;
}

/* 排序按钮组（嵌入 summary 行） */
.timeline-sort-group {
    display: flex;
    gap: 2px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    padding: 2px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    margin-left: auto;
}

.timeline-sort-btn {
    padding: 2px 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.timeline-sort-btn:hover {
    color: var(--text-primary);
}

.timeline-sort-btn.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
}

.timeline-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

/* 时间线滚动条 */
.timeline-container::-webkit-scrollbar {
    width: 6px;
}

.timeline-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.timeline-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 空状态 */
.timeline-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-tertiary);
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.5;
    max-width: 300px;
}

/* 统计摘要 */
.timeline-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
}

.summary-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.summary-label {
    color: var(--text-muted);
}

.summary-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-family-mono);
}

/* 时间线节点列表 */
.timeline-list {
    position: relative;
    padding-left: 20px;
}

/* 时间线竖线 */
.timeline-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 15px;
    bottom: 12px;
    width: 1px;

    border-radius: 1px;
    border-left: 1px dashed var(--border-color);
}

/* 时间线节点 */
.timeline-node {
    position: relative;
    padding: 4px 10px;
    margin-bottom: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timeline-node-main {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.timeline-node:hover {
    background-color: var(--bg-secondary);
}

/* 节点圆点 */
.timeline-node::before {
    content: '▼';
    position: absolute;
    left: -18px;
    top: 7px;
    width: 14px;
    height: 14px;
    font-size: 14px;
    line-height: 1;
    color: var(--accent-color);
    z-index: 1;
}

.timeline-node-path {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-light);
    font-family: var(--font-family-mono);
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-node-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-family-mono);
    flex-shrink: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 1px 8px;
    border-radius: 4px;
}

.timeline-node-value {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-family-mono);
    flex-shrink: 0;
}

/* 复制反馈 */
.timeline-node.copied {
    background-color: var(--success-light);
}

/* 节点操作按钮组 */
.node-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.timeline-node:hover .node-actions {
    opacity: 1;
}

.node-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s ease;
    line-height: 1;
}

.node-action-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.node-action-btn.node-delete:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.node-action-btn.hidden {
    visibility: hidden;
}

/* 日志上下文行 */
.timeline-node-context {
    font-size: 11px;
    color: var(--text-tertiary);
    font-family: var(--font-family-mono);
    padding: 2px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
}

.timeline-node-context::before {
    content: '> ';
    color: var(--border-color);
}

/* 时间间隔标签 */
.timeline-interval {
    position: relative;
    padding: 2px 0 2px 8px;
    margin: 0 0 0 -13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-interval::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 1px;
    background-color: var(--border-color);
    flex-shrink: 0;
}

.interval-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-family: var(--font-family-mono);
}

/* 间隔颜色分级 */
.interval-badge.interval-tiny {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.interval-badge.interval-small {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.interval-badge.interval-medium {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.interval-badge.interval-large {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* 时间线底部操作 */
.timeline-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ========== 批量提取响应式 ========== */
@media (max-width: 1024px) {
    .batch-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .timestamp-clock-bar {
        gap: 6px;
        padding: 4px 10px;
        font-size: 11px;
    }

    .clock-bar-time {
        font-size: 13px;
    }

    .clock-bar-value {
        font-size: 11px;
    }

    .timestamp-converter-container {
        flex-direction: column;
        gap: 8px;
    }

    .batch-container {
        flex-direction: column;
        min-height: auto;
    }

    .batch-input-section {
        min-height: 250px;
    }

    .batch-timeline-section {
        min-height: 300px;
    }

    .batch-container > .resize-handle {
        width: 100%;
        height: 12px;
        min-width: unset;
        min-height: 8px;
        cursor: row-resize;
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .batch-container > .resize-handle .resize-line {
        width: 60px;
        height: 2px;
    }

    .timeline-summary {
        gap: 10px;
    }
}