/* 自定义动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 历史记录项样式 */
.history-item {
    animation: fadeIn 0.3s ease-in-out;
    transition: all 0.3s ease;
    background: #f6f8fa;
    border-radius: 1rem;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.03);
    padding: 1rem 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-item:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 16px 0 rgba(59,130,246,0.08);
}

/* 模态框动画 */
#resultModal {
    animation: fadeIn 0.3s ease-in-out;
}

#resultModal > div {
    animation: slideIn 0.3s ease-in-out;
}

/* 按钮悬停效果和loading */
button {
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    position: relative;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-loading:after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: #3B82F6;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5em;
    vertical-align: middle;
}

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

/* 响应式调整 */
@media (max-width: 900px) {
    main > div { flex-direction: column; }
}
@media (max-width: 640px) {
    .container, main, header { padding: 0 0.5rem !important; }
    .rounded-2xl { border-radius: 1rem !important; }
    .shadow, .shadow-xl { box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04) !important; }
    .h-64 { height: 12rem !important; }
    .text-2xl { font-size: 1.25rem !important; }
    .text-lg { font-size: 1rem !important; }
    .p-6 { padding: 1rem !important; }
    .mt-2, .mb-2, .mb-4, .mt-4 { margin: 0.5rem 0 !important; }
    .gap-6, .gap-4 { gap: 1rem !important; }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
} 