/* 共享样式 - 用于所有页面 */

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 动画类 */
.animated {
    animation-duration: 1.25s;
    animation-fill-mode: both;
}

.fadeInUp {
    animation-name: fadeInUp;
}

.fadeIn {
    animation-name: fadeIn;
}

.slideInLeft {
    animation-name: slideInLeft;
}

.slideInRight {
    animation-name: slideInRight;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}
.mx-auto { margin-left: auto; margin-right: auto; }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.p-0 { padding: 0; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
.p-40 { padding: 40px; }
.py-80 { padding: 80px 0; }

.pb-0 { padding-bottom: 0; }

.gap-20 { gap: 20px; }
.gap-40 { gap: 40px; }
.gap-60 { gap: 60px; }
.gap-80 { gap: 80px; }
.gap-100 { gap: 100px; }

.flex-1 { flex: 1; }
.items-center { align-items: center; }

.color-white {color: white;}

.relative {position: relative;}

.z-10 {z-index: 10;}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 滚动条样式 */
/* ::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); */
/* } */

/* 选择文本样式 */
::selection {
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

::-moz-selection {
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

/* 焦点样式 */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* 图片懒加载占位符 */
.lazy-placeholder {
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 14px;
}

/* 错误状态 */
.error {
    color: #dc3545;
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* 成功状态 */
.success {
    color: #28a745;
    border-color: #28a745;
}

.success-message {
    color: #28a745;
    font-size: 14px;
    margin-top: 5px;
}

/* 警告状态 */
.warning {
    color: #ffc107;
    border-color: #ffc107;
}

.warning-message {
    color: #ffc107;
    font-size: 14px;
    margin-top: 5px;
}

/* 信息状态 */
.info {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.info-message {
    color: var(--secondary-color);
    font-size: 14px;
    margin-top: 5px;
}

/* 卡片样式 */
.card {
    background-color: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.card-body {
    margin-bottom: 15px;
}

.card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 4px;
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--bg-primary);
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-primary);
}

.badge-accent {
    background-color: var(--accent-color);
    color: var(--bg-primary);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: normal;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 20px;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    margin: 2px;
}

/* 进度条样式 */
.progress {
    height: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

/* 分隔线样式 */
.separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 20px 0;
}

.separator-vertical {
    width: 1px;
    background-color: var(--border-color);
    margin: 0 20px;
    height: 100%;
}

/* 网格系统 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.align-center {
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

/* 响应式工具类 */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .flex {
        flex-direction: column;
    }

    .text-center-mobile {
        text-align: center;
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle,
    .social-icons {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .btn {
        border: 1px solid #000;
        background: none;
        color: #000;
    }
}
