@tailwind base;
@tailwind components;
@tailwind utilities;
/* 禁用页面级滚动,防止整个页面下拉 */
html,
body {
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
}
/* 确保根容器占满全屏 */
#app {
height: 100vh;
overflow: hidden;
}
/* 自定义滚动条 - 优化体验 */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
border: 1px solid transparent;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
/* 滚动容器平滑滚动 */
.scroll-smooth {
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
}
/* 行数限制支持 */
.line-clamp-3 {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
line-height: 1.4;
}
/* 文本断行优化 */
.break-all {
word-break: break-all;
overflow-wrap: break-word;
}
/* 代码块样式 */
.code-block {
background: #1e293b !important;
color: #e2e8f0 !important;
}
/* 深色模式下的滚动条 */
.dark ::-webkit-scrollbar-track {
background: #1f2937;
}
.dark ::-webkit-scrollbar-thumb {
background: #4b5563;
}
.dark ::-webkit-scrollbar-thumb:hover {
background: #6b7280;
}
/* 深色模式过渡动画 */
* {
transition: background-color 0.2s ease, border-color 0.2s ease,
color 0.2s ease;
}