/* ===== Reset & Global ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-card: #1a1a2e;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0b0;
  --text-muted: #6c6c7e;
  --accent-gold: #ffd700;
  --accent-green: #00e676;
  --accent-blue: #42a5f5;
  --accent-purple: #bb86fc;
  --accent-red: #ff5252;
  --border-color: #2a2a4a;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.min-h-full { min-height: 100vh; }
body.flex { display: flex; }
body.flex-col { flex-direction: column; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.app-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.scroll-box {
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ===== Header Fixed ===== */
.header-fixed {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
}

/* -- Notice Bar -- */
.notice-bar {
  background: #1a1a35;
  height: 32px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.notice-track {
  display: flex;
  white-space: nowrap;
  animation: noticeMarquee 18s linear infinite;
}
.notice-track span {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0 40px;
  flex-shrink: 0;
}
@keyframes noticeMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* -- Top Nav (Category Tabs) -- */
.top-nav {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.top-nav ul {
  display: flex;
  list-style: none;
  padding: 0 8px;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.top-nav ul::-webkit-scrollbar { display: none; }
.top-nav ul li {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  position: relative;
  transition: color 0.25s;
}
.top-nav ul li .nav-icon {
  font-size: 15px;
}
.top-nav ul li.active {
  color: #fff;
  font-weight: 600;
}
.top-nav ul li.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
}
.top-nav ul li:active {
  opacity: 0.8;
}

/* -- Search Box -- */
.search-box {
  padding: 10px 12px 8px;
}
.search-inner {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 0 4px 0 14px;
  height: 40px;
  transition: border-color 0.2s;
}
.search-inner:focus-within {
  border-color: var(--accent-purple);
}
.search-inner input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-primary);
  min-width: 0;
}
.search-inner input::placeholder { color: var(--text-muted); }
.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-icon svg {
  width: 100%;
  height: 100%;
}
.search-submit-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.search-submit-btn:active { opacity: 0.8; }

/* -- Online Count -- */
.online-count-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 8px;
}
.online-count {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.online-icon {
  font-size: 13px;
}
.online-num {
  color: var(--accent-green);
  font-weight: 600;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  margin-left: 4px;
  animation: livePulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent-green);
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ===== Page Content ===== */
.page-content {
  padding: 0 12px 80px;
}
.page-content.active {
  display: block;
}
.page-content.hidden {
  display: none;
}

/* -- Free Header -- */
.free-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
}
.free-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.free-more {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Video Grid ===== */
.video-grid {
  width: 100%;
}

/* Video Row with columns */
.video-row {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.video-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.video-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.video-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* ===== Video Card ===== */
.video-card {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}
.video-card:active { transform: scale(0.97); }

.video-card[data-role="video-card"] {
  /* attribute selector specificity */
}

/* -- Thumb Container -- */
.video-thumb-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: #16213e;
}
.video-thumb-container img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-card:hover .video-thumb-container img {
  transform: scale(1.06);
}

/* -- Free Tag (VIP / 限免) -- */
.free-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  z-index: 3;
  line-height: 1.6;
}
.free-tag.vip,
.free-tag[data-tag="VIP"] {
  background: linear-gradient(135deg, #ffd700, #ffab00);
  color: #1a1a2e;
}
.free-tag.free,
.free-tag[data-tag="限免"] {
  background: linear-gradient(135deg, #00e676, #00c853);
  color: #1a1a2e;
}
.free-tag.finished,
.free-tag[data-tag="已完结"] {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  color: #fff;
}

/* -- Lock Center -- */
.lock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.lock-center img {
  width: 28px;
  height: 28px;
  position: static;
  width: 28px;
  height: 28px;
}

/* -- Bottom Icons (play count + duration overlay) -- */
.bottom-icons {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 8px 4px;
  z-index: 2;
  font-size: 11px;
  color: #fff;
}
.bottom-icons .left-group,
.bottom-icons .right-group {
  display: flex;
  align-items: center;
  gap: 3px;
}
.bottom-icons .eye-icon {
  display: inline-flex;
  align-items: center;
}
.bottom-icons .eye-icon::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.bottom-icons .time-clock-icon {
  display: inline-flex;
  align-items: center;
}
.bottom-icons .time-clock-icon::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* -- Video Info -- */
.video-info {
  padding: 8px 10px;
}
.video-info h5 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* -- Resource Card -- */
.resource-card {
  /* same base, slight adjustments */
}
.get-resource-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 6px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.get-resource-btn:active { opacity: 0.8; }

/* -- Game Download Button -- */
.game-download-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 0 8px 8px;
  padding: 6px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-green), #00c853);
  color: #1a1a2e;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.game-download-btn:active { opacity: 0.8; }

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: #13132b;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 4px 0;
  flex: 1;
  user-select: none;
}
.bottom-nav a.on {
  color: var(--accent-purple);
}
.bottom-nav a:active { opacity: 0.7; }
.bottom-nav-icon-svg {
  width: 22px;
  height: 22px;
}

/* ===== Modal Overlay ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}

/* -- Modal Content -- */
.modal-content {
  background: linear-gradient(160deg, #1e1e3a, #16213e);
  border-radius: 16px;
  padding: 0;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

/* -- Modal Top Bar -- */
.modal-top-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
}
.modal-close {
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
}

/* -- Modal Titles -- */
.modal-main-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  padding: 4px 20px 0;
}
.modal-sub-title {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 20px 16px;
}

/* -- Modal Card Area -- */
.modal-card-area {
  padding: 0 20px;
}
.modal-video-card {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px;
}
.modal-vthumb {
  width: 100px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f0f23;
}
.modal-vthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-vinfo {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.modal-vtitle {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-vmeta-views {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.modal-vmeta-views span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-icon {
  font-size: 13px;
}

/* -- Modal Buttons -- */
.modal-btn-row {
  padding: 16px 20px 0;
}
.btn-visit {
  display: block;
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd700, #ffab00);
  color: #1a1a2e;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
}
.btn-visit:active { opacity: 0.85; }
.btn-visit .btn-main-text {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.btn-visit .btn-sub-text {
  display: block;
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

.modal-btns {
  padding: 12px 20px 0;
}
.btn-free {
  display: block;
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
}
.btn-free:active { opacity: 0.85; }
.btn-free .btn-main-text {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.btn-free .btn-sub-text {
  display: block;
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

/* -- Modal Input Row -- */
.modal-input-row {
  display: flex;
  gap: 8px;
  padding: 16px 20px 20px;
}
.modal-input-row input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input-row input:focus {
  border-color: var(--accent-purple);
}
.modal-input-row input::placeholder {
  color: var(--text-muted);
}
.modal-input-row button {
  flex-shrink: 0;
  height: 42px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.modal-input-row button:active { opacity: 0.85; }

/* ===== Floating Complaint ===== */
.floating-complaint {
  position: fixed;
  bottom: 76px;
  right: 16px;
  z-index: 200;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.floating-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  background: var(--accent-red);
  opacity: 0.3;
  animation: floatingPulseAnim 2s ease-in-out infinite;
  z-index: -1;
}
@keyframes floatingPulseAnim {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.25); opacity: 0; }
}
.floating-btn {
  width: 36px;
  height: 36px;
  background: var(--accent-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 82, 82, 0.4);
}
.floating-shield-svg {
  width: 18px;
  height: 18px;
  color: #fff;
}
.floating-label {
  background: var(--accent-red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255, 82, 82, 0.4);
}

/* ===== No Results ===== */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Responsive ===== */
@media (min-width: 480px) {
  .video-row.cols-2 { gap: 12px; }
  .video-info h5 { font-size: 13px; }
}
@media (min-width: 768px) {
  .top-nav ul li { padding: 10px 18px; font-size: 15px; }
  .page-content { padding: 0 16px 80px; }
}

/* Hover for desktop */
@media (hover: hover) {
  .video-card:hover { transform: translateY(-2px); }
  .top-nav ul li:hover:not(.active) { color: var(--text-primary); }
}

/* ===== Admin Panel ===== */
.admin-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* -- Login Page -- */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
}
.login-card h2 {
  text-align: center;
  margin-bottom: 28px;
  font-size: 20px;
  color: #fff;
}
.login-card .form-group {
  margin-bottom: 18px;
}
.login-card .form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.login-card .form-group input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.login-card .form-group input:focus {
  border-color: var(--accent-purple);
}

/* -- Admin Panel Layout -- */
.admin-panel {
  display: none;
  min-height: 100vh;
}
.admin-panel.active {
  display: flex;
}

/* -- Sidebar -- */
.admin-sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  flex-shrink: 0;
}
.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border-color);
}
.admin-sidebar-header h3 {
  font-size: 15px;
  color: #fff;
}
.section-list {
  flex: 1;
  overflow-y: auto;
}
.section-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.section-item:hover {
  background: rgba(255,255,255,0.04);
}
.section-item.active {
  background: rgba(187, 134, 252, 0.12);
  border-left: 3px solid var(--accent-purple);
}
.section-item-name {
  font-size: 14px;
  color: var(--text-primary);
}
.section-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* -- Main Area -- */
.admin-main {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}
.admin-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.admin-main-header h2 {
  font-size: 18px;
  color: #fff;
}

/* -- Cards Grid -- */
.cards-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card-manage-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-manage-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.card-manage-info {
  padding: 12px;
}
.card-manage-info h4 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 6px;
}
.card-manage-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.card-manage-actions {
  display: flex;
  gap: 8px;
}

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}
.btn:active { opacity: 0.85; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: #fff;
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.btn-danger {
  background: rgba(255, 82, 82, 0.15);
  color: var(--accent-red);
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  width: auto;
}

/* -- Admin Modal -- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active,
.modal-overlay.show {
  display: flex;
}
.admin-panel .modal-content,
.admin-container .modal-content {
  background: linear-gradient(160deg, #1e1e3a, #16213e);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.admin-panel .modal-content h3,
.admin-container .modal-content h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 20px;
}
.admin-panel .form-group,
.admin-container .form-group {
  margin-bottom: 16px;
}
.admin-panel .form-group label,
.admin-container .form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.admin-panel .form-group input,
.admin-panel .form-group select,
.admin-panel .form-group textarea,
.admin-container .form-group input,
.admin-container .form-group select,
.admin-container .form-group textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.admin-panel .form-group input:focus,
.admin-panel .form-group select:focus,
.admin-container .form-group input:focus,
.admin-container .form-group select:focus {
  border-color: var(--accent-purple);
}
.admin-panel .form-group select,
.admin-container .form-group select {
  appearance: none;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.modal-actions .btn {
  width: auto;
  flex: 1;
}

/* -- Upload Area (Admin) -- */
.upload-area {
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}
.upload-area:hover {
  border-color: var(--accent-purple);
}
.upload-area p {
  font-size: 13px;
  color: var(--text-secondary);
}
.upload-area input[type="file"] {
  display: none;
}
.upload-preview {
  max-width: 100%;
  max-height: 120px;
  border-radius: 8px;
  margin-top: 8px;
  object-fit: cover;
}

/* -- Toast -- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  animation: toastFadeIn 0.3s ease;
}
.toast.success {
  background: rgba(0, 230, 118, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}
.toast.error {
  background: rgba(255, 82, 82, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 82, 82, 0.3);
}
.toast.info {
  background: rgba(66, 165, 245, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(66, 165, 245, 0.3);
}
@keyframes toastFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* -- Responsive Admin -- */
@media (max-width: 768px) {
  .admin-panel.active {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .cards-manage-grid {
    grid-template-columns: 1fr;
  }
}

/* -- 欢迎弹窗 -- */
.welcome-modal-content {
  background: linear-gradient(145deg, #1e1e3a, #2a2a4a);
  border: 1px solid rgba(187, 134, 252, 0.15);
  border-radius: 20px;
  padding: 36px 28px 28px;
  width: 90%;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: welcomeFadeIn 0.4s ease;
}
@keyframes welcomeFadeIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.welcome-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #ffcc44;
  margin-bottom: 24px;
  line-height: 1.4;
}
.welcome-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.welcome-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
}
.welcome-info-item .info-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.welcome-info-item .info-text {
  flex: 1;
}
.welcome-info-item .info-highlight {
  color: #ffaa33;
  font-weight: 600;
}
.welcome-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f0a030, #f5b840);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(240, 160, 48, 0.3);
}
.welcome-btn:hover {
  background: linear-gradient(135deg, #f5b840, #f7c550);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(240, 160, 48, 0.4);
}
.welcome-btn:active {
  transform: translateY(0);
}
