*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html{background:#050505}
body{
  color:#fff;
  background-color:#050505;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  background-attachment:fixed;
  transition:background-image .25s ease;
}
a{color:inherit;text-decoration:none}

.page{
  min-height:100vh;
  position:relative;
  isolation:isolate;
}
.page::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:rgba(0,0,0,.40);
}

.nav{
  position:relative;
  z-index:10;
  width:100%;
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:20px 38px;
  background:rgba(0,0,0,.54);
  border-bottom:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.brand{
  font-size:18px;
  font-weight:950;
  letter-spacing:.24em;
  white-space:nowrap;
  text-shadow:0 2px 10px rgba(0,0,0,.85);
}
.nav-right{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
}
.nav-links{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
}
.nav-links a{
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.3);
  border-radius:999px;
  background:rgba(0,0,0,.38);
  font-size:14px;
  font-weight:700;
  transition:transform .18s ease,background .18s ease,border-color .18s ease;
}
.nav-links a:hover,.nav-links a.active{
  transform:translateY(-1px);
  background:rgba(255,255,255,.17);
  border-color:rgba(255,255,255,.72);
}
.language-switcher{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:rgba(0,0,0,.42);
}
.language-switcher button{
  appearance:none;
  border:0;
  border-radius:999px;
  padding:7px 9px;
  background:transparent;
  color:rgba(255,255,255,.68);
  font:inherit;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.language-switcher button:hover{
  color:#fff;
  transform:translateY(-1px);
}
.language-switcher button.active{
  background:#fff;
  color:#080808;
}

.home-content{
  position:relative;
  z-index:1;
  min-height:calc(100vh - 82px);
  width:min(1240px,calc(100% - 48px));
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:38px;
  padding:60px 0;
}
.rainbow-title{
  margin:0;
  max-width:1120px;
  text-align:center;
  font-size:clamp(48px,7.5vw,112px);
  line-height:.95;
  letter-spacing:-.05em;
  font-weight:950;
  background:linear-gradient(90deg,#ff1744,#ff9100,#ffe600,#39ff14,#00d4ff,#7057ff,#ff29d4,#ff1744);
  background-size:220% 100%;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  filter:drop-shadow(0 5px 18px rgba(0,0,0,.9));
}
.runaway-button{
  position:relative;
  z-index:40;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:220px;
  min-height:58px;
  padding:16px 26px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:999px;
  background:rgba(0,0,0,.62);
  box-shadow:0 12px 34px rgba(0,0,0,.42),inset 0 0 24px rgba(255,255,255,.05);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-size:17px;
  font-weight:900;
  text-align:center;
  cursor:pointer;
  user-select:none;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.runaway-button:hover{
  background:rgba(255,255,255,.14);
  border-color:#fff;
  box-shadow:0 16px 40px rgba(0,0,0,.5),0 0 28px rgba(255,255,255,.16);
}
.runaway-button.is-running{
  position:fixed;
  margin:0;
  transition:left .13s cubic-bezier(.2,.8,.2,1),top .13s cubic-bezier(.2,.8,.2,1),background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.rainbow-particle{
  position:fixed;
  z-index:9999;
  width:12px;
  height:12px;
  border-radius:50%;
  pointer-events:none;
  background:hsl(var(--hue) 100% 60%);
  box-shadow:0 0 10px hsl(var(--hue) 100% 60%),0 0 20px hsl(var(--hue) 100% 60%);
  transform:translate(-50%,-50%);
  animation:rainbowFade .62s ease-out forwards;
}
@keyframes rainbowFade{
  0%{opacity:1;transform:translate(-50%,-50%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-95%) scale(.15)}
}

.joke-main{
  position:relative;
  z-index:1;
  min-height:calc(100vh - 82px);
  width:min(1100px,calc(100% - 48px));
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:28px;
  padding:54px 0 70px;
}
.joke-title{
  margin:0;
  text-align:center;
  font-size:clamp(40px,5.8vw,76px);
  line-height:1;
  font-weight:950;
  text-shadow:0 4px 22px rgba(0,0,0,.9);
}
.joke-box{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  width:min(820px,100%);
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:38px 44px;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.34);
  background-color:#111;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  box-shadow:0 24px 70px rgba(0,0,0,.58);
}
.page-a1 .joke-box{min-height:300px;background-position:center}
.page-a2 .joke-box{min-height:280px;background-position:center}
.page-a3 .joke-box{width:min(900px,100%);min-height:430px;background-position:center}
.image-joke-box::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:rgba(0,0,0,.58);
  backdrop-filter:blur(1.2px);
  -webkit-backdrop-filter:blur(1.2px);
}
.joke-text{
  position:relative;
  z-index:1;
  width:100%;
  max-width:760px;
  font-size:clamp(19px,2.1vw,27px);
  line-height:1.5;
  font-weight:650;
  text-align:left;
  text-shadow:0 2px 12px rgba(0,0,0,.95);
}
.page-a1 .joke-text,.page-a2 .joke-text{max-width:700px}
.page-a3 .joke-text{max-width:800px;font-size:clamp(18px,1.85vw,24px);line-height:1.46}

.feedback-main{
  position:relative;
  z-index:1;
  min-height:calc(100vh - 82px);
  display:grid;
  place-items:center;
  padding:50px 24px;
  text-align:center;
}
.feedback-text{
  margin:0;
  max-width:1000px;
  font-size:clamp(46px,7vw,104px);
  line-height:1;
  letter-spacing:-.04em;
  font-weight:950;
  text-shadow:0 5px 24px #000;
}

@media(max-width:900px){
  .nav{align-items:flex-start;flex-direction:column;padding:18px 20px}
  .nav-right{width:100%;align-items:flex-start;justify-content:flex-start;flex-direction:column;gap:12px}
  .nav-links{justify-content:flex-start}
  .home-content,.joke-main{width:min(100% - 30px,1100px)}
  .joke-main{min-height:calc(100vh - 130px);padding-top:38px}
  .page-a3 .joke-box{min-height:390px}
}
@media(max-width:560px){
  body{background-attachment:scroll}
  .nav-links a{font-size:12px;padding:8px 10px}
  .language-switcher button{padding:6px 8px;font-size:10px}
  .home-content{gap:28px}
  .rainbow-title{font-size:clamp(40px,13vw,68px)}
  .runaway-button{min-width:0;min-height:52px;padding:14px 22px;font-size:15px}
  .joke-box,.page-a1 .joke-box,.page-a2 .joke-box,.page-a3 .joke-box{min-height:0;padding:28px 22px;border-radius:20px}
  .joke-text,.page-a3 .joke-text{font-size:18px;line-height:1.48}
}
