/* 统一的 Tailwind 配置和自定义样式 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Roboto+Slab:wght@400;700&family=Roboto:wght@300;400;500;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
}

.hero-gradient {
    background: linear-gradient(135deg, #0039A6 0%, #C8102E 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover: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);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #FFD700;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.progress-step {
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 12px;
    width: 2px;
    height: calc(100% - 24px);
    background-color: #EEEEEE;
    z-index: 0;
}

.progress-step:last-child::before {
    display: none;
}

.progress-step.active .step-number {
    background-color: #00A854;
    color: white;
}

.progress-step.completed .step-number {
    background-color: #0039A6;
    color: white;
}

.progress-step.active::before,
.progress-step.completed::before {
    background-color: #00A854;
}

.language-dropdown {
    position: relative;
}

.language-dropdown-content {
    display: none;
    position: absolute;
    min-width: 120px;
    z-index: 10;
}

.language-dropdown:hover .language-dropdown-content {
    display: block;
}

/* 骨架屏动画 */
@keyframes pulse {
    0% {
        background-color: rgba(226, 232, 240, 0.6);
    }
    50% {
        background-color: rgba(226, 232, 240, 0.8);
    }
    100% {
        background-color: rgba(226, 232, 240, 0.6);
    }
}

.skeleton {
    animation: pulse 1.5s infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}

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

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

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

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

/* 数据图表样式 */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* 加载动画 */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #0039A6;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* 表格样式优化 */
.data-table {
    @apply min-w-full bg-white;
}

.data-table th {
    @apply py-3 px-4 border-b border-gray-200 bg-gray-50 text-left text-xs font-medium text-medium-gray uppercase tracking-wider;
}

.data-table td {
    @apply py-4 px-4 border-b border-gray-200 text-sm;
}

/* 按钮样式 */
.btn-primary {
    @apply px-6 py-3 bg-russia-blue text-white font-medium rounded-full hover:bg-opacity-90 transition-colors;
}

.btn-secondary {
    @apply px-6 py-3 bg-transparent border border-russia-blue text-russia-blue font-medium rounded-full hover:bg-russia-blue hover:bg-opacity-10 transition-colors;
}

.btn-success {
    @apply px-6 py-3 bg-accent-green text-white font-medium rounded-full hover:bg-opacity-90 transition-colors;
}

.btn-danger {
    @apply px-6 py-3 bg-china-red text-white font-medium rounded-full hover:bg-opacity-90 transition-colors;
}

/* 卡片样式 */
.info-card {
    @apply bg-white rounded-xl shadow-md p-6 card-hover;
}

.stat-card {
    @apply bg-white rounded-xl shadow-md p-6 card-hover;
}

/* 表单样式 */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-russia-blue focus:border-transparent;
}

.form-label {
    @apply block text-sm font-medium text-dark-gray mb-2;
}

/* 标签样式 */
.badge {
    @apply px-2 py-1 text-xs font-medium rounded-full;
}

.badge-success {
    @apply bg-green-100 text-accent-green;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-600;
}

.badge-danger {
    @apply bg-red-100 text-china-red;
}

.badge-info {
    @apply bg-blue-100 text-russia-blue;
}