/* ==========================================================
   次元社区 - 全局样式表（已精简优化）
   变量 / 重置 / 导航高亮 / 响应式 / 暗色模式 全保留
========================================================== */

/* ---------- 1. 设计变量（支持暗色模式）---------- */
:root {
  --primary-color: rgba(18, 26, 59, 0.76);
  --secondary-color: #c96f37;
  --accent-color: #37c95b;
  --text-color: #2b2d42;
  --light-text: #f8f9fa;
  --bg-color: #ffffff;
  --card-bg: #f8f9fa;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --header-height: 70px;
  --footer-height: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #0206f5;
    --secondary-color: #c96f37;
    --accent-color: #e7266f;
    --text-color: #f8f9fa;
    --light-text: #2b2d42;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

html { scroll-behavior: smooth; }

/* ---------- 3. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 4. 头部 + 导航 ---------- */
.header {
  background: var(--primary-color);
  color: var(--light-text);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: var(--transition);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 15px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--light-text), #e0e0e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: var(--transition);
}
.logo:hover { transform: scale(1.05); }

.logo-image {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 10px;
  border: 2px solid white;
  transition: transform .3s;
}
.logo-image:hover { transform: scale(1.1); }

/* 导航链接 */
.nav-links {
  display: flex;
  list-style: none;
  gap: 35px;
  align-items: center;
  height: 100%;
}

.nav-links a {               /* 普通链接 */
  color: var(--light-text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-links a.active {        /* 当前高亮 */
  background: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  pointer-events: none;      /* 禁止重复点击当前页 */
}

/* 下划线动画 */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--light-text);
  transition: var(--transition);
  transform: translateX(-50%);
}
.nav-links a:hover::after { width: 70%; }

/* ---------- 5. 搜索框 ---------- */
.search-container { display: flex; align-items: center; gap: 8px; }
.search-input {
  padding: 8px 15px;
  border: none;
  border-radius: var(--border-radius);
  outline: none;
  width: 200px;
  transition: var(--transition);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.search-input:focus {
  width: 250px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--accent-color);
}
.search-btn {
  padding: 8px 15px;
  background: var(--secondary-color);
  color: var(--light-text);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}
.search-btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

/* ---------- 6. 认证按钮 ---------- */
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  height: 100%;
}
.btn {
  padding: 8px 12px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.btn-login {
  background: transparent;
  color: var(--light-text);
  border: 1px solid var(--light-text);
}
.btn-login:hover { background: rgba(255, 255, 255, 0.1); }
.btn-register {
  background: var(--light-text);
  color: var(--primary-color);
}
.btn-register:hover { filter: brightness(0.9); }
.btn-tourist { background: var(--accent-color); color: var(--light-text); }
.btn-tourist:hover { background: #3a86ff; }

/* 单独按钮色值覆盖 */
#login_1    { color: #fff; border: 1px solid #fff; }
#register-1 { color: #111; border: 1px solid #fff; }
#tourist-1  { color: #030303; border: 1px solid #fff; }
#out_1      { color: #100e0f; }

/* ---------- 7. 头像 ---------- */
.avatar-container { display: flex; align-items: center; gap: 10px; }
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform .3s;
}
.avatar-circle:hover { transform: scale(1.1); }
.guest-avatar { cursor: default; opacity: .8; }

/* ---------- 8. 页脚 ---------- */
.footer {
  background: var(--primary-color);
  color: var(--light-text);
  text-align: center;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

/* ---------- 9. 动画 & 工具 ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn .6s ease forwards; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ---------- 10. 响应式 ---------- */
@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; height: auto; padding: 10px; }
  .nav-links { flex-direction: column; gap: 10px; height: auto; }
  .search-container { order: 3; width: 100%; justify-content: center; margin-top: 10px; }
  .search-input { max-width: 300px; }
  .auth-buttons { height: auto; margin-top: 10px; }
}

@media (max-width: 576px) {
  .btn { padding: 6px 12px; font-size: .9rem; }
  .logo { font-size: 1.5rem; }
}


/* 默认在桌面端显示 */
.search-item {
    display: block;
}

/* 在屏幕宽度小于768px的设备上隐藏（通常是手机） */
@media (max-width: 768px) {
    .search-item {
        display: none;
    }
}



/*注销按钮*/
/* From Uiverse.io by vinodjangid07 */
/* ===== 注销按钮 – 零污染版 ===== */
.logout-btn {
  --btn-height: 45px;
  --btn-collapsed: 45px;
  --btn-expanded: 125px;
  --icon-size: 17px;
  --purple: #a38eff;

  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: var(--btn-collapsed);
  height: var(--btn-height);
  padding: 0;
  border: none;
  border-radius: var(--btn-height);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--purple);
  box-shadow: 2px 2px 10px rgba(0, 0, 0, .2);
  transition: width .3s, border-radius .3s;
}

/* 图标区域 */
.logout-btn__icon {
  flex: 0 0 var(--btn-height);
  display: grid;
  place-content: center;
  transition: padding .3s;
}

.logout-btn__icon svg {
  width: var(--icon-size);
  height: var(--icon-size);
  fill: #fff;
}

/* 文字区域 */
.logout-btn__text {
  position: absolute;
  right: 0;
  width: 0;
  opacity: 0;
  color: #fff;
  font-size: 1.2em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: width .3s, opacity .3s, padding .3s;
}

/* ===== hover 交互 ===== */
.logout-btn:hover {
  width: var(--btn-expanded);
  border-radius: 22px;
}

.logout-btn:hover .logout-btn__icon {
  padding-left: 8px;
}

.logout-btn:hover .logout-btn__text {
  width: calc(100% - var(--btn-height));
  opacity: 1;
  padding-right: 12px;
}

/* ===== 点击反馈 ===== */
.logout-btn:active {
  transform: translate(2px, 2px);
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@900&display=swap');

.cyber-text {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;

    /* 渐变文字 - 赛博朋克配色 */
    background: linear-gradient(90deg, #00f2ff, #ff00e5, #00f2ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* 霓虹发光 */
    text-shadow:
        0 0 5px rgba(0, 242, 255, 0.8),
        0 0 10px rgba(0, 242, 255, 0.5),
        0 0 20px rgba(255, 0, 229, 0.3),
        0 0 40px rgba(255, 0, 229, 0.2);

    /* 流光动画 */
    animation: gradient-flow 3s linear infinite, neon-pulse 2s ease-in-out infinite alternate;

    margin-left: 8px;
}

/* 渐变流动 */
@keyframes gradient-flow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* 霓虹呼吸 */
@keyframes neon-pulse {
    0%, 100% {
        text-shadow:
            0 0 5px rgba(0, 242, 255, 0.8),
            0 0 10px rgba(0, 242, 255, 0.5),
            0 0 20px rgba(255, 0, 229, 0.3),
            0 0 40px rgba(255, 0, 229, 0.2);
        filter: brightness(1);
    }
    50% {
        text-shadow:
            0 0 10px rgba(0, 242, 255, 1),
            0 0 20px rgba(0, 242, 255, 0.8),
            0 0 40px rgba(255, 0, 229, 0.6),
            0 0 80px rgba(255, 0, 229, 0.4),
            0 0 120px rgba(255, 0, 229, 0.2);
        filter: brightness(1.3);
    }
}