* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #000; /* 黑色背景 */
  color: #ddd;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif;
  pointer-events: auto;
}

/* 确保所有可交互元素都可点击 */
button, a, input, select, textarea, .tag, .upload-btn, .admin-gear, .lora-card {
  pointer-events: auto !important;
}

/* 全屏背景画布 */
#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

/* 内容层 */
.admin-gear {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999; /* 确保在最顶层 */
  pointer-events: auto;
}

.admin-gear a {
  display: flex;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  pointer-events: auto;
  cursor: pointer;
}

.admin-gear a:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg);
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  margin: auto;
  width: 90%;
  max-width: 400px;
  transform: scale(0.7);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #e5e5e5;
}

.btn {
  width: 100%;
  padding: 0.75rem;
  background: #e5e5e5;
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.btn:hover {
  background: #d0d0d0;
  transform: translateY(-1px);
}

.upload-modal {
  max-width: 500px;
}

.upload-modal .modal-content {
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-modal .modal-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-modal .modal-header h2 {
  color: #fff;
  margin: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #e5e5e5;
  background: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
  resize: vertical;
  height: 80px;
  font-family: inherit;
}

.form-group select option {
  background: #1a1a1a;
  color: #fff;
}

.form-group input[type="file"] {
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  color: #ccc;
}

.form-group input[type="file"]:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

/* 自定义文件上传容器 */
.file-upload-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-upload-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.file-upload-btn:hover {
  background: #0056b3;
}

.file-upload-btn:active {
  transform: scale(0.98);
}

.file-upload-btn.selected {
  background: #28a745;
}

.file-name {
  font-size: 14px;
  color: #ccc;
  font-style: italic;
  flex: 1;
  min-width: 120px;
}

.file-name.selected {
  color: #28a745;
  font-style: normal;
  font-weight: 500;
}



/* 标签管理模态框 */
.tag-manage-modal {
  max-width: 600px;
}

.tag-manage-body {
  padding: 1.5rem;
}

.tag-manage-section {
  margin-bottom: 2rem;
}

.tag-manage-section h3 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.tag-input-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.tag-input-group input {
  flex: 1;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
}

.tag-input-group input:focus {
  outline: none;
  border-color: #e5e5e5;
}

.existing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  color: #fff;
  font-size: 0.9rem;
}

.tag-item-name {
  margin-right: 0.5rem;
}

.tag-item-delete {
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tag-item-delete:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
}

.admin-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 4px;
}

.admin-btn {
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.admin-btn:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
}

#content {
  position: relative;
  padding: 24px clamp(16px, 4vw, 40px);
  max-width: 1280px;
  margin: 0 auto;
}

.hero {
  margin: 8px 0 16px;
  position: relative;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(20px, 3vw, 28px);
  color: #fff;
  text-align: center;
  position: relative;
}
.hero p { margin: 6px 0 0; color: #9aa0a6; font-size: 14px; }

.hero-video {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.hero-video video {
  width: 100%;
  height: auto;
  display: block;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.upload-btn {
  background: linear-gradient(135deg, #e5e5e5, #d0d0d0);
  color: #000;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  pointer-events: auto;
}

.upload-btn:hover {
  background: linear-gradient(135deg, #d0d0d0, #c0c0c0);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tag {
  background: #111;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  pointer-events: auto;
}

.tag:hover {
  background: #151515;
  border-color: #333;
  color: #ddd;
}

.tag.active {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #000;
}

.tag {
  position: relative;
}

.tag-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-delete:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.2);
}

.admin-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.batch-btn {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
  color: #fff;
}

.batch-btn:hover {
  background: linear-gradient(135deg, #ff5252, #ff4444);
}

#selectAllBtn {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: #fff;
}

#selectAllBtn:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
}

/* 自定义弹窗样式 */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.custom-modal.show {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.custom-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.custom-modal-content {
  position: relative;
  background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  min-width: 320px;
  max-width: 500px;
  width: 90%;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.custom-modal.show .custom-modal-content {
  transform: scale(1);
}

.custom-modal-header {
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
}

.custom-modal-body {
  padding: 1.5rem;
}

.custom-modal-body p {
  margin: 0 0 1rem;
  color: #ddd;
  line-height: 1.5;
}

.custom-modal-body input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.custom-modal-body input:focus {
  outline: none;
  border-color: #e5e5e5;
}

.custom-modal-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.custom-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.custom-btn-confirm {
  background: linear-gradient(135deg, #e5e5e5, #d0d0d0);
  color: #000;
}

.custom-btn-confirm:hover {
  background: linear-gradient(135deg, #d0d0d0, #c0c0c0);
  transform: translateY(-1px);
}

.custom-btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.batch-mode .lora-card {
  cursor: pointer;
  position: relative;
}

.batch-mode .lora-card::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.5);
}

.batch-mode .lora-card.selected::before {
  background: #ff4500;
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.waterfall-container {
  position: relative;
  width: 100%;
  margin: 0 auto 2rem;
}

.lora-card {
  position: absolute;
  width: calc(25% - 12px);
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  color: #ddd;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.lora-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: #2e7dff;
}

.lora-card-media {
  background: linear-gradient(135deg, #1b1b1b, #111);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9cc2ff;
  font-weight: bold;
  font-size: 1rem;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.lora-card-media:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(156, 194, 255, 0.3);
}

.lora-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 双视频对比显示样式 */
.video-comparison {
  display: flex;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.video-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.video-container.original {
  border-right: 1px solid #333;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

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

.video-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 3px;
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.video-container.original .video-label {
  background: rgba(255, 100, 100, 0.8);
}

.video-container.processed .video-label {
  background: rgba(100, 255, 100, 0.8);
}

/* 空状态样式 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: #666;
  min-height: 300px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.3;
}

.empty-message {
  font-size: 1.1rem;
  color: #888;
  margin-bottom: 1rem;
  font-weight: 300;
}

.empty-hint {
  font-size: 0.85rem;
  color: #2e7dff;
  opacity: 0.9;
  background: rgba(46, 125, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(46, 125, 255, 0.2);
}

/* 视频画廊悬停效果 */
.video-gallery-popup {
  position: absolute;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  max-width: 90vw;
  max-height: 80vh;
}

.video-gallery-popup.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.video-gallery-popup.hiding {
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-header h3 {
  color: white;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.gallery-close {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.gallery-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.gallery-content {
  padding: 1rem;
}

.gallery-content.dual-video {
  display: flex;
  gap: 1rem;
  width: 600px;
}

.gallery-content.single-video {
  width: 400px;
}

.gallery-video-container {
  flex: 1;
  position: relative;
}

.gallery-video-container video {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

.gallery-video-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.gallery-content.single-video video {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
}

.lora-card-body {
  padding: 0.8rem 1rem 1rem 1rem;
}

.lora-card-title {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.lora-card-desc {
  font-size: 0.85rem;
  color: #999;
  line-height: 1.4;
}

/* 移动端优化 */
@media (max-width: 1200px) {
  .lora-card { width: calc(33.33% - 12px); }
}

@media (max-width: 768px) {
  .lora-card { width: calc(50% - 10px); }

  /* 标题优化 */
  .hero h1 {
    font-size: clamp(18px, 4vw, 24px);
    margin-bottom: 12px;
  }

  /* 分类标签优化 */
  .category-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .category-tags {
    justify-content: center;
    gap: 0.4rem;
  }

  .tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

  /* 管理按钮优化 */
  .admin-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .upload-btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  /* 内容区域优化 */
  #content {
    padding: 16px 12px;
  }

  /* 模态框优化 */
  .modal-content {
    width: 95%;
    max-width: 400px;
    margin: 20px;
  }

  .modal-header h2 {
    font-size: 1.2rem;
  }

  /* 表单优化 */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* 防止iOS缩放 */
  }
}

@media (max-width: 480px) {
  .lora-card {
    width: calc(100% - 10px);
    margin-bottom: 12px;
  }

  /* 更小屏幕的优化 */
  .hero h1 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .category-tags {
    gap: 0.3rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .upload-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  #content {
    padding: 12px 8px;
  }

  /* 齿轮图标优化 */
  .admin-gear {
    top: 12px;
    right: 12px;
  }

  .admin-gear a {
    font-size: 20px;
    width: 36px;
    height: 36px;
  }

  /* 模态框在小屏幕上的优化 */
  .modal-content {
    width: 98%;
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* 卡片内容优化 */
  .lora-card-title {
    font-size: 0.9rem;
  }

  .lora-card-desc {
    font-size: 0.8rem;
    line-height: 1.3;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  /* 移除hover效果，使用更明显的点击反馈 */
  .tag:hover,
  .upload-btn:hover,
  .lora-card:hover {
    transform: none;
  }

  /* 增加点击区域 */
  .tag {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .upload-btn {
    min-height: 44px;
  }

  .admin-gear a {
    min-width: 44px;
    min-height: 44px;
  }

  /* 点击反馈 */
  .tag:active,
  .upload-btn:active,
  .lora-card:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
  .hero h1 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .category-header {
    margin-bottom: 1rem;
  }

  .modal-content {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .admin-gear a {
    font-size: 22px;
  }
}

/* 安全区域适配（刘海屏等） */
@supports (padding: max(0px)) {
  .admin-gear {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  #content {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

/* 移动设备特定样式 */
.mobile-device .lora-card {
  transition: transform 0.1s ease;
}

.mobile-device .lora-card:active {
  transform: scale(0.98);
}

/* 虚拟键盘打开时的优化 */
.keyboard-open .modal-content {
  max-height: 50vh;
  overflow-y: auto;
}

.keyboard-open #content {
  padding-bottom: 20px;
}

/* iOS Safari 特定优化 */
@supports (-webkit-touch-callout: none) {
  .modal-content {
    -webkit-overflow-scrolling: touch;
  }

  input, textarea, select {
    -webkit-appearance: none;
    border-radius: 8px;
  }
}

/* Android Chrome 特定优化 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .tag, .upload-btn {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  }
}



