/* 魔界奇迹 (Mojie MU Online) 官方复刻视觉样式表 */
:root {
  --bg-main: #0a0c10;
  --bg-card: rgba(18, 22, 31, 0.88);
  --bg-input: #12161f;
  --gold-primary: #d4af37;
  --gold-light: #f3e5ab;
  --gold-dark: #8c7322;
  --red-accent: #c0292b;
  --red-glow: rgba(192, 41, 43, 0.4);
  --blue-magic: #3498db;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-gold: #4a3b18;
  --border-card: #2d3748;
  --green-online: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 30%, rgba(192, 41, 43, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, #0d1117 0%, #06080a 100%);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航条 */
.navbar {
  background: rgba(13, 17, 23, 0.95);
  border-bottom: 2px solid var(--border-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  gap: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-badge {
  background: linear-gradient(135deg, #8c7322, #d4af37);
  color: #000;
  font-weight: 900;
  font-size: 1.1rem;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
  flex-shrink: 0;
}

.logo-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  white-space: nowrap;
}

.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

nav {
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  list-style: none;
}

.nav-menu a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 6px 9px;
  border-radius: 4px;
  transition: all 0.25s ease;
  position: relative;
  white-space: nowrap !important;
  word-break: keep-all !important;
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
}

.nav-menu a:hover, .nav-menu a.active {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.12);
  border-bottom: 2px solid var(--gold-primary);
}

.btn-nav-reg {
  background: linear-gradient(135deg, #a71d2a, #c0292b) !important;
  color: #fff !important;
  font-weight: bold !important;
  box-shadow: 0 0 12px var(--red-glow);
  border: 1px solid #e74c3c !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  padding: 6px 14px !important;
  min-width: 84px !important;
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  flex-shrink: 0 !important;
}

.btn-nav-reg:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(192, 41, 43, 0.7);
}

/* 状态徽章 */
.server-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-card);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  background: var(--green-online);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-online);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* 主内容容器 */
.main-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

/* 经典英雄横幅 */
.hero-banner {
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.8) 0%, rgba(10, 14, 20, 0.95) 100%),
              radial-gradient(circle at 50% 30%, rgba(192, 41, 43, 0.15) 0%, transparent 70%);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  margin-bottom: 2.5rem;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.hero-tag {
  color: var(--gold-primary);
  font-size: 0.95rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.hero-title {
  font-size: 3rem;
  color: var(--gold-light);
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  text-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-main);
  max-width: 750px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-desc span {
  color: var(--gold-light);
  font-weight: bold;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, #b8860b, #d4af37);
  color: #0b0d11;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d4af37, #f3e5ab);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

/* 通用卡片网格 */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1.8rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
}

.card-title {
  font-size: 1.2rem;
  color: var(--gold-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 状态列表 */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.status-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.status-value {
  font-weight: 700;
  font-size: 0.95rem;
}

.text-online { color: var(--green-online); }
.text-gold { color: var(--gold-primary); }

/* 表单样式 */
.form-box {
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.form-group {
  margin-bottom: 1.4rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gold-light);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
  background: #181d29;
}

.form-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-error {
  background: rgba(192, 41, 43, 0.2);
  border: 1px solid #e74c3c;
  color: #ff7675;
}

.alert-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid var(--green-online);
  color: #a3e635;
}

/* 表格样式 */
.data-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #141923;
  color: var(--gold-light);
  font-weight: 700;
  padding: 14px 18px;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--border-gold);
}

.data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.data-table tr:hover td {
  background: rgba(212, 175, 55, 0.05);
}

.badge-rank-1 { color: #f1c40f; font-weight: 900; font-size: 1.2rem; }
.badge-rank-2 { color: #bdc3c7; font-weight: 900; font-size: 1.15rem; }
.badge-rank-3 { color: #e67e22; font-weight: 900; font-size: 1.1rem; }

/* 页脚 */
.footer {
  background: #080a0e;
  border-top: 1px solid var(--border-card);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold-primary);
}


/* ==========================================================================
   手机端全面响应式适配 (PC端完全保持原样，仅 <= 900px 生效)
   ========================================================================== */
.mobile-nav-actions,
.mobile-drawer,
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    padding-bottom: 68px;
  }

  .desktop-nav,
  .nav-right-spacer {
    display: none !important;
  }

  .navbar .nav-container {
    padding: 0 12px !important;
    height: 58px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .logo-badge {
    font-size: 0.72rem !important;
    padding: 3px 6px !important;
  }

  .logo-title {
    font-size: 1.05rem !important;
    line-height: 1.15;
  }

  .logo-sub {
    font-size: 0.68rem !important;
  }

  .mobile-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-reg-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0b0e14 !important;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 6px 11px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-menu-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: #fde68a;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 11px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
  }

  .mobile-drawer {
    display: none;
    flex-direction: column;
    background: rgba(11, 14, 20, 0.98);
    border-top: 1px solid rgba(212, 175, 55, 0.25);
    border-bottom: 2px solid var(--border-gold);
    padding: 8px 14px 12px;
  }

  .mobile-drawer.open {
    display: flex;
  }

  .mobile-drawer a {
    padding: 12px 10px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
  }

  .mobile-drawer a:last-child {
    border-bottom: none;
  }

  .mobile-drawer a.active {
    background: rgba(212, 175, 55, 0.14);
    color: #ffd700;
  }

  .mobile-bottom-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: rgba(11, 14, 20, 0.97);
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-bottom-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
  }

  .mobile-bottom-bar a .mb-ico {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-bottom-bar a.active {
    color: #fbbf24;
  }

  /* 主体与各页网格单列化 */
  .main-wrapper {
    padding: 1rem 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .home-split-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .home-left-sidebar {
    position: static !important;
    top: auto !important;
  }

  .grid-cards {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .sp-grid,
  .sp-grid-2,
  .sp-grid-3,
  .sp-wolf-grid {
    grid-template-columns: 1fr !important;
  }

  .sp-card-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .card {
    padding: 1.1rem !important;
  }

  .form-box {
    padding: 1.35rem 1.1rem !important;
  }

  /* 表格横向滚动防截断 */
  .data-table-wrap,
  .mu-intro-box {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    white-space: nowrap;
    padding: 9px 10px !important;
    font-size: 0.84rem !important;
  }

  .footer {
    padding: 1.5rem 1rem 2rem !important;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
}
