:root{
  --navy:#010d35;
  --blue:#0075ff;
  --blue-deep:#005bd1;
  --orange:#fe951c;
  --orange-deep:#ff7b00;
  --paper:#f7fbff;
}

body{
  min-height:100vh;
  padding-top:86px;
  background:#eef4fb;
  color:var(--navy);
}

.runner-page{
  min-height:calc(100vh - 86px);
  background:
    radial-gradient(circle at 12% 18%, rgba(0,117,255,0.16), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(254,149,28,0.16), transparent 24%),
    linear-gradient(180deg, #eef7ff 0%, #ffffff 48%, #eef4fb 100%);
}

.runner-hero{
  padding:72px 0 96px;
}

.runner-shell{
  display:grid;
  grid-template-columns:minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap:34px;
  align-items:stretch;
}

.runner-copy{
  position:relative;
  padding:42px 36px;
  border-radius:30px;
  color:#fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(254,149,28,0.22), transparent 26%),
    linear-gradient(150deg, #010d35 0%, #073a8e 58%, #0075ff 100%);
  box-shadow:0 28px 70px rgba(8,24,67,0.18);
  overflow:hidden;
}

.runner-copy::after{
  content:"";
  position:absolute;
  right:-80px;
  bottom:-80px;
  width:230px;
  height:230px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,0.2), transparent 70%);
}

.runner-kicker{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 16px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--orange), var(--orange-deep));
  color:#fff;
  font-size:0.78rem;
  font-weight:850;
  letter-spacing:0.12em;
  text-transform:uppercase;
  margin-bottom:22px;
}

.runner-copy h1{
  position:relative;
  z-index:1;
  font-size:clamp(3rem, 7vw, 6.6rem);
  line-height:0.9;
  margin:0 0 24px;
}

.runner-copy p{
  position:relative;
  z-index:1;
  max-width:430px;
  margin:0;
  color:rgba(235,242,255,0.84);
  font-size:1.08rem;
  line-height:1.75;
}

.runner-game-card{
  position:relative;
  padding:22px;
  border-radius:30px;
  background:rgba(255,255,255,0.96);
  border:1px solid rgba(8,24,67,0.08);
  box-shadow:0 34px 86px rgba(8,24,67,0.14);
}

.runner-hud{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-bottom:16px;
}

.runner-hud div{
  padding:14px 16px;
  border-radius:18px;
  background:#eef5ff;
  border:1px solid rgba(8,24,67,0.08);
}

.runner-hud span{
  display:block;
  color:#63708f;
  font-size:0.72rem;
  font-weight:850;
  letter-spacing:0.12em;
  text-transform:uppercase;
  margin-bottom:4px;
}

.runner-hud strong{
  display:block;
  color:var(--navy);
  font-size:1.45rem;
  line-height:1;
}

.runner-stage{
  position:relative;
  border-radius:24px;
  overflow:hidden;
  background:#f9fbff;
  border:1px solid rgba(8,24,67,0.08);
}

.runner-playfield{
  position:relative;
}

#runner-canvas{
  width:100%;
  aspect-ratio:8 / 3;
  display:block;
  background:#f9fbff;
  cursor:pointer;
}

.runner-message{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:24px;
  text-align:center;
  color:var(--navy);
  background:transparent;
  pointer-events:none;
  transition:opacity 0.25s ease;
}

.runner-message.is-hidden{
  opacity:0;
}

.runner-message strong{
  font-size:clamp(1.4rem, 3vw, 2.4rem);
  color:#010d35;
  text-shadow:
    0 2px 0 rgba(255,255,255,0.95),
    0 0 18px rgba(255,255,255,0.95),
    0 10px 24px rgba(1,13,53,0.22);
}

.runner-message span{
  color:#213156;
  font-weight:650;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.95),
    0 0 16px rgba(255,255,255,0.9);
}

.runner-controls{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:16px;
}

.runner-btn{
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 18px;
  border:none;
  border-radius:999px;
  background:#eaf1ff;
  color:var(--navy);
  font-weight:850;
  transition:transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.runner-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 24px rgba(8,24,67,0.14);
}

.runner-btn-primary{
  background:linear-gradient(90deg, var(--blue), #13c8dd);
  color:#fff;
}

.runner-fullscreen-btn{
  width:100%;
  min-height:50px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  margin-top:14px;
  border:none;
  border-radius:999px;
  background:linear-gradient(90deg, var(--navy), var(--blue));
  color:#fff;
  font-weight:850;
  box-shadow:0 18px 36px rgba(8,24,67,0.16);
  transition:transform 0.24s ease, box-shadow 0.24s ease;
}

.runner-fullscreen-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 42px rgba(8,24,67,0.2);
}

.runner-exit-fullscreen{
  display:none;
}

.runner-game-card:fullscreen{
  width:100vw;
  height:100vh;
  max-width:none;
  padding:18px;
  border:none;
  border-radius:0;
  display:flex;
  flex-direction:column;
  background:#eef4fb;
  overflow:auto;
}

.runner-game-card:fullscreen .runner-exit-fullscreen{
  position:fixed;
  z-index:20;
  top:14px;
  right:14px;
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:999px;
  background:rgba(1,13,53,0.84);
  color:#fff;
  box-shadow:0 14px 28px rgba(1,13,53,0.28);
  backdrop-filter:blur(12px);
}

.runner-game-card:fullscreen .runner-hud{
  flex:0 0 auto;
}

.runner-game-card:fullscreen .runner-playfield{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.runner-game-card:fullscreen .runner-stage{
  flex:1 1 auto;
  min-height:0;
  border-radius:14px;
}

.runner-game-card:fullscreen #runner-canvas{
  width:100%;
  height:100%;
  aspect-ratio:auto;
}

.runner-game-card:fullscreen .runner-controls{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
  margin-top:8px;
  padding:7px;
}

.runner-game-card:fullscreen #runner-jump,
.runner-game-card:fullscreen #runner-duck,
.runner-game-card:fullscreen #runner-start,
.runner-game-card:fullscreen #runner-reset{
  order:initial;
  grid-column:auto;
}

.runner-game-card:fullscreen .runner-btn{
  width:100%;
  min-height:42px;
  padding:0 8px;
  font-size:0.86rem;
  white-space:nowrap;
}

.runner-game-card:fullscreen .runner-help,
.runner-game-card:fullscreen .runner-ranking,
.runner-game-card:fullscreen .runner-fullscreen-btn{
  display:none;
}

.runner-help{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
  color:#596782;
  font-size:0.92rem;
}

.runner-help span{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.runner-ranking{
  margin-top:18px;
  padding:16px;
  border-radius:22px;
  background:linear-gradient(135deg, rgba(1,13,53,0.96), rgba(0,117,255,0.88));
  color:#fff;
  box-shadow:0 22px 46px rgba(8,24,67,0.16);
}

.runner-ranking-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.runner-ranking-head span{
  display:inline-flex;
  min-height:30px;
  align-items:center;
  padding:0 12px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--orange), var(--orange-deep));
  font-size:0.68rem;
  font-weight:850;
  letter-spacing:0.11em;
  text-transform:uppercase;
}

.runner-ranking-head strong{
  font-size:1.1rem;
}

.runner-ranking-list{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  padding:0;
  margin:0;
  list-style:none;
}

.runner-ranking-list li{
  min-width:0;
  padding:12px;
  border-radius:16px;
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.16);
}

.runner-ranking-list span{
  display:block;
  color:rgba(235,242,255,0.76);
  font-size:0.72rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:0.08em;
  margin-bottom:6px;
}

.runner-ranking-list strong{
  display:block;
  color:#fff;
  font-size:1.1rem;
  line-height:1;
}

@media(max-width:991px){
  body{
    padding-top:82px;
  }

  .runner-shell{
    grid-template-columns:1fr;
  }

  .runner-copy{
    text-align:center;
  }

  .runner-copy p{
    margin-inline:auto;
  }
}

@media(max-width:767px){
  body{
    padding-top:72px;
  }

  .runner-page{
    min-height:calc(100vh - 72px);
  }

  .runner-hero{
    padding:12px 0 18px;
  }

  .runner-hero .container{
    max-width:none;
    padding-inline:10px;
  }

  .runner-copy{
    display:none;
  }

  .runner-game-card{
    max-width:430px;
    margin-inline:auto;
    padding:10px;
    border-radius:22px;
    box-shadow:0 16px 34px rgba(8,24,67,0.13);
  }

  .runner-hud{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:7px;
    margin-bottom:8px;
  }

  .runner-hud div{
    min-width:0;
    padding:8px 9px;
    border-radius:14px;
  }

  .runner-hud span{
    font-size:0.56rem;
    letter-spacing:0.1em;
  }

  .runner-hud strong{
    font-size:clamp(1rem, 5.6vw, 1.35rem);
  }

  .runner-stage{
    border-radius:18px;
  }

  #runner-canvas{
    aspect-ratio:26 / 31;
    height:auto;
    min-height:0;
  }

  .runner-message{
    padding:18px;
  }

  .runner-message strong{
    font-size:clamp(1.55rem, 8vw, 2.1rem);
  }

  .runner-message span{
    max-width:250px;
    font-size:0.9rem;
    line-height:1.35;
  }

  .runner-controls{
    position:static;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
    margin-top:8px;
    padding:8px;
    border-radius:18px;
    background:rgba(255,255,255,0.78);
    box-shadow:0 14px 34px rgba(1,13,53,0.18);
    backdrop-filter:blur(14px);
  }

  #runner-jump{
    order:1;
  }

  #runner-duck{
    order:2;
  }

  #runner-start{
    order:3;
    grid-column:1 / -1;
  }

  #runner-reset{
    order:4;
    grid-column:1 / -1;
  }

  .runner-btn{
    width:100%;
    min-height:42px;
    padding:0 8px;
    font-size:0.86rem;
    white-space:nowrap;
  }

  .runner-fullscreen-btn{
    min-height:44px;
    margin-top:8px;
  }

  .runner-game-card:fullscreen{
    padding:10px;
    max-width:none;
    border-radius:0;
  }

  .runner-game-card:fullscreen .runner-hud{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    margin:0 56px 8px 0;
  }

  .runner-help{
    display:none;
  }

  .runner-ranking{
    margin-top:10px;
    padding:12px;
    border-radius:18px;
  }

  .runner-ranking-head{
    margin-bottom:10px;
  }

  .runner-ranking-list{
    grid-template-columns:1fr;
    gap:7px;
  }

  .runner-ranking-list li{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
  }

  .runner-ranking-list span{
    margin-bottom:0;
  }
}
