/* 全局样式 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 渐变背景动画 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 全局渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #1a237e 0%, #4527a0 100%);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
}

/* 侧边栏渐变背景 */
.sidebar-gradient {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 统计卡片样式 */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 按钮样式 */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-danger {
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* 导航链接样式 */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #3b82f6;
    transform: translateY(-1px);
}

/* 侧边栏导航链接样式 */
.sidebar-nav-link {
    transition: all 0.3s ease;
}

.sidebar-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-nav-link.active {
    background-color: rgba(59, 130, 246, 0.2);
    border-left: 4px solid #3b82f6;
}

/* 输入框样式 */
.input-focus {
    transition: all 0.3s ease;
}

.input-focus:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 状态标签样式 */
.status-badge {
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* 表格行样式 */
.table-row {
    transition: all 0.2s ease;
}

.table-row:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* 模态框样式 */
.modal {
    transition: all 0.3s ease;
}

.modal-content {
    transition: all 0.3s ease;
}

/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
}
