@import url('https://fonts.googleapis.com/css2?family=Pirata+One&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --bg-deep: #020b13;
  --bg-navy: #0a2a44;
  --bg-navy-light: #14507d;
  --accent-gold: #eab820;
  --accent-gold-light: #ffd86b;
  --accent-orange: #ef8f2a;
  --text-light: #eef3f7;
  --text-muted: #9db8cc;
  --text-dark: #2a2315;
  --paper-start: #fdfaf1;
  --paper-end: #efe5c9;
  --line: rgba(255, 255, 255, 0.12);
  --card-pad: 22px;
  --radius: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #0a2238;
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-gold-light);
  text-decoration: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Navbar ---------- */
/* Dark Wooden Planks by Amal Kumar, Poly Haven (CC0): https://polyhaven.com/a/dark_wooden_planks */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: #1b1712;
  background-image:
    linear-gradient(180deg, rgba(24, 15, 8, 0.18), rgba(7, 6, 5, 0.48)),
    url('../media/textures/nav-dark-wood-planks.jpg');
  background-repeat: repeat;
  background-size: auto, 1024px 1024px;
  background-position: center, center 47%;
  border-bottom: 3px solid #4a2e0e;
  box-shadow:
    inset 0 -6px 12px rgba(0, 0, 0, 0.35),
    0 6px 22px rgba(0, 0, 0, 0.55);
}

.navbar-container {
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo-img {
  height: 47px;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 36px;
}

.nav-link {
  color: #f3e3c2;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  text-shadow: 0 2px 2px rgba(20, 10, 3, 0.8);
  transition: color 0.15s ease, background 0.15s ease, border 0.15s ease;
}

.nav-link:hover {
  color: var(--accent-gold-light);
  background: rgba(58, 32, 8, 0.5);
  box-shadow: 0 0 12px rgba(234, 184, 32, 0.25);
}

.nav-link.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 144px;
  height: 45px;
  padding: 0 12px;
  color: #fff;
  font-family: 'Pirata One', cursive;
  font-size: 1.2rem;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(45, 12, 0, 0.9);
  border: 0;
  border-radius: 0;
  background: url('../media/textures/play-now-btn.png') center / 100% 100% no-repeat;
  box-shadow: none;
  transform: scale(1.18);
  transition: transform 0.15s ease;
}

.nav-link.btn-play:hover,
.nav-link.btn-play:focus-visible {
  color: #fff;
  background-image: url('../media/textures/play-now-btn-hover.png');
  box-shadow: none;
  filter: brightness(1.12);
  transform: translateY(-2px) scale(1.18);
}

.nav-link.nav-forum,
.nav-link.nav-discord {
  width: auto;
  height: auto;
  padding: 6px 0;
  color: #f3e3c2;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-shadow: none;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.nav-link.nav-forum:hover,
.nav-link.nav-forum:focus-visible,
.nav-link.nav-discord:hover,
.nav-link.nav-discord:focus-visible {
  color: var(--accent-gold-light);
  background: none;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-link.nav-discord {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-link.nav-discord svg {
  flex-shrink: 0;
}


.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(30, 16, 4, 0.45);
  border: 2px solid rgba(234, 184, 32, 0.7);
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
  padding: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 208, 120, 0.15), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent-gold-light);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
}

/* ---------- Hero ---------- */
.homepage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.homepage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../media/backgrounds/sail-hero.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.homepage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(2, 11, 19, 0.6), rgba(2, 11, 19, 0.25) 45%, rgba(2, 11, 19, 0.78));
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 100svh;
  margin: 0 auto;
  padding: 90px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, rgba(255, 220, 130, 0.95), transparent 75%);
  border-radius: 1px;
  opacity: 0;
  animation: rain linear infinite;
}

@keyframes rain {
  0% {
    transform: translateY(-110%) rotate(17deg);
    opacity: 0;
  }
  8% {
    opacity: 0.95;
  }
  60% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(62vh) rotate(17deg);
    opacity: 0;
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 32px;
  align-items: center;
}

.hero-main {
  text-align: center;
}

.hero-title {
  font-family: 'Pirata One', cursive;
  font-size: clamp(2.6rem, 5vw, 3.25rem);
  line-height: 1.05;
  margin-bottom: 12px;
  text-transform: uppercase;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

.title-line {
  display: inline;
}

.title-accent {
  color: var(--accent-gold-light);
  text-shadow: 0 0 30px rgba(234, 184, 32, 0.4);
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 auto;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.45;
}

.server-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: -3px auto 12px;
  padding: 0 2px;
  font-family: 'Roboto', sans-serif;
  white-space: nowrap;
  color: #c9b58e;
}

.server-status::before,
.server-status::after {
  content: '';
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 151, 91, 0.8));
}

.server-status::after {
  transform: scaleX(-1);
}

.server-text {
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1;
  text-transform: uppercase;
}

.server-dot {
  position: relative;
  z-index: 1;
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: #d0a85e;
  box-shadow: 0 0 0 2px rgba(208, 168, 94, 0.12);
}

.server-status.status-online .server-dot {
  background: #78bf82;
  box-shadow: 0 0 5px rgba(120, 191, 130, 0.65);
}

.server-status.status-offline .server-dot {
  background: #d87568;
  box-shadow: 0 0 5px rgba(216, 117, 104, 0.55);
}

.hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  justify-self: center;
  width: 100%;
  max-width: 380px;
  scroll-margin-top: 84px;
}

.hero-media {
  margin-top: 16px;
}

.hero-media-title {
  font-family: 'Pirata One', cursive;
  font-size: 1.1rem;
  color: var(--accent-gold-light);
  margin-bottom: 6px;
  text-align: center;
}

.hero-media .video-wrapper {
  max-width: 470px;
  padding: 5px;
}

.hero-media .video-wrapper video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-width: 320px;
  margin: 8px auto 0;
}

.shot-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.72;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.shot-item:hover,
.shot-item:focus-visible {
  opacity: 1;
  border-color: rgba(234, 184, 32, 0.5);
}

.shot-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.shot-caption {
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 5px 4px;
  font-size: 0.58rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-light);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shot-item:hover .shot-caption,
.shot-item:focus-visible .shot-caption {
  opacity: 1;
}

.shot-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 16 / 10;
  border: 1px dashed rgba(234, 184, 32, 0.35);
  border-radius: 10px;
  background: rgba(8, 20, 34, 0.4);
  color: rgba(234, 240, 247, 0.5);
}

.shot-soon .shot-emoji {
  font-size: 1.6rem;
  filter: grayscale(1);
  opacity: 0.85;
}

.hero-side .register-card {
  width: 100%;
  padding: 18px;
}

.hero-side .auth-header {
  margin-bottom: 10px;
}

.hero-side .auth-header h2 {
  font-size: 1.4rem;
}

.hero-side .auth-header p {
  font-size: 0.76rem;
}

.hero-side .auth-form {
  gap: 8px;
}

.hero-side .form-group label {
  font-size: 0.68rem;
  margin-bottom: 2px;
}

.hero-side .input-wrapper input {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.hero-side .checkbox-wrapper {
  gap: 8px;
  font-size: 0.72rem;
}

.hero-side .auth-form .checkbox-wrapper:first-of-type {
  margin-top: 6px;
}

.hero-side .auth-form .btn {
  margin-top: 8px;
  padding: 9px 16px;
  font-size: 0.88rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.2;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #231505;
  background: linear-gradient(180deg, #ffd86b 0%, #f5b62d 55%, #e69a17 100%);
  border-bottom: 3px solid #c07e0c;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover {
  filter: brightness(1.14);
  box-shadow: 0 12px 28px rgba(245, 182, 45, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.register-card .btn-primary {
  color: #fff8e9;
  text-shadow: 0 1px 2px rgba(33, 18, 6, 0.8);
  border-radius: 4px;
  background: linear-gradient(180deg, #bc8b46 0%, #96652f 52%, #71451f 100%);
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 239, 202, 0.35), 0 5px 12px rgba(0, 0, 0, 0.48);
}

.register-card .btn-primary:hover,
.register-card .btn-primary:focus-visible {
  filter: none;
  background: linear-gradient(180deg, #d19b4d 0%, #aa7437 52%, #805026 100%);
  box-shadow: inset 0 1px 0 rgba(255, 242, 208, 0.4), 0 8px 18px rgba(0, 0, 0, 0.5);
}

.register-card .btn-primary:focus-visible {
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 242, 208, 0.4), 0 0 0 2px rgba(205, 163, 92, 0.42);
}

.register-card .btn-primary:active {
  background: linear-gradient(180deg, #70451f, #8a5c2b);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}

.btn-secondary {
  color: #eaf2f8;
  background: linear-gradient(180deg, #1c4e78, #0d2b47);
  border: 1px solid #2a76ad;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #2a76ad, #10406a);
}

.btn-full {
  width: 100%;
}

.auth-form .btn {
  padding: 10px 18px;
  font-size: 0.92rem;
  margin-top: 14px;
}

.auth-form .checkbox-wrapper:first-of-type {
  margin-top: 12px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  width: 100%;
  font-weight: 600;
}

.form-error {
  background: #fdecea;
  border: 1px solid #e07b6e;
  color: #a63a2e;
}

.form-success {
  background: #eaf6ec;
  border: 1px solid #6fbb84;
  color: #2f7a45;
}

/* ---------- Section captions ---------- */
.section-caption {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-gold-light);
  margin-bottom: 12px;
}

/* ---------- Register card (framed panel) ---------- */
.register-card {
  position: relative;
  padding: var(--card-pad);
  border-radius: 12px;
  background-color: #1d0f05;
  background-image:
    linear-gradient(180deg, rgba(10, 5, 2, 0.55), rgba(6, 3, 1, 0.75)),
    url('../media/textures/navbar-wood.png');
  background-repeat: repeat;
  background-size: auto;
  border: 1px solid rgba(234, 184, 32, 0.8);
  box-shadow: none;
  color: var(--text-light);
}

.register-card {
  border: 1px solid #c49753;
  border-radius: 10px;
  background-color: #120e0b;
  background-image:
    linear-gradient(180deg, rgba(17, 12, 9, 0.88), rgba(8, 6, 4, 0.94)),
    url('../media/textures/navbar-wood.png');
  background-size: auto, 512px 512px;
  background-position: center;
  box-shadow:
    0 0 0 3px rgba(25, 16, 9, 0.9),
    0 0 0 4px rgba(196, 151, 83, 0.62),
    0 22px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 218, 160, 0.2);
}

.register-card::before {
  content: '';
  position: absolute;
  inset: 7px;
  pointer-events: none;
  background:
    linear-gradient(#e4bc70, #e4bc70) left top / 18px 1px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) left top / 1px 18px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) right top / 18px 1px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) right top / 1px 18px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) left bottom / 18px 1px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) left bottom / 1px 18px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) right bottom / 18px 1px no-repeat,
    linear-gradient(#e4bc70, #e4bc70) right bottom / 1px 18px no-repeat;
  opacity: 0.72;
}

.register-card::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  border: 2px solid #c49753;
  background: #21160c;
  box-shadow: 0 0 0 2px rgba(25, 16, 9, 0.9);
  pointer-events: none;
}

.register-card .auth-header p {
  color: #c7b9a8;
}

.auth-header {
  text-align: center;
  margin-bottom: 14px;
}

.auth-header h1,
.auth-header h2 {
  font-family: 'Pirata One', cursive;
  font-size: 1.55rem;
  color: var(--accent-gold-light);
  margin-bottom: 2px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ---------- Forms ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e4c387;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.input-wrapper input {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: #f3eee7;
  font-family: 'Roboto', sans-serif;
  color-scheme: dark;
  background: linear-gradient(180deg, #27211d, #141516);
  border: 1px solid #554536;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrapper input::placeholder {
  color: #aea69d;
  opacity: 1;
}

.input-wrapper input::-webkit-input-placeholder {
  color: #aea69d;
}

.input-wrapper input::-moz-placeholder {
  color: #aea69d;
}

.input-wrapper input:-webkit-autofill {
  -webkit-text-fill-color: #f3eee7;
  box-shadow: inset 0 0 0 100px #201b18;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #b78c52;
  background: linear-gradient(180deg, #33291f, #1c1a18);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(161, 125, 75, 0.16);
}

.input-wrapper input:-webkit-autofill:focus {
  box-shadow: inset 0 0 0 100px #2b241e, 0 0 0 2px rgba(161, 125, 75, 0.16);
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #cfc6b9;
  user-select: none;
}

.checkbox-wrapper input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkbox-wrapper .checkmark {
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin-top: 1px;
  border: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #27211d, #141516);
  box-shadow: inset 0 0 0 1px #554536;
  transition: background 0.15s ease;
}

.checkbox-wrapper input:checked + .checkmark {
  background: #8b612d;
}

.checkbox-wrapper input:checked + .checkmark::after {
  content: '\2713';
  color: #f3f0e9;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkbox-wrapper input:focus-visible + .checkmark {
  outline: 2px solid #d8c89e;
  outline-offset: 2px;
}

.checkbox-wrapper a {
  color: #ffd86b;
  text-decoration: underline;
}

.form-group[aria-hidden="true"] {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

/* ---------- Video section ---------- */
.media-section {
  background: linear-gradient(180deg, #020b13, var(--bg-deep));
  padding: 90px 24px;
  text-align: center;
}

.section-title {
  font-family: 'Pirata One', cursive;
  font-size: 2.4rem;
  margin-bottom: 40px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.video-wrapper {
  max-width: 880px;
  margin: 0 auto;
  padding: 8px;
  border-radius: var(--radius);
  background: #07141f;
  border: 1px solid rgba(234, 184, 32, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.video-wrapper video {
  width: 100%;
  display: block;
  border-radius: 9px;
  background: #000;
}

.video-note {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 2px;
}

/* ---------- Screenshots ---------- */
.screenshots-section {
  background: linear-gradient(180deg, var(--bg-deep), #04121e);
  padding: 30px 24px 56px;
  text-align: center;
}

.screenshots-head .section-caption {
  margin-bottom: 4px;
}

.screenshots-head .section-title {
  margin-bottom: 22px;
  font-size: 2rem;
}

.gallery-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  border-color: rgba(234, 184, 32, 0.5);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
}

.gallery-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 36px 14px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-light);
  background: linear-gradient(180deg, transparent, rgba(2, 10, 17, 0.95) 55%);
  pointer-events: none;
}

.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  border: 2px dashed rgba(234, 184, 32, 0.3);
  background: rgba(10, 25, 40, 0.35);
  color: rgba(234, 240, 247, 0.45);
}

.gallery-placeholder .gallery-placeholder-icon {
  font-size: 2.4rem;
  opacity: 0.85;
  filter: grayscale(1);
}

.gallery-placeholder .gallery-placeholder-text {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 200;
  padding: 0 20px 20px;
  pointer-events: none;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-inner {
  pointer-events: auto;
  max-width: 480px;
  margin: 0 auto 0 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 32, 0.97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.cookie-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.cookie-banner-text strong {
  color: var(--text-light);
  font-size: 0.95rem;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie {
  padding: 9px 20px;
  font-size: 0.88rem;
}

.btn-cookie-reject {
  color: #c9d3dc;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.btn-cookie-reject:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 640px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cookie-banner-actions {
    justify-content: flex-end;
  }
}

/* ---------- Download widget ---------- */
.download-widget {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 28px;
  border-radius: var(--radius);
  background-color: #1c120b;
  background-image:
    linear-gradient(180deg, rgba(62, 42, 24, 0.94), rgba(31, 20, 12, 0.97) 55%, rgba(16, 11, 8, 0.98)),
    url('../media/textures/navbar-wood.png');
  background-size: auto, 512px 512px;
  border: 1px solid rgba(169, 124, 68, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 175, 0.13),
    inset 0 -12px 26px rgba(0, 0, 0, 0.38),
    0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero > .download-widget {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-areas: 'head browser platforms';
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: none;
  margin: 40px auto 0;
  padding: 14px 22px;
  text-align: center;
  scroll-margin-top: 84px;
}

.hero > .download-widget .download-head,
.hero > .download-widget .download-browser,
.hero > .download-widget .download-platforms {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero > .download-widget .download-head { grid-area: head; }
.hero > .download-widget .download-browser { grid-area: browser; }
.hero > .download-widget .download-platforms { grid-area: platforms; }

.hero > .download-widget .download-browser,
.hero > .download-widget .download-platforms {
  border-left: 1px solid rgba(234, 184, 32, 0.25);
  padding-left: 16px;
}

.hero > .download-widget .download-title {
  font-size: 1.6rem;
  margin-bottom: 2px;
}

.hero > .download-widget .download-subtitle,
.hero > .download-widget .download-browser {
  margin-bottom: 0;
}

.hero > .download-widget .download-version {
  margin-top: 4px;
}

.hero > .download-widget .download-platforms-label {
  margin-bottom: 4px;
  color: var(--text-muted);
}

.hero > .download-widget .download-platform-list {
  gap: 8px;
}

.hero > .download-widget .download-platform-btn {
  --platform-top: #203c50;
  --platform-bottom: #112736;
  --platform-border: #39769c;
  --platform-accent: #74c4f2;
  --platform-hover-top: #2a536e;
  --platform-hover-bottom: #19384e;
  --platform-hover-border: #74c4f2;
  --platform-glow: rgba(66, 153, 214, 0.2);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #f3f5f6;
  text-shadow: none;
  border: 1px solid var(--platform-border);
  border-radius: 5px;
  background: linear-gradient(180deg, var(--platform-top), var(--platform-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 5px rgba(0, 0, 0, 0.25);
}

.hero > .download-widget .download-platform-btn svg {
  color: var(--platform-accent);
}

.hero > .download-widget .platform-webgl {
  --platform-top: #3a4147;
  --platform-bottom: #242a30;
  --platform-border: #68717b;
  --platform-accent: #c4cbd1;
  --platform-hover-top: #4b555e;
  --platform-hover-bottom: #303941;
  --platform-hover-border: #aeb8c0;
  --platform-glow: rgba(174, 184, 192, 0.16);
}

.hero > .download-widget .platform-linux {
  --platform-top: #493a21;
  --platform-bottom: #2e2518;
  --platform-border: #846637;
  --platform-accent: #e5bd68;
  --platform-hover-top: #604b29;
  --platform-hover-bottom: #3d301d;
  --platform-hover-border: #d1a853;
  --platform-glow: rgba(209, 168, 83, 0.18);
}

.hero > .download-widget .platform-android {
  --platform-top: #244332;
  --platform-bottom: #152b21;
  --platform-border: #438864;
  --platform-accent: #86dbaa;
  --platform-hover-top: #305840;
  --platform-hover-bottom: #1d3b2b;
  --platform-hover-border: #86dbaa;
  --platform-glow: rgba(93, 194, 135, 0.18);
}

.hero > .download-widget .download-platform-btn:hover,
.hero > .download-widget .download-platform-btn:focus-visible {
  color: #fff;
  border-color: var(--platform-hover-border);
  background: linear-gradient(180deg, var(--platform-hover-top), var(--platform-hover-bottom));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px var(--platform-glow);
  transform: translateY(-1px);
}

.hero > .download-widget .download-platform-btn:active {
  background: var(--platform-bottom);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
}

@media (min-width: 1500px) and (min-height: 850px) {
  .hero {
    min-height: 0;
  }
}

@media (max-height: 800px) and (min-width: 901px) {
  .hero-media .video-wrapper {
    max-width: 440px;
  }
}

.download-head .download-title {
  font-family: 'Pirata One', cursive;
  font-size: 1.9rem;
  color: var(--text-light);
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.download-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 22px;
}

.download-browser {
  text-align: center;
  margin-bottom: 18px;
}

.download-btn-main {
  width: 200px;
  height: 62px;
  padding: 0 16px;
  color: #fff;
  font-family: 'Pirata One', cursive;
  font-size: 1.2rem;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(45, 12, 0, 0.9);
  border: 0;
  border-radius: 0;
  background: url('../media/textures/play-now-btn.png') center / 100% 100% no-repeat;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.download-btn-main.pointing-finger {
  position: relative;
}

.download-btn-main.pointing-finger::before {
  content: "👉";
  position: absolute;
  left: -26px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  line-height: 1;
  animation: finger-point 1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes finger-point {
  0%, 100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-6px);
  }
}

.download-btn-main:hover,
.download-btn-main:focus-visible {
  color: #fff;
  background-image: url('../media/textures/play-now-btn-hover.png');
  filter: brightness(1.12);
}

.download-platforms {
  text-align: center;
}

.download-platforms-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 10px;
}

.download-platform-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.download-platform-btn.platform-windows,
.download-platform-sep {
  display: none;
}

.download-platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.download-platform-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.download-platform-btn.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.download-platform-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  flex-shrink: 0;
}

.platform-tag {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 3px;
  vertical-align: middle;
}

.platform-tag.soon {
  background: rgba(234, 184, 32, 0.25);
  color: var(--accent-gold-light);
}

.platform-tag.never {
  background: rgba(180, 60, 60, 0.3);
  color: #c77;
}

.download-btn {
  min-width: auto;
  padding: 10px 18px;
  font-size: 0.82rem;
  border-radius: 8px;
  white-space: nowrap;
}

.download-btn-icon {
  flex-shrink: 0;
}

.download-btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.6);
  pointer-events: none;
}

.coming-soon {
  opacity: 0.55;
  cursor: default;
}

.coming-soon:hover {
  transform: none;
}

.coming-soon.never {
  opacity: 0.4;
}

.coming-soon.never:hover {
  transform: none;
}

.coming-soon-label {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(234, 184, 32, 0.2);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--accent-gold-light);
}

.never-label {
  background: rgba(180, 50, 50, 0.3);
  color: #c77;
}

.download-badge {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-gold-light);
  border: 1px solid rgba(234, 184, 32, 0.35);
}

.download-version {
  margin-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

/* ---------- Rank list ---------- */
.rank-section {
  background: linear-gradient(180deg, #04121e, var(--bg-deep));
  padding: 48px 24px 56px;
  text-align: center;
}

.rank-container {
  max-width: 760px;
  margin: 0 auto;
}

.rank-section .section-title {
  margin-bottom: 8px;
}

.rank-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.rank-board {
  text-align: left;
}

.rank-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.rank-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 10px rgba(234, 184, 32, 0.6);
  animation: rank-pulse 1s ease-in-out infinite;
}

.rank-loading-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.rank-loading-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes rank-pulse {
  0%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  background-color: #0b202b;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(31, 108, 119, 0.3), transparent 60%),
    linear-gradient(150deg, #163845, #0b202b 55%, #06141f);
  border: 1px solid rgba(88, 166, 175, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(156, 225, 226, 0.13),
    inset 0 -12px 26px rgba(0, 7, 13, 0.35),
    0 10px 30px rgba(0, 0, 0, 0.45);
}

.rank-table th,
.rank-table td {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.rank-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffe6b3;
  background: rgba(5, 24, 34, 0.82);
  border-bottom: 2px solid rgba(88, 166, 175, 0.45);
}

.rank-table th.rank-pvp-header {
  color: #ff5040;
  text-shadow: 0 0 10px rgba(255, 80, 64, 0.45);
  text-align: right;
}

.rank-table th.rank-xp-header {
  text-align: right;
}

.rank-table td {
  border-bottom: 1px solid rgba(130, 200, 210, 0.13);
}

.rank-table tbody tr:last-child td {
  border-bottom: none;
}

.rank-table tbody tr {
  background: rgba(12, 39, 48, 0.5);
  transition: background 0.15s ease;
}

.rank-table tbody tr:nth-child(even) {
  background: rgba(4, 21, 32, 0.58);
}

.rank-table tbody tr:hover {
  background: rgba(38, 112, 125, 0.3);
}

.rank-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-light);
}

.rank-table td.rank-xp {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
}

.rank-table td.rank-pvp {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ff3b30;
  text-shadow: 0 0 12px rgba(255, 59, 48, 0.55);
  text-align: right;
}

.rank-table td.rank-place {
  font-family: 'Pirata One', cursive;
  font-size: 1.2rem;
  text-align: center;
  width: 52px;
}

.rank-1 {
  color: #ffd86b;
  text-shadow: 0 0 14px rgba(234, 184, 32, 0.55);
}

.rank-2 {
  color: #cfd8e3;
  text-shadow: 0 0 12px rgba(207, 216, 227, 0.45);
}

.rank-3 {
  color: #e0965f;
  text-shadow: 0 0 12px rgba(224, 150, 95, 0.45);
}

.rank-error {
  text-align: center;
  color: #e07b6e;
  font-size: 0.9rem;
  padding: 20px;
}

.rank-board .rank-error {
  display: block;
}

.rank-note {
  margin-top: 16px;
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: #5b7a93;
}

@media (max-width: 520px) {
  .rank-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .rank-table {
    table-layout: fixed;
  }

  .rank-table th,
  .rank-table td {
    padding: 10px 5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rank-table th {
    font-size: 0.62rem;
    letter-spacing: 0.4px;
  }

  .rank-table th:first-child,
  .rank-table td:first-child { width: 12%; }

  .rank-table th:nth-child(2),
  .rank-table td:nth-child(2) { width: 38%; }

  .rank-table th:nth-child(3),
  .rank-table td:nth-child(3) { width: 25%; }

  .rank-table th:nth-child(4),
  .rank-table td:nth-child(4) { width: 25%; }

  .rank-table td.rank-place {
    font-size: 1rem;
  }

  .rank-table td.rank-name,
  .rank-table td.rank-pvp,
  .rank-table td.rank-xp {
    font-size: 0.78rem;
  }
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  background-color: #1b1712;
  background-image:
    linear-gradient(180deg, rgba(12, 9, 7, 0.55), rgba(5, 5, 5, 0.72)),
    url('../media/textures/nav-dark-wood-planks.jpg');
  background-repeat: repeat;
  background-size: auto, 1024px 1024px;
  background-position: center, center 47%;
  border-top: 3px solid #4a2e0e;
  box-shadow:
    inset 0 -6px 12px rgba(0, 0, 0, 0.45),
    0 6px 22px rgba(0, 0, 0, 0.6);
  padding: 20px 24px;
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.footer-legal {
  color: #74a0bd;
  font-size: 0.82rem;
  line-height: 2;
  margin-top: 4px;
}

.footer-copy {
  color: #74a0bd;
  font-size: 0.82rem;
  line-height: 2;
  margin-top: 12px;
}

.footer-links {
  color: #74a0bd;
  font-size: 0.9rem;
  line-height: 2;
}

.footer-links a {
  color: #9fc6dd;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent-gold-light);
}

.footer-links .footer-discord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}

.footer-links .footer-discord svg {
  flex-shrink: 0;
}

.footer-legal .sep,
.footer-links .sep {
  color: #3d668a;
}

.footer-links .sep {
  margin: 0 5px;
}

.footer-legal a {
  color: #9fc6dd;
  transition: color 0.15s ease;
}

.footer-legal a:hover {
  color: var(--accent-gold-light);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0;
  }

  .title-line {
    display: block;
  }

  .hero-side {
    display: block;
  }

  .hero > .download-widget {
    grid-template-areas:
      'head browser'
      'platforms platforms';
    grid-template-columns: 1fr auto;
  }

  .hero-side .register-card {
    margin: 0;
  }

  .hero {
    padding-top: 96px;
  }

}

@media (max-width: 700px) {
  .navbar-container {
    height: 56px;
    padding: 7px 14px;
  }

  .navbar-logo {
    font-size: 1.35rem;
  }

  .hero {
    padding: 96px 16px 48px;
    gap: 32px;
  }

  .hero-side {
    max-width: 340px;
  }

  .hero-inner {
    gap: 40px;
  }

  .title-line {
    display: inline;
  }

  .hero > .download-widget {
    grid-template-areas:
      'head'
      'browser'
      'platforms';
    grid-template-columns: 1fr;
  }

  .hero > .download-widget .download-browser,
  .hero > .download-widget .download-platforms {
    border-left: 0;
    border-top: 1px solid rgba(234, 184, 32, 0.25);
    padding: 12px 0 0;
  }

  .hero > .download-widget .download-browser {
    width: 100%;
  }

  .hero-shots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .navbar-logo-img {
    height: 42px;
  }

  .navbar-links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 14px 18px 18px;
    background-color: #1b1712;
    background-image:
      linear-gradient(180deg, rgba(24, 15, 8, 0.28), rgba(7, 6, 5, 0.58)),
      url('../media/textures/nav-dark-wood-planks.jpg');
    background-repeat: repeat;
    background-size: auto, 1024px 1024px;
    background-position: center, center 47%;
    border-top: 2px solid rgba(234, 184, 32, 0.55);
    border-bottom: 3px solid #5d3a12;
    width: 100%;
  }

  .mobile-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #f3e3c2;
    background: rgba(30, 16, 4, 0.55);
    text-shadow: 0 2px 2px rgba(20, 10, 3, 0.8);
  }

  .mobile-link:hover {
    background: rgba(234, 184, 32, 0.25);
    color: var(--accent-gold-light);
  }

  .hero-title {
    white-space: nowrap;
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .mobile-link.nav-forum,
  .mobile-link.nav-discord {
    width: auto;
    padding: 0;
    font-size: 1rem;
    background: transparent;
    text-align: center;
  }

  .mobile-link.nav-forum:hover,
  .mobile-link.nav-discord:hover {
    background: transparent;
  }

  .mobile-link.nav-discord {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .mobile-link.btn-play {
    display: inline-flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 144px;
    height: 45px;
    margin-top: 2px;
    padding: 0 12px;
    color: #fff;
    font-family: 'Pirata One', cursive;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(45, 12, 0, 0.9);
    background: url('../media/textures/play-now-btn.png') center / 100% 100% no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-link.btn-play:hover,
  .mobile-link.btn-play:focus-visible {
    color: #fff;
    background-image: url('../media/textures/play-now-btn-hover.png');
    filter: brightness(1.12);
  }

  .btn {
    width: 100%;
  }
}
