/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3B82F6;
}

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

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

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* 悬停效果 */
.hover-scale {
    transition: transform 0.3s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* 按钮样式 */
.btn-primary {
    background-color: #1E40AF;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
}

.btn-primary:hover {
    background-color: #3B82F6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: transparent;
    color: #1E40AF;
    padding: 0.75rem 1.5rem;
    border: 2px solid #1E40AF;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
}

.btn-secondary:hover {
    background-color: #1E40AF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #1E40AF;
    animation: spin 1s linear infinite;
}

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

/* 消息提示 */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10B981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.3s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.table tr:hover {
    background-color: #f9fafb;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination li {
    margin: 0 0.25rem;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease-in-out;
}

.pagination a:hover {
    background-color: #1E40AF;
    color: white;
}

.pagination .active a {
    background-color: #1E40AF;
    color: white;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb li {
    margin-right: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
}

.breadcrumb a {
    color: #6b7280;
    transition: color 0.3s ease-in-out;
}

.breadcrumb a:hover {
    color: #1E40AF;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-primary {
    background-color: rgba(30, 64, 175, 0.1);
    color: #1E40AF;
}

.tag-secondary {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.tag-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.tag-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.tag-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 工具类 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #1E40AF, #3B82F6);
}

.bg-gradient {
    background-image: linear-gradient(to right, #1E40AF, #3B82F6);
}

.transition-all {
    transition: all 0.3s ease-in-out;
}

.overflow-hidden {
    overflow: hidden;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

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

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

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

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

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

/* 间距工具类 */
.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 1.25rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 1.25rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.ml-3 {
    margin-left: 0.75rem;
}

.ml-4 {
    margin-left: 1rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-4 {
    margin-right: 1rem;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* 文本工具类 */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
}

.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

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

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

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

.text-primary {
    color: #1E40AF;
}

.text-secondary {
    color: #6b7280;
}

.text-success {
    color: #10B981;
}

.text-warning {
    color: #f59e0b;
}

.text-error {
    color: #ef4444;
}

/* 背景工具类 */
.bg-primary {
    background-color: #1E40AF;
}

.bg-secondary {
    background-color: #6b7280;
}

.bg-success {
    background-color: #10B981;
}

.bg-warning {
    background-color: #f59e0b;
}

.bg-error {
    background-color: #ef4444;
}

.bg-light {
    background-color: #f9fafb;
}

.bg-dark {
    background-color: #1f2937;
}

/* 边框工具类 */
.border {
    border: 1px solid #e5e7eb;
}

.border-t {
    border-top: 1px solid #e5e7eb;
}

.border-b {
    border-bottom: 1px solid #e5e7eb;
}

.border-l {
    border-left: 1px solid #e5e7eb;
}

.border-r {
    border-right: 1px solid #e5e7eb;
}

.border-primary {
    border-color: #1E40AF;
}

.border-secondary {
    border-color: #6b7280;
}

.border-success {
    border-color: #10B981;
}

.border-warning {
    border-color: #f59e0b;
}

.border-error {
    border-color: #ef4444;
}

.rounded {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 阴影工具类 */
.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* 布局工具类 */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

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

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

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

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

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

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

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

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

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

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

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

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* 显示/隐藏工具类 */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.hidden {
    display: none;
}

@media (min-width: 640px) {
    .sm\:block {
        display: block;
    }
    
    .sm\:hidden {
        display: none;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }
    
    .md\:hidden {
        display: none;
    }
}

@media (min-width: 1024px) {
    .lg\:block {
        display: block;
    }
    
    .lg\:hidden {
        display: none;
    }
}

/* 宽度工具类 */
.w-full {
    width: 100%;
}

.w-12 {
    width: 50%;
}

.w-13 {
    width: 33.333333%;
}

.w-23 {
    width: 66.666667%;
}

.w-14 {
    width: 25%;
}

.w-34 {
    width: 75%;
}

.w-auto {
    width: auto;
}

/* 高度工具类 */
.h-full {
    height: 100%;
}

.h-auto {
    height: auto;
}

.h-screen {
    height: 100vh;
}

/* 溢出工具类 */
.overflow-auto {
    overflow: auto;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-scroll {
    overflow: scroll;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* 定位工具类 */
.static {
    position: static;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.right-0 {
    right: 0;
}

.bottom-0 {
    bottom: 0;
}

.left-0 {
    left: 0;
}

/* 转换工具类 */
.transform {
    transform: none;
}

.transform-scale-105 {
    transform: scale(1.05);
}

.transform-scale-95 {
    transform: scale(0.95);
}

.transform-translate-y-2 {
    transform: translateY(0.5rem);
}

.transform-translate-y--2 {
    transform: translateY(-0.5rem);
}

.transform-translate-x-2 {
    transform: translateX(0.5rem);
}

.transform-translate-x--2 {
    transform: translateX(-0.5rem);
}

/* 过渡工具类 */
.transition {
    transition: all 0.3s ease-in-out;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* 动画工具类 */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-in {
    animation: slideIn 0.5s ease-in-out;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 自定义动画 */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 响应式工具类 */
@media (max-width: 768px) {
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: white;
        z-index: 50;
        display: flex;
        flex-direction: column;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .mobile-menu.active {
        transform: translateX(0);
    }
    
    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 3rem;
    }
    
    .mobile-menu-links a {
        font-size: 1.25rem;
        font-weight: 500;
        color: #374151;
        transition: color 0.3s ease-in-out;
    }
    
    .mobile-menu-links a:hover {
        color: #1E40AF;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
}

/* 无障碍工具类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focusoutline-none:focus {
    outline: none;
}

.focusring-2:focus {
    ring: 2px solid #1E40AF;
    ring-opacity: 0.5;
}

/* 自定义工具类 */
.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.line-clamp-4 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.line-clamp-5 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
}