@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600;700;800&display=swap');

:root{
  --bg: #FAFAF6;
  --ink: #14171A;
  --muted: #6B7280;
  --green: #2FD675;
  --yellow: #FFCF3D;
  --blue: #37AEFF;
  --card: #FFFFFF;
  --card-border: #ECECE4;
  --shadow: rgba(20, 23, 26, 0.08);
}

*{ box-sizing: border-box; }

html, body{
  margin:0;
  padding:0;
  background:#000; /* avoids a white flash while the transition video loads */
  font-family:'Kanit', sans-serif;
}

body{
  background: var(--bg);
  color: var(--ink);
}

.page{
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--card);
  box-shadow: 0 0 40px var(--shadow);
  position: relative;
  overflow: hidden;
}

/* ---------- hero ---------- */
.hero{
  position: relative;
  padding: 48px 28px 28px;
  background: linear-gradient(120deg, var(--green) 0%, var(--yellow) 52%, var(--blue) 100%);
  text-align: center;
}

.hero-avatar{
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto 14px;
  font-size: 2.4rem;
  overflow: hidden;
}
.hero-avatar img{ width:100%; height:100%; object-fit:cover; }

.hero-name{
  font-weight: 800;
  font-size: 1.9rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
  margin: 0;
}

.hero-tagline{
  font-weight: 500;
  font-size: .95rem;
  color: rgba(255,255,255,0.92);
  margin: 6px 0 0;
}

/* ---------- stats card ---------- */
.stats-card{
  margin: -22px 20px 0;
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 14px 16px;
  display:flex;
  align-items:center;
  gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}
.stats-card.loaded{ opacity:1; transform:none; }
.stats-card.failed{ display:none; }

.stats-avatar{
  width:44px; height:44px; border-radius:50%; background:#eee; flex:none; object-fit:cover;
}
.stats-info{ display:flex; flex-direction:column; gap:1px; }
.stats-name{ font-weight:700; font-size:.92rem; }
.stats-subs{ font-size:.8rem; color: var(--muted); font-weight:500; }

.stats-video{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color: var(--ink);
  max-width: 150px;
}
.stats-video-thumb{ width:56px; height:32px; object-fit:cover; border-radius:6px; background:#eee; flex:none; }
.stats-video-title{
  font-size:.7rem; font-weight:600; line-height:1.2;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* ---------- section ---------- */
.section-label{
  margin: 28px 24px 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.link-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding: 0 20px 8px;
}

.link-row{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  text-decoration:none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.link-row:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow);
}
.link-row:active,
.link-row.is-pressed{
  transform: translateY(0) scale(0.98);
  background: #F5F5F0;
}

.link-icon{
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.link-icon svg{ width:22px; height:22px; display:block; }

.link-text{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.link-title{ font-weight:600; font-size:.95rem; }
.link-sub{ font-size:.78rem; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.link-chevron{ margin-left:auto; flex:none; color: var(--muted); }

.icon-youtube{ background: #FFE3E3; }
.icon-discord{ background: #E3ECFF; }
.icon-tiktok{ background: #E6E6E6; }
.icon-roblox{ background: #E9E9E9; }
.icon-suno{ background: #EDE7FF; }
.icon-facebook{ background: #DDEBFF; }

footer.made-by{
  text-align:center;
  padding: 22px 20px 36px;
  font-size:.78rem;
  color: var(--muted);
  font-weight:500;
}

/* ---------- transition overlay (shared) ---------- */
#transition-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  background:#000;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:1;
  transition: opacity .45s ease;
}
#transition-overlay.hidden{ opacity:0; pointer-events:none; }
#transition-overlay video{ width:100%; height:100%; object-fit:cover; display:block; }

.unmute-btn{
  position:absolute;
  right: 22px;
  bottom: 22px;
  width:52px;
  height:52px;
  border-radius:50%;
  border:none;
  background:rgba(0,0,0,0.55);
  color:#fff;
  font-size:1.4rem;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0;
  transform: scale(.8);
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
}
.unmute-btn.show{ opacity:1; transform: scale(1); pointer-events:auto; }

/* ---------- status page (/check) ---------- */
.status-page{
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 40px 24px 60px;
}
.status-header{ text-align:center; margin-bottom: 28px; }
.status-header h1{ font-weight:800; font-size:1.6rem; margin:0 0 6px; }
.status-header p{ color:var(--muted); font-size:.9rem; margin:0; }

.status-row{
  display:flex;
  align-items:center;
  gap:14px;
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:14px;
  padding:16px;
  margin-bottom:12px;
}
.status-dot{ width:14px; height:14px; border-radius:50%; flex:none; }
.status-dot.ok{ background: var(--green); box-shadow:0 0 0 4px rgba(47,214,117,0.18); }
.status-dot.warn{ background: var(--yellow); box-shadow:0 0 0 4px rgba(255,207,61,0.22); }
.status-dot.down{ background:#FF5C5C; box-shadow:0 0 0 4px rgba(255,92,92,0.18); }
.status-dot.checking{ background: var(--blue); box-shadow:0 0 0 4px rgba(55,174,255,0.2); animation: pulse 1.2s infinite; }
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.4;} }

.status-body{ flex:1; min-width:0; }
.status-name{ font-weight:700; font-size:.95rem; }
.status-detail{ font-size:.8rem; color:var(--muted); margin-top:2px; }
.status-badge{
  font-size:.72rem;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  flex:none;
  text-transform: uppercase;
}
.status-badge.ok{ background:#E3FBEC; color:#189652; }
.status-badge.warn{ background:#FFF6DD; color:#966A00; }
.status-badge.down{ background:#FFE7E7; color:#C62828; }
.status-badge.checking{ background:#E7F4FF; color:#1573B8; }

.status-updated{ text-align:center; color:var(--muted); font-size:.78rem; margin-top:18px; }

/* ---------- 404 page ---------- */
.error-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 40px 24px;
  background: linear-gradient(150deg, var(--green) 0%, var(--yellow) 50%, var(--blue) 100%);
}
.error-card{
  background: var(--card);
  border-radius: 24px;
  padding: 40px 32px;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.error-code{ font-weight:800; font-size:4rem; margin:0; line-height:1; color: var(--ink); }
.error-title{ font-weight:700; font-size:1.2rem; margin:10px 0 6px; }
.error-desc{ color:var(--muted); font-size:.92rem; margin:0 0 24px; }
.error-home-btn{
  display:inline-block;
  background: var(--ink);
  color:#fff;
  text-decoration:none;
  font-weight:600;
  padding:12px 28px;
  border-radius:999px;
  transition: transform .15s ease;
}
.error-home-btn:hover{ transform: translateY(-2px); }

@media (max-width:520px){
  .hero{ padding: 40px 20px 24px; }
  .stats-card{ margin: -20px 14px 0; }
  .section-label{ margin: 24px 18px 8px; }
  .link-list{ padding: 0 14px 8px; }
}
