
/* PC端显示为手机竖屏布局，居中显示 */
.app-mobile-wrapper {
  width: 100%;
  max-width: 550px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* 管理后台全屏布局 */
.app-admin-wrapper {
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* PC端：wrapper 上加 transform 创建新的包含块，所有 fixed 子元素自动被约束在布局内 */
@media (min-width: 551px) {
body {
    background: #111 !important;
}
.app-mobile-wrapper {
    transform: translateZ(0);
}
.app-admin-wrapper {
    font-size: 14px !important;
}
  /* Override the mobile centering from custom.css when admin is active */
body > div#app:has(.app-admin-wrapper) {
    justify-content: stretch !important;
    max-width: none !important;
}
}
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html,
:root {
  /* font-size: calc(100vw / 3.75); */
}

@media (min-width: 550px) {

  html,
  :root {
    font-size: calc(550px / 3.75) !important;
  }
}

/* PC端：约束所有 fixed 定位元素到手机宽度内 */
@media (min-width: 551px) {
  body>div#app {
    display: flex;
    justify-content: center;
  }
  /* 管理后台需要全屏布局，不受手机模拟约束 */
  body>div#app:has(.app-admin-wrapper) {
    justify-content: flex-start;
    max-width: none;
  }
  html:has(.app-admin-wrapper),
  :root:has(.app-admin-wrapper) {
    font-size: 14px !important;
  }
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

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

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

.scrollbar-hide::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.scrollbar-hide::-webkit-scrollbar-thumb {
  display: none;
}

.scrollbar-hide::-webkit-scrollbar-track {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 文本截断 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* HTML富文本内容样式 */
.html-content {
  font-size: 0.12rem !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  white-space: normal !important;
}

.html-content *,
.html-content p,
.html-content div,
.html-content span,
.html-content a,
.html-content strong,
.html-content em {
  font-size: 0.12rem !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
}

.html-content>* {
  margin-top: 0.12rem !important;
}

.html-content p {
  margin-bottom: 0.08rem !important;
}

.html-content p:last-child {
  margin-bottom: 0 !important;
}

img.emoji-svg {
  width: 1em;
  height: 1em;
  margin: 0 0.02em;
  vertical-align: -0.12em;
  display: inline-block;
}

.html-content a {
  color: #ff8600 !important;
  text-decoration: none !important;
}

.html-content br {
  line-height: 1.4 !important;
}

.html-content img {
  max-width: 100%;
  height: auto;
}

/* 动画 */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* 响应式网格 */
@media (max-width: 640px) {
  .grid-cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }
}

.grid-cols-4 {
  min-height: 200px;
}

@supports not (backdrop-filter: blur(4px)) {
  .backdrop-blur-sm {
    background-color: rgba(0, 0, 0, 0.5);
  }
}

/* AI头像上传样式 */
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}

.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}

.avatar {
  width: 178px;
  height: 178px;
  display: block;
}

/* 下载页样式 */
.download-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 视频播放页标签 */
.video-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.11rem;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  margin-right: 4px;
  margin-bottom: 4px;
}

/* 论坛详情评论输入 */
.comment-input {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 20px;
  width: 100%;
  outline: none;
}

.comment-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
