/* ===========================================================
   Minecraft server portfolio — single page
   Purple / black theme. Edit colours and spacing here.
   Content lives in app.js
   =========================================================== */

:root {
  --bg: #08070d;
  --bg-2: #0d0a16;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #ece9f7;
  --muted: #a29ab8;
  --accent: #a855f7;
  --accent-2: #c084fc;
  --radius: 18px;
  --maxw: 940px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(168, 85, 247, 0.22), transparent 70%),
    radial-gradient(700px 480px at 85% 15%, rgba(192, 132, 252, 0.11), transparent 70%),
    radial-gradient(700px 480px at 10% 85%, rgba(124, 58, 237, 0.14), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* ---------- background grid + floating blocks ---------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}

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

.blk {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 4px;
  background: linear-gradient(150deg, rgba(168, 85, 247, 0.26), rgba(168, 85, 247, 0.03));
  border: 1px solid rgba(168, 85, 247, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: float var(--dur) ease-in-out var(--delay) infinite;
  opacity: 0.75;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(0, -22px, 0) rotate(9deg); }
}

/* ---------- opening animation ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.intro__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.4%;
  background:
    linear-gradient(180deg, #0b0912, #07050c),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 56px);
  border-right: 1px solid rgba(168, 85, 247, 0.20);
}
.intro__panel--l { left: 0;  animation: panelL 900ms cubic-bezier(.76, 0, .24, 1) 1450ms forwards; }
.intro__panel--r { right: 0; border-right: 0; border-left: 1px solid rgba(168, 85, 247, 0.20); animation: panelR 900ms cubic-bezier(.76, 0, .24, 1) 1450ms forwards; }

@keyframes panelL { to { transform: translateX(-101%); } }
@keyframes panelR { to { transform: translateX(101%); } }

.intro__center {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  animation: introOut 420ms ease 1180ms forwards;
}

@keyframes introOut {
  to { opacity: 0; transform: translateY(-10px) scale(.97); }
}

.intro__cube {
  width: 46px;
  height: 46px;
  position: relative;
  animation: cubeSpin 2.4s linear infinite;
  transform-style: preserve-3d;
}
.intro__cube .face {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  border: 1px solid rgba(168, 85, 247, 0.5);
}
.face--top   { background: rgba(168, 85, 247, 0.6); transform: translateY(-9px) scale(.92); }
.face--front { background: rgba(168, 85, 247, 0.24); }
.face--side  { background: rgba(168, 85, 247, 0.13); transform: translateX(9px) scale(.92); }

@keyframes cubeSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.intro__text {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--accent-2);
  text-transform: uppercase;
}

.intro__bar {
  width: 168px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.intro__bar i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: loadBar 1250ms cubic-bezier(.5, 0, .2, 1) forwards;
}
@keyframes loadBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

body.intro-done .intro { display: none; }

/* ---------- layout ---------- */

.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 22px 56px;
}

/* ---------- hero ---------- */

.hero { text-align: center; }

.eyebrow {
  margin: 0 0 26px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--accent-2);
  text-transform: uppercase;
  opacity: .9;
}

.icon-slot {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.icon {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px dashed var(--line-2);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
  overflow: hidden;
  box-shadow: 0 18px 44px -22px rgba(0, 0, 0, .9);
}

.icon:hover,
.icon.is-drag {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(168, 85, 247, .65);
  box-shadow: 0 22px 50px -20px rgba(168, 85, 247, .4);
}

.icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: iconIn .5s cubic-bezier(.2, .8, .2, 1);
}

@keyframes iconIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }

.icon__empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.icon__empty svg { width: 26px; height: 26px; }

.icon__hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 7px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 7, 13, .72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .22s, transform .22s;
}
.icon:hover .icon__hint { opacity: 1; transform: translateY(0); }
.icon.has-image .icon__empty { display: none; }

.icon__reset {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color .2s;
}
.icon__reset:hover { color: var(--text); }

h1 {
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 20%, #c9bde0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin: 0 auto 26px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.ipbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  max-width: 100%;
}

.ipbar__label {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--accent-2);
}

.ipbar code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ipbar__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, .38);
  background: rgba(168, 85, 247, .16);
  color: #f0e6ff;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s, border-color .2s;
}
.ipbar__copy svg { width: 15px; height: 15px; }
.ipbar__copy:hover { background: rgba(168, 85, 247, .26); border-color: rgba(168, 85, 247, .62); }
.ipbar__copy:active { transform: scale(.96); }
.ipbar__copy.is-done { background: rgba(168, 85, 247, .42); border-color: var(--accent-2); color: #fff; }

.about {
  margin: 26px auto 0;
  max-width: 62ch;
  color: #c3bcd6;
  font-size: .98rem;
  font-weight: 300;
}

/* ---------- link buttons ---------- */

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 54px;
}

.link-card {
  --accent: var(--accent);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s, background .28s, box-shadow .28s;
}

.link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 120px at 0% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--panel-2);
  box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--accent) 70%, transparent);
  outline: none;
}
.link-card:hover::after,
.link-card:focus-visible::after { opacity: 1; }

.link-card__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--accent);
}
.link-card__icon svg { width: 20px; height: 20px; }

.link-card__text { display: grid; gap: 1px; min-width: 0; }
.link-card__label { font-weight: 600; font-size: .98rem; letter-spacing: -.01em; }
.link-card__sub {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card__arrow {
  margin-left: auto;
  color: var(--muted);
  transition: transform .28s, color .28s;
}
.link-card__arrow svg { width: 16px; height: 16px; display: block; }
.link-card:hover .link-card__arrow { transform: translateX(3px); color: var(--accent); }

/* ---------- widgets ---------- */

.widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.widget-card {
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.widget-card__title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.widget-card__body { min-height: 84px; display: grid; place-items: center; }

.widget-card__body iframe {
  width: 100%;
  border: 0;
  border-radius: 12px;
  display: block;
}

.widget-card__empty {
  text-align: center;
  color: #8b83a3;
  font-size: .82rem;
  line-height: 1.5;
  padding: 12px 6px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  width: 100%;
}
.widget-card__empty code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: .78rem;
  color: var(--accent-2);
}

/* ---------- footer ---------- */

.foot {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #7d7594;
  font-size: .78rem;
}
.foot p { margin: 0; }

/* ---------- entrance animations ---------- */

.fade-up { opacity: 0; transform: translateY(16px); }
body.ready .fade-up {
  animation: fadeUp .75s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .page { padding: 52px 16px 44px; }
  .icon { width: 112px; height: 112px; border-radius: 22px; }
  .links { grid-template-columns: 1fr; }
  .ipbar { width: 100%; justify-content: space-between; }
  .ipbar code { font-size: .85rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .intro { display: none; }
  .fade-up, .reveal { opacity: 1; transform: none; }
  .blk { display: none; }
}
