/* 自定义动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 复制按钮动画 */
.copy-button {
    transition: all 0.2s ease-in-out;
}

.copy-button:hover {
    transform: scale(1.1);
}

.copy-success {
    background-color: #10b981 !important;
    color: white !important;
}

/* 结果显示动画 */
.result-item {
    animation: slideUp 0.3s ease-out;
}

/* 错误提示样式 */
.error-message {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
    
    input, select, button {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 深色模式特殊处理 */
.dark input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* 世界地图样式 */
#world-map-container {
    position: relative;
    user-select: none;
}

#world-map {
    width: 100%;
    height: auto;
    max-height: 400px;
    cursor: grab;
}

#world-map:active {
    cursor: grabbing;
}

.dark #world-map .ocean {
    fill: #1f2937;
}

.dark #world-map .timezone-region {
    fill: #374151;
    stroke: #6b7280;
}

.dark #world-map .timezone-region:hover {
    fill: #3b82f6;
    stroke: #1d4ed8;
}

.dark #world-map .timezone-region.active {
    fill: #059669;
    stroke: #047857;
}

.dark #world-map .timezone-label {
    fill: #d1d5db;
}

/* 地图工具提示动画 */
.map-tooltip {
    transition: opacity 0.2s ease-in-out;
    backdrop-filter: blur(4px);
}

/* 地图选择通知动画 */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-slide-in {
    animation: slideInFromRight 0.3s ease-out;
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
} 