/* Mud Code Studio - 基于 Logo 红黄绿配色 */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* Logo 主色：红 #e74c3c | 黄 #f1c40f | 绿 #27ae60 */
:root {
  --logo-red: #e74c3c;
  --logo-yellow: #f1c40f;
  --logo-green: #27ae60;
  --red-soft: rgba(231, 76, 60, 0.12);
  --yellow-soft: rgba(241, 196, 15, 0.12);
  --green-soft: rgba(39, 174, 96, 0.12);
  --bg-main: #fafafa;
  --bg-card: #ffffff;
  --bg-card-hover: #fffef8;
  --text-primary: #2c3e50;
  --text-secondary: #5d6d7e;
  --text-muted: #95a5a6;
  --shadow-soft: 0 4px 20px rgba(44, 62, 80, 0.06);
  --shadow-red: 0 8px 32px rgba(231, 76, 60, 0.2);
  --shadow-green: 0 8px 32px rgba(39, 174, 96, 0.2);
  --radius-sm: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(160deg, 
    var(--bg-main) 0%, 
    rgba(241, 196, 15, 0.04) 30%, 
    rgba(39, 174, 96, 0.05) 70%,
    rgba(231, 76, 60, 0.03) 100%);
  color: var(--text-primary);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景 - Logo 三色柔和光晕 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 20% 0%, var(--red-soft) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% -10%, var(--yellow-soft) 0%, transparent 45%),
    radial-gradient(ellipse 55% 45% at 80% 100%, var(--green-soft) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 5% 60%, var(--green-soft) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* 主容器 */
.main-wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero 区域 */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}

.hero-logo {
  width: 110px;
  height: 110px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 6px 20px rgba(231, 76, 60, 0.2)) 
          drop-shadow(0 4px 12px rgba(241, 196, 15, 0.15))
          drop-shadow(0 4px 12px rgba(39, 174, 96, 0.15));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-logo:hover {
  transform: scale(1.1);
}

.hero-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--logo-red), var(--logo-yellow), var(--logo-green));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 0.5rem;
}

.hero-tagline {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0.9;
}

/* 标签页 - 红黄绿渐变 */
.tabs-wrap {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.tab-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 2px solid rgba(44, 62, 80, 0.08);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-soft);
}

.tab-btn:hover {
  border-color: var(--logo-yellow);
  color: var(--logo-red);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--yellow-soft);
}

.tab-btn.is-active {
  color: #fff;
  background: var(--logo-green);
  border-color: var(--logo-green);
  box-shadow: 0 4px 20px var(--green-soft);
}

.tab-btn.is-active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--green-soft);
}

/* 游戏网格 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tab-pane:not(.is-active) {
  display: none !important;
}

.tab-pane.is-active {
  display: grid !important;
}

.game-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid rgba(44, 62, 80, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}

.game-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(39, 174, 96, 0.4);
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-green);
}

.game-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.game-card-icon-wrap {
  padding: 1.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 170px;
  background: linear-gradient(180deg, 
    var(--yellow-soft) 0%, 
    var(--green-soft) 50%,
    var(--red-soft) 100%);
}

.game-card-icon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .game-card-icon {
  transform: scale(1.1);
}

.game-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
}

.game-card-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.game-card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.game-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(44, 62, 80, 0.06);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-block;
  line-height: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-btn:hover {
  transform: scale(1.08);
}

.download-btn img {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  position: relative;
  text-align: center;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 60%);
  height: 3px;
  background: linear-gradient(90deg, var(--logo-red), var(--logo-yellow), var(--logo-green));
  border-radius: var(--radius-pill);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.footer-nav a:hover {
  color: var(--logo-red);
  transform: translateY(-1px);
}

.footer-copyright {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* ========== 内容页样式 (Privacy, Delete Account 等) ========== */
.page-section {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem 2rem;
}

.page-container {
  max-width: 800px;
  margin: 0 auto;
}

.page-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(44, 62, 80, 0.06);
}

.page-title {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin: 0 0 2rem;
}

.page-content h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--logo-green);
  margin: 1.75rem 0 0.75rem;
}

.page-content h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
}

.page-content p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 0.75rem;
}

.page-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding: 0;
}

.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.page-content a {
  color: var(--logo-red);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.page-content a:hover {
  color: var(--logo-green);
}

.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
}

/* 兼容原有 Bulma 类名 */
.section { padding: 3rem 1.5rem 2rem; }
.container { max-width: 800px; margin: 0 auto; }
.title.has-text-centered,
.content h1 { font-family: 'Nunito', sans-serif; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: var(--text-primary); text-align: center; margin: 0 0 2rem; }
.subtitle.is-4,
.content h2 { font-family: 'Nunito', sans-serif; font-size: 1.125rem; font-weight: 700; color: var(--logo-green); margin: 1.75rem 0 0.75rem; }
.subtitle.is-5,
.content h3 { font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 1.25rem 0 0.5rem; }
.content p { font-size: 0.9375rem; line-height: 1.65; color: var(--text-secondary); margin: 0 0 0.75rem; }
.content ul { margin: 0.5rem 0 1rem 1.5rem; padding: 0; list-style: disc; }
.content li { margin-bottom: 0.5rem; line-height: 1.5; color: var(--text-secondary); }
.content a { color: var(--logo-red); text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.content a:hover { color: var(--logo-green); }
.content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 0.5rem 0; }
.has-text-centered { text-align: center; }

/* 内容页 Footer - 兼容 .footer 和 .breadcrumb */
.footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  position: relative;
  text-align: center;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 60%);
  height: 3px;
  background: linear-gradient(90deg, var(--logo-red), var(--logo-yellow), var(--logo-green));
  border-radius: var(--radius-pill);
}

.breadcrumb {
  padding: 0;
  margin: 0 0 1rem;
  background: none;
}

.breadcrumb ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  margin: 0;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.breadcrumb a:hover {
  color: var(--logo-red);
}

.breadcrumb .is-active a {
  color: var(--logo-green);
  cursor: default;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* 响应式 */
@media (max-width: 640px) {
  .main-wrap {
    padding: 1.5rem 1rem 3rem;
  }
  
  .hero {
    padding: 2rem 0 3rem;
  }
  
  .hero-logo {
    width: 90px;
    height: 90px;
  }
  
  .tabs-wrap {
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
  }
  
  .tab-btn {
    font-size: 0.9375rem;
    padding: 0.6rem 1.2rem;
  }
  
  .games-grid,
  .tab-pane.is-active {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .game-card:hover {
    transform: translateY(-4px);
  }
  
  .game-card-icon {
    width: 88px;
    height: 88px;
  }
}
