/* =========================================
   全局重置与 Apple 级毛玻璃高通透 UI 变量池
   ========================================= */
:root {
  --primary-color: #111111;
  --bg-color: transparent;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.85);
  --text-main: #111111;
  --text-sub: #666666;
  --border-radius: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.1);
  --mesh-1: #ffffff;
  --mesh-2: #f2f2f2;
  --mesh-3: #e8e8e8;
  --mesh-4: #fafafa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(45deg, var(--mesh-1), var(--mesh-2), var(--mesh-3), var(--mesh-4));
  background-size: 300% 300%;
  animation: meshFlow 18s ease infinite;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

@keyframes meshFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* =========================================
   极致通透：全局沉浸动态毛玻璃导航条
   ========================================= */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 30px;
}
.header-inner .logo {
  justify-self: start;
}
.header-inner .nav-menu {
  justify-self: center;
}
.header-inner .btn-primary {
  justify-self: end;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 导航链接 */
.nav-menu {
  display: flex;
  gap: 36px;
}

.nav-item {
  text-decoration: none;
  color: #555;
  font-size: 16px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
  padding-bottom: 2px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text-main);
  font-weight: bold;
}

/* 激活菜单下划线小红标 */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

/* Apple 系弹性物理压感按钮 */
.btn-primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary:active {
  transform: scale(0.92);
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

/* =========================================
   瀑布流页面主体与过滤标签区
   ========================================= */
/* =========================================
   双栏布局与侧边栏 (响应式收缩)
   ========================================= */
.page-container {
  max-width: 1400px;
  margin: 90px auto 40px;
  padding: 0 20px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.profile-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 30px 20px;
  text-align: center;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--card-border);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
}

.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-bottom: 16px;
  border: 2px solid #eaeaea;
  transition: transform 0.3s;
}

.profile-avatar:hover {
  transform: scale(1.05);
}

.profile-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--text-main);
}

.profile-bio {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 20px;
  line-height: 1.6;
}

.profile-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 20px;
  color: #555;
}

.profile-socials i {
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.profile-socials i:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

.views-container {
  flex: 1;
  min-width: 0;
  transition: all 0.4s ease;
}

/* 侧边栏及页面响应式收缩动画 */
@media (max-width: 1100px) {
  .sidebar {
    width: 240px;
  }
}

@media (max-width: 860px) {
  .page-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }
  .profile-card {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 20px;
    gap: 20px;
  }
  .profile-avatar {
    margin-bottom: 0;
    width: 60px;
    height: 60px;
  }
  .profile-name {
    margin-bottom: 4px;
  }
  .profile-bio {
    margin-bottom: 0;
  }
  .profile-socials {
    margin-left: auto;
  }
}

.section-header {
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header h2 {
  font-size: 20px;
  font-weight: bold;
}

.filter-tags {
  display: flex;
  gap: 12px;
}

.tag-btn {
  background: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tag-btn.active,
.tag-btn:hover {
  background: #f0f0f0;
  color: #333;
  font-weight: bold;
}

/* =========================================
   纯 CSS Column 瀑布流容器
   ========================================= */
.waterfall {
  column-count: 3;
  column-gap: 24px;
}

@media (max-width: 1200px) {
  .waterfall {
    column-count: 3;
  }
}

@media (max-width: 990px) {
  .waterfall {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .waterfall {
    column-count: 1;
    column-gap: 16px;
  }
}

/* =========================================
   笔记卡片 (柔和阴影，圆角排布)
   ========================================= */
.card {
  break-inside: avoid;
  margin-bottom: 24px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.card-img-box {
  position: relative;
  width: 100%;
  min-height: 120px;
  background: #eee;
}

.card-img-box img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.card-type {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
  line-height: 1.4;
  /* 标题截断：两行显示不下则以...省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片底部 作者信息与点赞交互 */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #555;
}

.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.interactions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-sub);
  font-size: 12px;
}

.icon-box {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.2s, transform 0.1s;
}

.icon-box:active {
  transform: scale(0.9);
}

.icon-box.liked {
  color: var(--primary-color);
}

/* 原本的极简风格删除按钮 */
.delete-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  color: #ff526a;
  border: none;
  padding: 5px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover .delete-btn {
  opacity: 1;
}

/* =========================================
   模态发布区域界面重布 (发布笔记)
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid #f6f6f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #bbb;
  cursor: pointer;
}

/* 图片框 */
.image-upload-area {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 280px;
  background: #f9f9f9;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.image-upload-area input {
  display: none;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 详情信息表单框体 */
.form-group {
  padding: 10px 24px;
  border-bottom: 1px solid #f9f9f9;
}

.form-group input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 0;
  color: #333;
}

.form-group input::placeholder {
  font-weight: normal;
  color: #ccc;
}

.form-group textarea {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 12px 0;
  resize: none;
  color: #444;
  line-height: 1.6;
}

/* 新增的巨大红底部触发按钮 */
.submit-btn {
  width: calc(100% - 48px);
  margin: 24px;
  padding: 14px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:active {
  transform: scale(0.98);
}

.submit-btn:hover {
  background: #333333;
}

.submit-btn:disabled {
  background: #bbbbbb;
  cursor: not-allowed;
}

/* =========================================
   视图动画及子模块 (游戏专区 & 关于)
   ========================================= */
.view-content {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 游戏专区设计 */
.arcade-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

.arcade-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: #3f3933;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.arcade-header p {
  color: #888;
  font-size: 15px;
  margin-bottom: 15px;
}

.return-link {
  color: #e5a44a;
  font-weight: bold;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s;
}

.return-link:hover {
  opacity: 0.8;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  transition: transform 0.3s, box-shadow 0.3s;
  border-bottom: 4px solid #eee;
  backdrop-filter: blur(10px);
}

.game-card:nth-child(1) { border-bottom-color: #83d475; }
.game-card:nth-child(2) { border-bottom-color: #a0cfff; }
.game-card:nth-child(3) { border-bottom-color: #ffd666; }

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.game-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.game-card h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  color: #444;
}

.game-card p {
  font-size: 13px;
  color: #777;
  margin-bottom: 30px;
  height: 40px;
}

.game-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-play {
  color: #e5a44a;
  border: 1px solid #e5a44a;
  background: transparent;
}

.btn-play:hover {
  background: rgba(229, 164, 74, 0.1);
}

.btn-disabled {
  background: #f0f0f0;
  color: #bbb;
  border: none;
  cursor: not-allowed;
}

/* 关于我模块 */
.about-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
}

.about-card h2 {
  font-size: 24px;
  margin-bottom: 24px;
}

.about-card p {
  color: #555;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.8;
}

.about-tech {
  margin-top: 30px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.about-tech span {
  padding: 6px 14px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-main);
  font-weight: bold;
}

/* =========================================
   黑白曜石深邃星空留言墙 (Obsidian Cosmic Wall)
   ========================================= */
.cosmic-wall {
  position: relative;
  width: 100%;
  height: 500px;
  background: linear-gradient(-45deg, #050505, #141414, #222222, #0a0a0a);
  background-size: 400% 400%;
  animation: cosmicFlow 20s ease infinite;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes cosmicFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 玻璃态底置录入台 */
.cosmic-input-overlay {
  background: rgba(30, 30, 30, 0.45);
  padding: 15px 25px;
  border-radius: 40px;
  margin-bottom: 30px;
  z-index: 10;
  display: flex;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  align-items: center;
}

.cosmic-input-overlay input {
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  outline: none;
  width: 380px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.3s ease;
}

.cosmic-input-overlay input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.cosmic-input-overlay input:focus {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.cosmic-input-overlay button {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
}

.cosmic-input-overlay button:active {
  transform: scale(0.9);
}
.cosmic-input-overlay button:hover {
  background: #ffffff;
  box-shadow: 0 0 16px rgba(255,255,255,0.4);
}