/* 时间戳转换器专用样式 */
.timestamp-converter-tool {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* 代码和数字样式 */
.font-monospace {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 14px;
    line-height: 1.5;
}

.form-control.font-monospace {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.form-control.font-monospace:focus {
    background-color: #ffffff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 统计信息样式 */
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    display: block;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.stat-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* 当前时间显示样式 */
.current-time-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.current-time-display .stat-value {
    color: white;
    font-size: 1.25rem;
}

.current-time-display .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

/* 卡片增强 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* 转换结果样式 */
.conversion-result {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.conversion-result h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #495057;
}

/* 时区选择器样式 */
.timezone-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* 按钮组样式 */
.btn-group .btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 实时更新动画 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.updating {
    animation: pulse 1s ease-in-out infinite;
}

/* 时间差显示样式 */
.time-difference-display {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.time-difference-display .time-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1565c0;
    display: block;
    margin-bottom: 0.5rem;
}

.time-difference-display .time-unit {
    font-size: 0.875rem;
    color: #1976d2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 批量转换样式 */
.batch-converter {
    background: #fafafa;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.batch-converter textarea {
    resize: vertical;
    min-height: 120px;
}

/* 格式转换显示 */
.format-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    word-break: break-all;
}

.format-display:hover {
    background: #e9ecef;
    border-color: #86b7fe;
}

/* 自定义格式输入 */
.custom-format-input {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

.custom-format-result {
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

/* 时间戳类型选择 */
.timestamp-type-group {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 输入验证样式 */
.is-valid {
    border-color: #198754;
}

.is-invalid {
    border-color: #dc3545;
}

.valid-feedback {
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.25rem;
    }

    .stat-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .current-time-display .stat-value {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.conversion-result {
    animation: slideInUp 0.3s ease-out;
}

/* 加载状态样式 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
        font-weight: 600;
    }

    .stat-value {
        font-weight: 800;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .form-control {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .form-control:focus {
        background-color: #1a202c;
        border-color: #63b3ed;
    }

    .form-control.font-monospace {
        background-color: #2d3748;
        color: #e2e8f0;
    }

    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }

    .card-header {
        background-color: #4a5568;
        border-bottom-color: #718096;
    }

    .stat-item {
        background: #4a5568;
        border-color: #718096;
    }

    .conversion-result {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

    .format-display {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }

    .format-display:hover {
        background: #718096;
    }
}

/* 时间选择器自定义样式 */
input[type="datetime-local"] {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* 复制按钮提示 */
.copy-tooltip {
    position: relative;
}

.copy-tooltip::after {
    content: '已复制!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #198754;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.copy-tooltip.show::after {
    opacity: 1;
}