/* 时间戳转换工具样式 */

.timestamp-container {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 提示条样式 */
#timestamp-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 300px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#timestamp-toast.show {
    opacity: 1;
}

/* 高亮效果样式 */
.highlight-result {
    animation: pulse-text 1s ease-in-out;
    font-weight: bold;
}

.highlight-container {
    animation: pulse-bg 1.5s ease-in-out;
}

@keyframes pulse-text {
    0% {
        color: inherit;
    }
    50% {
        color: #007bff;
        text-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    }
    100% {
        color: inherit;
    }
}

@keyframes pulse-bg {
    0% {
        background-color: #f8f9fa;
    }
    30% {
        background-color: rgba(0, 123, 255, 0.1);
        box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
    }
    100% {
        background-color: #f8f9fa;
    }
}

/* 顶部控制按钮区域 */
.top-controls {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

/* 当前时间戳容器 */
.current-timestamp-container {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
}

.current-timestamp-container h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #495057;
    font-weight: bold;
    font-size: 1rem;
}

.timestamp-value-container {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.current-time-value {
    font-size: 2rem;
    font-weight: bold;
    font-family: monospace;
    color: #007bff;
}

.current-date-time-value {
    font-size: 1rem;
    font-weight: bold;
    font-family: monospace;
    color: #007bff;
}

.timestamp-unit {
    font-size: 1rem;
    color: #6c757d;
}

.timestamp-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.time-unit-selector {
    display: flex;
    align-items: center;
}

.timestamp-actions {
    display: flex;
    gap: 5px;
}

.timestamp-row {
    flex-grow: 1;
    margin-bottom: 20px;
}

/* 卡片样式 */
.card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    height: 100%;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 输入区域样式 */
.timestamp-input-group, .date-input-group {
    margin-bottom: 20px;
}

.timestamp-input-group label, .date-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* 结果区域样式 */
.timestamp-result {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.timestamp-result h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.result-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.result-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.result-label {
    font-weight: bold;
    min-width: 120px;
}

.result-value-wrapper {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.result-value {
    font-family: monospace;
    word-break: break-all;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* 复制按钮样式 */
.copy-btn {
    margin-left: 10px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.copy-btn:hover {
    transform: scale(1.1);
}

.tools-container {
    display: flex;
    gap: 10px;
}

/* 计时器样式 */
.timer-active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

/* 响应式样式调整 */
@media (max-width: 768px) {
    .timestamp-row {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .timestamp-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timestamp-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-label {
        margin-bottom: 5px;
    }
    
    .result-value-wrapper {
        width: 100%;
    }
    
    .card-header {
        flex-direction: column;
    }
}

/* Alert styles */
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* 时间戳单位选择器（Bootstrap 5：select 为 input-group 直接子元素） */
select.form-select.timestamp-unit-selector {
    min-width: 120px;
    max-width: 9rem;
    flex: 0 0 auto;
    background-color: #f8f9fa;
    font-size: 0.875rem;
}

select.form-select.timestamp-unit-selector:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* 输入组 */
.input-group {
    flex-wrap: nowrap;
    align-items: stretch;
}

@media (max-width: 768px) {
    .input-group {
        flex-wrap: wrap;
    }
    
    select.form-select.timestamp-unit-selector,
    .input-group .btn {
        margin-top: 5px;
        flex: 1 1 auto;
    }
    
    select.form-select.timestamp-unit-selector {
        max-width: none;
    }
}

.current-time-display {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #6c757d;
    font-family: monospace;
}

.current-time-display span {
    animation: time-pulse 2s infinite;
}

@keyframes time-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
} 