/* Structure shared by the original packs (dragon, viking, fullmoon, modern21,
   atlantis): the parts every one of them carries, laid out but unpainted.
   Each pack's own theme.css supplies colour, type, texture and ornament. */

.pk-root { position: relative; min-height: 100vh; overflow-x: clip; -webkit-font-smoothing: antialiased; }
.pk-root *, .pk-root *::before, .pk-root *::after { box-sizing: border-box; }
.pk-root img { max-width: 100%; }
.pk-root a { text-decoration: none; }
.pk-root button { font: inherit; cursor: pointer; }

/* Decorative particle field: each span is placed and timed by custom
   properties; the pack names the animation. */
.pk-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.pk-particles span { position: absolute; left: var(--x); top: var(--y); display: block; will-change: transform, opacity; animation-delay: var(--delay); animation-duration: var(--dur); animation-iteration-count: infinite; animation-timing-function: linear; }

/* Slider: stacked slides that crossfade, the shown picture drifting closer. */
.pk-slider { position: relative; overflow: hidden; aspect-ratio: 16 / 7; isolation: isolate; }
.pk-slides { position: absolute; inset: 0; }
.pk-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.pk-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease; z-index: 1; }
.pk-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: scale(1.02); }
.pk-slide.is-active .pk-slide-img { animation: pk-drift 9s ease-out forwards; }
.pk-slide-copy { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: .5rem; justify-items: start; padding: 2.5rem 2rem 2.6rem; }
.pk-slide-title, .pk-slide-text { margin: 0; }
.pk-slider-arrow { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; opacity: 0; transition: opacity .25s ease, transform .25s ease, background-color .25s ease; }
.pk-slider-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pk-slider-arrow--prev { left: 14px; }
.pk-slider-arrow--next { right: 14px; }
.pk-slider:hover .pk-slider-arrow, .pk-slider:focus-within .pk-slider-arrow { opacity: 1; }
.pk-slider-dots { position: absolute; right: 1.25rem; bottom: 1.1rem; z-index: 3; display: flex; gap: .45rem; }
.pk-slider-dot { width: 26px; height: 5px; padding: 0; border: 0; border-radius: 3px; transition: width .3s ease, background-color .3s ease; }
.pk-slider-dot.is-active { width: 44px; }
@keyframes pk-drift { from { transform: scale(1.02); } to { transform: scale(1.1); } }

/* Buttons and fields. */
.pk-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem 1.4rem; border: 0; text-align: center; white-space: nowrap; transition: filter .2s ease, transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.pk-button:hover:not(:disabled) { transform: translateY(-1px); }
.pk-button:active:not(:disabled) { transform: translateY(1px); }
.pk-button:disabled { opacity: .6; cursor: progress; }
.pk-login { display: grid; gap: .8rem; }
.pk-field { display: grid; gap: .3rem; }
.pk-input { width: 100%; min-height: 44px; padding: .55rem .8rem; font: inherit; font-size: 16px; }
.pk-turnstile { min-height: 65px; }
.pk-error { margin: 0; font-size: .85rem; }
.pk-login .pk-button { width: 100%; }
.pk-login-links { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; font-size: .85rem; }
.pk-account { display: grid; gap: .9rem; }
.pk-welcome { margin: 0; }
.pk-account-links { display: grid; gap: .25rem; }
.pk-account-links a { display: flex; align-items: center; gap: .55rem; min-height: 36px; padding: .3rem .7rem; font-size: .92rem; line-height: 1.25; }
.pk-account-icon { flex: none; width: 1.1rem; text-align: center; opacity: .8; }
.pk-account-links a.is-current { font-weight: 700; box-shadow: inset 3px 0 currentColor; }
.pk-account .pk-button { width: 100%; }

/* Ranking and events lists. */
.pk-rank, .pk-events { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.pk-rank-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 10px; align-items: center; gap: .65rem; min-height: 42px; padding: .35rem .6rem; }
.pk-rank-pos { display: grid; place-items: center; width: 2rem; height: 2rem; font-weight: 700; }
.pk-rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-rank-meta { font-size: .8rem; white-space: nowrap; }
.pk-empire { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgb(0 0 0 / .35); }
.pk-empire--1 { background: #d8413a; }
.pk-empire--2 { background: #e5b53b; }
.pk-empire--3 { background: #3d7fe0; }
.pk-more { display: inline-flex; margin-top: .75rem; font-size: .85rem; }
.pk-event { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title time" "day time"; gap: .1rem .75rem; align-items: center; padding: .55rem .7rem; }
.pk-event-title { grid-area: title; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-event-day { grid-area: day; font-size: .78rem; }
.pk-event-time { grid-area: time; font-size: .85rem; font-variant-numeric: tabular-nums; }
.pk-empty { margin: 0; padding: .75rem 0; font-size: .9rem; }

/* News cards on the landing page. */
.pk-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.pk-news-card { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem 1.5rem; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease; }
.pk-news-card:hover { transform: translateY(-3px); }
.pk-news-title { font-size: 1.2rem; line-height: 1.25; }
.pk-news-excerpt { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; line-height: 1.6; }
.pk-news-more { margin-top: auto; padding-top: .35rem; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.pk-news-empty { margin: 0; padding: 2.5rem 1.5rem; text-align: center; }

/* Language toggle. */
.pk-lang { display: inline-flex; padding: 3px; }
.pk-lang button { min-width: 38px; min-height: 32px; padding: 0 .55rem; border: 0; background: none; font-size: .78rem; font-weight: 700; letter-spacing: .06em; transition: background-color .2s ease, color .2s ease; }

@media (max-width: 768px) {
  .pk-slider { aspect-ratio: 4 / 3; }
  .pk-slide-copy { padding: 1.25rem 1rem 2.6rem; }
  .pk-slider-dots { left: 1rem; right: auto; bottom: .9rem; }
  .pk-slider-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pk-particles { display: none; }
  .pk-slide.is-active .pk-slide-img { animation: none; }
}
