/* ============================================================
   Onesi.pl — Minecraft Serwer OOT
   Minimalistic white bg, isometric floating cubes, blue slab
   hero title, yellow CTA, lock popover.
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #4a4a5c;
  --ink-soft: #8b8b98;
  --ink-faint: #cbcbd3;
  --border: #ececf1;

  --blue-1: #b3d5f0;
  --blue-2: #7cb5e0;
  --blue-3: #4d95cf;
  --blue-4: #3a7fb8;

  --yellow: #ffcc1a;
  --yellow-hover: #ffbb00;

  --shadow-soft: 0 20px 40px -10px rgba(30, 40, 70, 0.12);
  --shadow-strong: 0 30px 50px -20px rgba(30, 40, 70, 0.22);
  --shadow-pop: 0 20px 40px -12px rgba(30, 40, 70, 0.25);

  --gutter: clamp(20px, 5vw, 80px);
  --title-mine: clamp(36px, 5.6vw, 62px);
  --title-side: clamp(26px, 4.2vw, 46px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body { position: relative; min-height: 100vh; }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ============ Layout ============ */

.page {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px var(--gutter) 60px;
  z-index: 2;
}

/* ============ Background floating cubes ============ */

.bg-cubes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.cube {
  position: absolute;
  filter: drop-shadow(0 14px 20px rgba(30, 40, 70, 0.08));
  animation: cube-float 8s ease-in-out infinite;
}
.cube svg { width: 100%; height: auto; display: block; }

.cube--tl-1     { top: 40px;  left: -70px;   width: 210px; animation-delay: 0s; }
.cube--tl-2     { top: 220px; left: 60px;    width: 120px; animation-delay: 1.2s; }
.cube--top-drop { top: 130px; left: 44%;     width: 100px; animation-delay: 2.4s; }
.cube--tr-big   { top: 0;     right: -110px; width: 260px; animation-delay: 1.8s; }
.cube--tr-small { top: 200px; right: 40%;    width: 90px;  animation-delay: 0.6s; }
.cube--mid-left { top: 460px; left: 30px;    width: 90px;  animation-delay: 3s; }

@keyframes cube-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ============ Header ============ */

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 5;
}

/* Logo — big yellow OOT */
.logo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  line-height: 1;
}
.logo-oot {
  font-weight: 900;
  font-size: 44px;
  color: var(--yellow);
  letter-spacing: -0.03em;
  text-shadow: 0 8px 20px rgba(255, 190, 0, 0.2);
}

.nav {
  display: flex;
  gap: clamp(20px, 2.4vw, 44px);
  justify-content: center;
}

.nav-link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--ink);
  padding: 6px 2px;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--blue-4); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 30%;
  height: 1.5px;
  background: var(--ink);
}

.header-actions {
  display: flex;
  gap: 16px;
  justify-self: end;
  align-items: center;
}

/* ============ Lock button + popover ============ */

.lock { position: relative; }

.lock-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  color: var(--ink);
  padding: 0;
  display: grid;
  place-items: center;
  transition: color 0.2s;
}
.lock-btn:hover { color: var(--blue-4); }
.lock-btn svg { width: 22px; height: 22px; }
.lock-icon-open  { display: none; }
.lock.is-unlocked .lock-icon-closed { display: none; }
.lock.is-unlocked .lock-icon-open   { display: block; color: var(--yellow); }

.lock-popover {
  position: absolute;
  top: calc(100% + 14px);
  right: -8px;
  width: 280px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  padding: 18px;
  z-index: 10;
  animation: pop-in 0.18s ease-out;
}
.lock-popover[hidden] { display: none; }

.lock-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  transform: rotate(45deg);
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lock-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.lock-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.lock-input-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.lock-input-row input:focus { border-color: var(--blue-3); }
.lock-input-row button {
  border: none;
  background: var(--yellow);
  color: #2d2412;
  width: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s;
}
.lock-input-row button:hover { background: var(--yellow-hover); }
.lock-input-row button svg { width: 16px; height: 16px; }

.lock-feedback {
  font-size: 11px;
  margin-top: 8px;
  min-height: 14px;
  color: var(--ink-soft);
}
.lock-feedback.err { color: #d64541; }
.lock-feedback.ok  { color: #3a9944; }

/* Unlocked panel */
.lock-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lock-panel[hidden] { display: none; }

.lock-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 4px;
}
.lock-panel-title svg { width: 16px; height: 16px; color: var(--yellow); }

.lock-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.lock-link:hover {
  border-color: var(--blue-3);
  background: #f6faff;
}
.lock-link-arrow { color: var(--blue-3); font-weight: 600; }

.lock-relock {
  margin-top: 4px;
  background: transparent;
  border: none;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 0;
  text-align: left;
  transition: color 0.15s;
}
.lock-relock:hover { color: var(--ink); }

/* ============ Icon button (hamburger) ============ */

.icon-btn {
  background: transparent;
  border: none;
  width: 26px;
  height: 26px;
  color: var(--ink);
  padding: 0;
  display: grid;
  place-items: center;
  transition: color 0.2s;
}
.icon-btn:hover { color: var(--blue-4); }
.icon-btn svg { width: 100%; height: 100%; }

/* ============ Mobile nav drawer ============ */

.nav-mobile {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  padding: 16px 24px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nav-mobile[hidden] { display: none; }

/* ============ Hero ============ */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(20px, 4vw, 48px);
  position: relative;
  align-items: start;
}

.hero-left {
  position: relative;
  padding-top: 12px;
  min-width: 0;
}

.blue-slab {
  position: absolute;
  top: 0;
  left: 12px;
  width: clamp(260px, 42vw, 420px);
  height: clamp(300px, 46vw, 440px);
  background: linear-gradient(
    180deg,
    var(--blue-1) 0%,
    var(--blue-2) 55%,
    var(--blue-3) 100%
  );
  z-index: 0;
}

.hero-title {
  position: relative;
  z-index: 2;
  margin: 0;
  padding-top: clamp(30px, 4vw, 48px);
  padding-left: clamp(18px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.title-minecraft {
  font-size: var(--title-mine);
  background: linear-gradient(180deg, var(--blue-3) 0%, var(--blue-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: -2px;
}

.title-grand,
.title-opening {
  font-size: var(--title-side);
  color: #ffffff;
  letter-spacing: 0.01em;
}
.title-grand   { padding-left: clamp(10px, 2vw, 20px); }
.title-opening { padding-left: clamp(20px, 4vw, 44px); }

.mini-shot {
  position: relative;
  z-index: 2;
  margin: clamp(24px, 4vw, 40px) 0 0 clamp(20px, 5vw, 60px);
  width: min(300px, 78%);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.mini-shot img { width: 100%; height: 100%; object-fit: cover; }

.hero-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: clamp(20px, 4vw, 40px);
  min-width: 0;
}

.feature-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 5 / 4;
}

.feature-frame {
  position: absolute;
  inset: 20px -20px -20px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px -12px rgba(30, 40, 70, 0.14);
  z-index: 1;
}

.feature-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 2;
  box-shadow: var(--shadow-strong);
}
.feature-image img { width: 100%; height: 100%; object-fit: cover; }

/* Subscribe / copy button with two states */
.subscribe-wrap {
  margin-top: clamp(28px, 4vw, 40px);
  margin-right: -12px;
  z-index: 3;
  position: relative;
}

.btn-subscribe {
  position: relative;
  background: var(--yellow);
  color: #2d2412;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.28em;
  padding: 16px 40px;
  border: none;
  border-radius: 0;
  box-shadow: 0 14px 26px -10px rgba(200, 150, 0, 0.55);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  min-width: 240px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-subscribe:hover {
  background: var(--yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -10px rgba(200, 150, 0, 0.6);
}
.btn-subscribe:active { transform: translateY(0); }

.btn-label, .btn-copied {
  display: inline-block;
  transition: opacity 0.22s, transform 0.22s;
}
.btn-copied {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(10px);
}
.btn-subscribe.is-copied .btn-label  { opacity: 0; transform: translateY(-10px); }
.btn-subscribe.is-copied .btn-copied { opacity: 1; transform: translateY(0); }

/* ============ Content pages (server/rules/about/contact) ============ */

.content {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: clamp(40px, 8vw, 100px) auto 0;
  padding: 0 clamp(4px, 2vw, 24px);
}

.content-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
}

.content-title {
  font-size: clamp(36px, 5.6vw, 62px);
  font-weight: 900;
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--blue-3) 0%, var(--blue-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.content-lead {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--ink);
  line-height: 1.65;
  margin: 0 0 32px;
}

.content h2 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 14px;
}

.content ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.content ul li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.content ul li:last-child { border-bottom: none; }
.content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  width: 8px;
  height: 8px;
  background: var(--yellow);
}

.info-card {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 24px 26px;
  margin: 24px 0 32px;
}
.info-card h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.info-card .info-value {
  font-family: 'Poppins', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.info-card .info-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* Inline code style */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: #f4f4f8;
  border: 1px solid var(--border);
  padding: 1px 8px;
  color: var(--ink);
}

/* ============ Platform cards (Java / Bedrock instructions) ============ */

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 8px 0 32px;
}

.platform-card {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.platform-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.platform-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: #2d2412;
  flex-shrink: 0;
}
.platform-icon svg { width: 22px; height: 22px; }

.platform-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.platform-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 0 !important;
  border: none !important;
}
.steps li::before { display: none; }

.step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue-3), var(--blue-4));
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}
.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}
.step-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.platform-note {
  background: #fffcf0;
  border-left: 3px solid var(--yellow);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
}

/* ============ Players list (aktualnie.html) ============ */

.players-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 24px;
}
.players-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.05em;
}
.players-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a9944;
  box-shadow: 0 0 0 3px rgba(58, 153, 68, 0.15);
}
.players-dot.is-off {
  background: #d64541;
  box-shadow: 0 0 0 3px rgba(214, 69, 65, 0.15);
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0 40px;
}
.player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s, box-shadow 0.2s;
}
.player-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px -14px rgba(30, 40, 70, 0.16);
}
.player-chip img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.player-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.players-empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  background: #f9f9fc;
  border: 1px dashed var(--border);
}

/* ============ Map iframe (mapa.html) ============ */

.body-map { min-height: 100vh; }
.page--map {
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.map-wrap {
  margin-top: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.map-header { display: flex; flex-direction: column; gap: 4px; }

.map-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--blue-3) 0%, var(--blue-4) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.map-iframe-wrap {
  flex: 1;
  min-height: 480px;
  background: #f4f4f8;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.map-iframe-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.discord-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #ffffff;
  padding: 24px 28px;
  margin: 24px 0;
  box-shadow: 0 20px 40px -14px rgba(88, 101, 242, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.discord-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -14px rgba(88, 101, 242, 0.55);
}
.discord-card svg { width: 40px; height: 40px; flex-shrink: 0; }
.discord-card .discord-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  opacity: 0.8;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.discord-card .discord-handle {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.discord-card .discord-arrow {
  margin-left: auto;
  font-size: 20px;
  font-weight: 300;
  opacity: 0.9;
}

/* ============ Responsive ============ */

@media (max-width: 1100px) {
  .cube--tr-small { display: none; }
  .cube--mid-left { display: none; }
  .cube--tr-big   { width: 200px; right: -70px; }
  .cube--tl-1     { width: 170px; }
}

@media (max-width: 900px) {
  .nav { gap: 20px; }
  .nav-link { font-size: 10px; letter-spacing: 0.24em; }
}

@media (max-width: 860px) {
  .platform-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .header {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }
  .nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-left  { padding-top: 8px; }
  .hero-right {
    align-items: center;
    padding-top: 0;
  }

  .feature-card { max-width: 100%; }
  .feature-frame { inset: 14px -14px -14px 14px; }

  .mini-shot {
    width: min(300px, 92%);
    margin-top: 28px;
    margin-left: clamp(10px, 4vw, 40px);
  }

  .blue-slab { left: 4px; }

  .cube--tr-big { display: none; }
  .cube--tl-2   { display: none; }
  .cube--tl-1   { width: 120px; top: 20px; left: -40px; opacity: 0.6; }
  .cube--top-drop { display: none; }

  .lock-popover { right: -32px; width: 260px; }
  .lock-popover::before { right: 36px; }
}

@media (max-width: 480px) {
  .page { padding-top: 20px; }
  .logo-oot { font-size: 32px; }
  .header-actions { gap: 10px; }
  .icon-btn { width: 22px; height: 22px; }
  .lock-btn { width: 24px; height: 24px; }
  .lock-btn svg { width: 20px; height: 20px; }

  .btn-subscribe {
    padding: 14px 28px;
    font-size: 11px;
    letter-spacing: 0.22em;
    min-width: 200px;
  }

  .subscribe-wrap { margin-right: 0; }
  .feature-frame { inset: 10px -10px -10px 10px; }

  .cube { display: none; }

  .lock-popover {
    right: 0;
    width: calc(100vw - 40px);
    max-width: 320px;
  }
}
