/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1D2129;
}

/* 导航栏样式 - 默认白色背景 */
#navbar {
    background-color: white;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 卡片悬停效果 */
.card-shadow {
    transition: all 0.3s ease;
}

.card-shadow:hover {
    transform: translateY(-5px);
}

/* 按钮样式 */
button, a {
    transition: all 0.3s ease;
}

button:active, a:active {
    /*transform: scale(0.98);*/
}

/* 表单样式 */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式断点调整 */
@media (max-width: 768px) {
    section {
        padding: 100px 0 60px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 480px) {
    section {
        padding: 80px 0 40px;
    }
    
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(22, 93, 255, 0.3);
    border-radius: 50%;
    border-top-color: #165DFF;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #86909C;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: #165DFF;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3s forwards;
}

.toast.error {
    background-color: #F53F3F;
}

.toast.success {
    background-color: #00B42A;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 无障碍样式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .card-shadow {
        border: 2px solid #000;
    }
    
    button,
    a {
        outline: 2px solid transparent;
        outline-offset: 2px;
    }
    
    button:focus,
    a:focus {
        outline: 2px solid #165DFF;
    }
}

/* 打印样式 */
@media print {
    header,
    footer,
    nav,
    button,
    a {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}