/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.5;
    font-weight: 400;
}

/* 使用Flexbox网格 */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: 1fr 1fr;
}

.grid-cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Flexbox工具类 */
.flex {
    display: flex;
}

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

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

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

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

.flex-1 {
    flex: 1;
}

/* 间距工具类 */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.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-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

.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-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* 尺寸工具类 */
.w-full { width: 100%; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }

.h-full { height: 100%; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-40 { height: 10rem; }
.h-64 { height: 16rem; }

.max-h-40 { max-height: 10rem; }
.max-h-64 { max-height: 16rem; }
.max-h-80vh { max-height: 80vh; }

/* 背景和颜色 */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }
.bg-green-600 { background-color: #10b981; }
.bg-blue-600 { background-color: #3b82f6; }
.bg-red-500 { background-color: #ef4444; }

.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-green-500 { color: #10b981; }
.text-green-600 { color: #059669; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-purple-600 { color: #8b5cf6; }

/* 文本样式 */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.5rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* 边框和圆角 */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-700 { border-color: #374151; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-xl { border-top-left-radius: 0.75rem; border-top-right-radius: 0.75rem; }

/* 阴影 */
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* 其他 */
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.hidden { display: none; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-700:hover { background-color: #374151; }
.absolute { position: absolute; }
.relative { position: relative; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.top-1\/2 { top: 50%; }
.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.-translate-y-1\/2 { --tw-translate-y: -50%; }

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.8);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* 响应式调整 */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
}

/* 深色主题 */
.dark-mode {
    background-color: #111827;
    color: #ffffff;
}

.dark-mode header {
    background-color: #1f2937;
    border-color: #374151;
}

.dark-mode footer {
    background-color: #1f2937;
    border-color: #374151;
}

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

.dark-mode .bg-gray-50 {
    background-color: #111827;
}

.dark-mode .bg-gray-100 {
    background-color: #374151;
}

.dark-mode .bg-gray-200 {
    background-color: #4b5563;
}

.dark-mode .text-gray-600,
.dark-mode .text-gray-500,
.dark-mode .text-gray-700 {
    color: #d1d5db;
}

.dark-mode .border-gray-200 {
    border-color: #374151;
}

/* 底部导航栏样式增强 */
footer {
    height: 4rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    background-color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-top: 1px solid #e5e7eb;
}

footer .grid {
    height: 100%;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
}

footer a {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #6b7280;
    text-decoration: none;
    padding: 0.5rem 0;
}

footer a.active, footer a:first-child {
    color: #10b981;
}

footer a:hover {
    background-color: #f9fafb;
    color: #374151;
}

footer a i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

footer a span {
    font-size: 0.75rem;
    line-height: 1;
}