:root {
    color-scheme: dark;
    --bg: #050308;
    --bg-deep: #0a0711;
    --panel: rgba(18, 13, 27, 0.92);
    --panel-strong: rgba(10, 8, 17, 0.96);
    --panel-border: rgba(205, 165, 92, 0.32);
    --text: #f4ead6;
    --muted: #aaa7b8;
    --accent: #6fb7ff;
    --accent-dark: #234d7d;
    --gold: #cda65d;
    --gold-bright: #f3d38a;
    --blood: #9d2f3d;
    --shadow: rgba(0, 0, 0, 0.62);
    --radius: 6px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: #050308;
    color: var(--text);
}

/* Capa fija del arte de fondo + atmosfera. Se mueve con transform (GPU),
   no con background-position: cero repaint al scrollear. */
body::before {
    position: fixed;
    inset: -4% 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(5, 3, 8, 0.38) 0%, rgba(5, 3, 8, 0.5) 42%, rgba(3, 2, 7, 0.82) 100%),
        radial-gradient(circle at 50% 12%, rgba(243, 211, 138, 0.16), transparent 24rem),
        radial-gradient(circle at 50% 72%, rgba(111, 183, 255, 0.1), transparent 30rem),
        url('../img/hero-bg.png') center 34% / cover no-repeat;
    content: "";
    pointer-events: none;
    animation: bgDrift 55s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes bgDrift {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to   { transform: translate3d(0, -2.5%, 0) scale(1.1); }
}

/* Viñeta + grano sutil. Las alphas del grano ya incluyen el viejo opacity 0.16. */
body::after {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.12) 20%, rgba(0, 0, 0, 0.12) 80%, rgba(0, 0, 0, 0.62)),
        linear-gradient(180deg, rgba(3, 2, 7, 0.16), transparent 24%, rgba(3, 2, 7, 0.34) 74%, rgba(3, 2, 7, 0.86) 100%),
        radial-gradient(circle at 50% 100%, transparent 0, rgba(0, 0, 0, 0.48) 68%),
        radial-gradient(circle, rgba(255, 240, 194, 0.09) 0 1px, transparent 1.7px),
        radial-gradient(circle, rgba(132, 174, 232, 0.055) 0 1px, transparent 1.4px);
    background-position: center, center, center, 0 0, 37px 41px;
    background-size: cover, cover, cover, 89px 89px, 131px 131px;
    content: "";
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.realm-topline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    padding: 7px 12px;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.realm-topline span:first-child {
    color: var(--gold-bright);
}

.realm-topline span + span::before,
.realm-topline .topline-live::before {
    margin-right: 14px;
    color: var(--gold);
    content: "◆";
    font-size: 0.58rem;
}

.site-header {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 18px;
    padding: 12px 16px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(34, 25, 45, 0.92), rgba(10, 8, 17, 0.94)),
        linear-gradient(90deg, rgba(205, 165, 92, 0.12), transparent);
    box-shadow: 0 18px 48px var(--shadow), inset 0 1px 0 rgba(255, 234, 179, 0.14);
}

.site-header::before,
.panel::before,
.auth-card::before,
.server-card::before {
    content: "";
}

.site-header::before {
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(243, 211, 138, 0.12);
    border-radius: 3px;
    pointer-events: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark,
.card-sigil span {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(91, 57, 111, 0.9), rgba(27, 51, 78, 0.9)),
        linear-gradient(145deg, rgba(243, 211, 138, 0.28), transparent);
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-shadow: 0 0 10px rgba(243, 211, 138, 0.5);
}

.brand-mark {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(243, 211, 138, 0.5);
    clip-path: polygon(50% 0, 92% 22%, 100% 50%, 92% 78%, 50% 100%, 8% 78%, 0 50%, 8% 22%);
    box-shadow: 0 0 24px rgba(111, 183, 255, 0.18);
}

.brand-logo {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(111, 183, 255, 0.35));
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand small,
.muted {
    color: var(--muted);
}

.brand small {
    margin-top: 2px;
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.main-nav,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    position: relative;
    padding: 10px 14px;
    border: 1px solid transparent;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.main-nav a::after {
    position: absolute;
    right: 12px;
    bottom: 5px;
    left: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition: 160ms ease;
}

.main-nav a:hover,
.main-nav a.active {
    border-color: rgba(205, 165, 92, 0.24);
    background: rgba(205, 165, 92, 0.08);
    color: var(--gold-bright);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.topline-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    white-space: nowrap;
}

.topline-live:hover {
    color: var(--gold-bright);
}

.topline-live b {
    color: var(--gold-bright);
    font: inherit;
}

.live-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8b8b96;
    box-shadow: 0 0 0 3px rgba(139, 139, 150, 0.12);
}

.topline-live.is-online .live-status-dot {
    background: #7ee2a8;
    box-shadow: 0 0 0 3px rgba(126, 226, 168, 0.13), 0 0 14px rgba(126, 226, 168, 0.62);
}

.topline-live.is-offline .live-status-dot {
    background: #ef6f7d;
    box-shadow: 0 0 0 3px rgba(239, 111, 125, 0.13), 0 0 14px rgba(239, 111, 125, 0.48);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 19px;
    border: 1px solid rgba(243, 211, 138, 0.56);
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(255, 231, 160, 0.22), transparent 48%),
        linear-gradient(135deg, #6b4427, #b88943 48%, #62401f);
    color: #fff7df;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(67, 35, 18, 0.72), 0 8px 24px rgba(0, 0, 0, 0.34);
    transition: border-color 160ms ease, filter 160ms ease, transform 160ms ease;
}

.button:hover {
    border-color: rgba(255, 229, 159, 0.88);
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.7);
    opacity: 0.58;
    transform: none;
}

.button-ghost {
    background:
        linear-gradient(180deg, rgba(94, 119, 156, 0.28), transparent 50%),
        linear-gradient(135deg, #121926, #1c2940);
    border-color: rgba(111, 183, 255, 0.4);
    color: #cfe6ff;
}

.button-large {
    min-height: 52px;
    padding: 0 27px;
}

.event-next {
    margin-top: 12px;
    border-top: 1px solid rgba(243, 211, 138, 0.18);
    padding-top: 12px;
}

.event-countdown {
    color: var(--gold-bright, #f3d38a);
    font-family: Consolas, "Courier New", monospace;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
}

.event-now {
    border-color: rgba(126, 226, 168, 0.6) !important;
    color: #7ee2a8 !important;
}

.chart-box {
    position: relative;
    padding: 8px 4px 0;
    overflow: hidden;
}

/* Alto fijo: evita el loop infinito de Chart.js (responsive + !aspect) */
.spark-box {
    position: relative;
    height: 52px;
    margin-top: 8px;
    overflow: hidden;
}

.spark-box canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.chart-panel {
    margin-bottom: 18px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 375px;
    gap: 24px;
    align-items: stretch;
    padding: 42px 0 30px;
}

.hero-copy,
.server-card,
.panel,
.auth-card {
    position: relative;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(31, 23, 41, 0.9), rgba(9, 7, 15, 0.96)),
        radial-gradient(circle at 15% 0%, rgba(111, 183, 255, 0.12), transparent 22rem);
    box-shadow: 0 24px 80px var(--shadow), inset 0 1px 0 rgba(255, 234, 179, 0.1);
    overflow: hidden;
}

.hero-copy {
    min-height: 560px;
    padding: clamp(38px, 6vw, 78px);
    background:
        linear-gradient(105deg, rgba(8, 6, 14, 0.94) 0%, rgba(8, 6, 14, 0.72) 42%, rgba(8, 6, 14, 0.42) 68%, rgba(8, 6, 14, 0.72) 100%),
        linear-gradient(180deg, rgba(8, 6, 14, 0.15) 55%, rgba(8, 6, 14, 0.88) 100%);
}

.hero-copy > * {
    position: relative;
    z-index: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
    content: "";
}

.eyebrow::after {
    background: linear-gradient(90deg, var(--gold), transparent);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.015em;
}

h1 {
    margin: 18px 0 20px;
    color: var(--gold-bright);
    font-size: clamp(3.4rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.86;
    letter-spacing: -0.025em;
    text-shadow: 0 0 24px rgba(111, 183, 255, 0.22), 0 3px 0 #332014, 0 14px 36px #000;
    text-transform: uppercase;
}

h1 span {
    display: block;
    color: #eaf5ff;
    font-size: 0.62em;
    letter-spacing: 0.07em;
}

h2 {
    color: var(--gold-bright);
    font-size: 1.35rem;
}

h3 {
    color: #f7ead0;
    font-size: 1.08rem;
}

p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-lead {
    max-width: 620px;
    color: #d9d3c8;
    font-size: clamp(1rem, 1.8vw, 1.16rem);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 670px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.hero-stats li {
    padding: 15px;
    border: 1px solid rgba(205, 165, 92, 0.2);
    background: linear-gradient(180deg, rgba(255, 236, 182, 0.07), rgba(9, 8, 14, 0.52));
}

.hero-stats strong,
.hero-stats span {
    display: block;
}

.hero-stats strong {
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem;
    text-transform: uppercase;
}

.hero-stats span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.server-card {
    padding: 30px;
}

.server-card::before,
.panel::before,
.auth-card::before {
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(243, 211, 138, 0.12);
    border-radius: 3px;
    pointer-events: none;
}

.card-sigil {
    display: grid;
    width: 92px;
    height: 92px;
    margin: 0 auto 20px;
    place-items: center;
    transform: rotate(45deg);
    border: 1px solid rgba(243, 211, 138, 0.42);
    background: linear-gradient(145deg, rgba(205, 165, 92, 0.16), rgba(111, 183, 255, 0.1));
    box-shadow: 0 0 32px rgba(205, 165, 92, 0.14);
}

.card-sigil span {
    width: 66px;
    height: 66px;
    transform: rotate(-45deg);
    font-size: 1.12rem;
}

.card-sigil.has-logo {
    width: 138px;
    height: 138px;
    transform: none;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.card-sigil.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(64, 145, 255, 0.28));
}

.server-card h2 {
    margin-bottom: 24px;
    text-align: center;
    text-transform: uppercase;
}

.server-card dl,
.detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.server-card dl div,
.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(205, 165, 92, 0.14);
    background: rgba(4, 5, 10, 0.48);
}

dt {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

dd {
    margin: 0;
    color: #f5ead2;
    font-weight: 700;
    text-align: right;
}

.server-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(205, 165, 92, 0.18);
    color: var(--accent);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.server-card-link:hover {
    color: var(--gold-bright);
}

.account-access {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(205, 165, 92, 0.18);
    text-align: center;
}

.account-access > span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.account-access-actions {
    display: flex;
    gap: 10px;
}

.account-access-actions .button,
.account-access-actions .logout-form {
    flex: 1;
}

.account-access-actions .button {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.74rem;
}

.account-session-actions {
    margin-top: 24px;
}

.realm-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 15px 22px;
    border: 1px solid rgba(111, 183, 255, 0.18);
    background: linear-gradient(90deg, transparent, rgba(40, 62, 90, 0.42), transparent);
    text-align: center;
}

.realm-banner p {
    margin: 0;
    color: #c8d8ed;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.banner-rune {
    color: var(--gold-bright);
    text-shadow: 0 0 14px rgba(243, 211, 138, 0.62);
}

.feature-grid,
.panel-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 44px;
}

.feature-grid article,
.panel {
    padding: 26px;
    border: 1px solid rgba(205, 165, 92, 0.22);
    background:
        linear-gradient(180deg, rgba(34, 25, 42, 0.82), rgba(9, 8, 15, 0.94)),
        radial-gradient(circle at top right, rgba(111, 183, 255, 0.09), transparent 12rem);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.feature-grid article {
    position: relative;
}

.feature-grid article::after {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(243, 211, 138, 0.58), transparent);
    content: "";
}

.feature-icon {
    display: inline-grid;
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    place-items: center;
    border: 1px solid rgba(243, 211, 138, 0.38);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    background: linear-gradient(145deg, rgba(205, 165, 92, 0.28), rgba(70, 92, 132, 0.16));
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    font-weight: 800;
}

.feature-icon + h3 {
    text-transform: uppercase;
}

.feature-grid article > * {
    transform: none;
}

.feature-icon {
    line-height: 1;
}

.feature-grid article:hover {
    border-color: rgba(243, 211, 138, 0.44);
    background:
        linear-gradient(180deg, rgba(45, 32, 54, 0.9), rgba(10, 8, 15, 0.96)),
        radial-gradient(circle at top right, rgba(111, 183, 255, 0.15), transparent 12rem);
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-heading {
    max-width: 760px;
    padding: 62px 0 38px;
}

.page-heading h1 {
    font-size: clamp(2.7rem, 6vw, 4.8rem);
}

.page-heading p {
    max-width: 650px;
    font-size: 1rem;
}

.status-pill {
    display: inline-flex;
    padding: 7px 12px;
    border: 1px solid rgba(205, 165, 92, 0.38);
    background: rgba(205, 165, 92, 0.09);
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.saga-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 54px;
    padding: 30px;
}

.saga-panel h2,
.saga-panel p {
    margin-bottom: 0;
}

.auth-card {
    max-width: 540px;
    margin: 58px auto;
    padding: 36px;
}

.auth-card h1 {
    font-size: clamp(2.3rem, 5vw, 3.4rem);
}

.form {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(205, 165, 92, 0.22);
    border-radius: 2px;
    outline: none;
    background: rgba(4, 5, 10, 0.72);
    color: var(--text);
}

select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(205, 165, 92, 0.22);
    border-radius: 2px;
    outline: none;
    background: rgba(4, 5, 10, 0.72);
    color: var(--text);
}

input:focus,
select:focus {
    border-color: rgba(111, 183, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(111, 183, 255, 0.12);
}

input:disabled {
    opacity: 0.55;
}

.flash {
    margin-bottom: 22px;
    padding: 15px 18px;
    border: 1px solid rgba(111, 183, 255, 0.28);
    background: rgba(22, 38, 58, 0.82);
    color: #dcecff;
}

.flash-success {
    border-color: rgba(85, 220, 122, 0.34);
    color: #dfffe8;
}

.flash-error {
    border-color: rgba(221, 91, 91, 0.38);
    background: rgba(75, 20, 28, 0.42);
    color: #ffd8d8;
}

.flash-info {
    border-color: rgba(111, 183, 255, 0.28);
    color: #dcecff;
}

.form-errors {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(221, 91, 91, 0.38);
    background: rgba(75, 20, 28, 0.42);
    color: #ffd8d8;
}

.form-errors p {
    margin: 0;
}

.logout-form,
.account-logout {
    margin: 0;
}

.logout-form .button {
    min-height: 40px;
    padding: 0 18px;
}

.account-logout {
    margin-top: 24px;
}

.site-footer {
    margin-top: 20px;
    padding: 30px 0 40px;
    border-top: 1px solid rgba(205, 165, 92, 0.16);
    text-align: center;
}

.site-footer p {
    margin-bottom: 6px;
    font-family: Georgia, "Times New Roman", serif;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 22px;
}

.overview-card {
    padding: 22px;
    border-left: 3px solid rgba(205, 165, 92, 0.58);
}

.overview-card span,
.download-meta span {
    display: block;
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.overview-card strong {
    display: block;
    margin-top: 8px;
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1;
}

.download-card {
    display: flex;
    min-height: 330px;
    flex-direction: column;
}

.download-rune {
    display: inline-grid;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    place-items: center;
    border: 1px solid rgba(111, 183, 255, 0.34);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    background: rgba(111, 183, 255, 0.1);
    color: #cfe6ff;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
}

.download-meta {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 12px;
    margin: auto 0 22px;
    padding-top: 14px;
    border-top: 1px solid rgba(205, 165, 92, 0.14);
}

.event-grid {
    padding-bottom: 24px;
}

.event-card {
    display: flex;
    min-height: 285px;
    flex-direction: column;
    padding: 30px;
}

.event-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.event-card-top .download-rune {
    margin-bottom: 0;
}

.event-card h2 {
    margin-bottom: 12px;
    font-size: 1.45rem;
    text-transform: uppercase;
}

.event-card p {
    margin-bottom: 24px;
}

.event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(205, 165, 92, 0.14);
}

.event-meta span {
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.event-meta strong {
    color: #f4ead6;
    font-size: 0.88rem;
    text-align: right;
}

.invasion-panel {
    margin-bottom: 44px;
}

.download-meta strong {
    color: #f4ead6;
    font-size: 0.88rem;
}

.mini-list {
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
    color: var(--muted);
    list-style: none;
}

.mini-list li {
    position: relative;
    padding-left: 22px;
}

.mini-list li::before {
    position: absolute;
    top: 0.55em;
    left: 0;
    width: 7px;
    height: 7px;
    border: 1px solid var(--gold);
    content: "";
    transform: rotate(45deg);
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.command-grid code {
    display: block;
    padding: 10px 12px;
    border: 1px solid rgba(111, 183, 255, 0.2);
    background: rgba(8, 14, 25, 0.58);
    color: #cfe6ff;
    font-family: "Courier New", monospace;
    font-size: 0.82rem;
    text-align: center;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.panel-heading h2 {
    margin-bottom: 0;
}

.rankings-layout {
    align-items: start;
}

.table-scroll {
    overflow-x: auto;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rank-table th {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(205, 165, 92, 0.28);
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    letter-spacing: 0.13em;
    text-align: left;
    text-transform: uppercase;
}

.rank-table td {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #d7d2c8;
}

.rank-table tbody tr:hover {
    background: rgba(205, 165, 92, 0.06);
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-radius: 50%;
    background: #55dc7a;
    box-shadow: 0 0 10px rgba(85, 220, 122, 0.7);
}

.empty-state,
.empty-note {
    text-align: center;
}

.empty-note {
    color: var(--muted);
}

.auth-crest {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    place-items: center;
    transform: rotate(45deg);
    border: 1px solid rgba(243, 211, 138, 0.42);
    background: linear-gradient(145deg, rgba(205, 165, 92, 0.16), rgba(111, 183, 255, 0.08));
}

.auth-crest span {
    color: var(--gold-bright);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
    transform: rotate(-45deg);
}

.auth-crest.has-logo {
    width: 118px;
    height: 118px;
    transform: none;
    border: 0;
    background: transparent;
}

.auth-crest.has-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(64, 145, 255, 0.24));
}

.auth-note {
    margin: 0;
    font-size: 0.82rem;
    text-align: center;
}

.auth-note a {
    text-decoration: underline;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-img {
    flex: 0 0 auto;
    height: 44px;
    border: 1px solid rgba(243, 211, 138, 0.35);
    border-radius: 3px;
    background: #0d1420;
}

.captcha-row input {
    flex: 1 1 auto;
    min-width: 0;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.form-result {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(85, 220, 122, 0.34);
    background: rgba(20, 75, 40, 0.42);
    color: #dfffe8;
}

.form-result p {
    margin: 0;
}

.form-result strong {
    letter-spacing: 0.1em;
}

@media (min-width: 1001px) and (max-width: 1080px) {
    .site-header {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-nav a {
        padding: 9px 11px;
        font-size: 0.78rem;
    }
}

@media (max-width: 1000px) {
    .site-header {
        position: relative;
        top: 0;
        flex-wrap: wrap;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        min-height: 480px;
    }

    .server-card {
        max-width: 520px;
    }

    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .site-shell {
        width: min(100% - 20px, 1220px);
    }

    .site-header,
    .main-nav,
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .brand,
    .main-nav a,
    .button {
        justify-content: center;
        text-align: center;
    }

    .main-nav a {
        border-color: rgba(205, 165, 92, 0.14);
    }

    .hero {
        padding-top: 24px;
    }

    .hero-copy {
        min-height: auto;
        padding: 30px 22px 140px;
        background:
            linear-gradient(105deg, rgba(8, 6, 14, 0.94) 0%, rgba(8, 6, 14, 0.78) 55%, rgba(8, 6, 14, 0.6) 100%),
            linear-gradient(180deg, rgba(8, 6, 14, 0.15) 55%, rgba(8, 6, 14, 0.9) 100%),
            url("../img/hero-bg.png") center 30% / cover no-repeat,
            #090711;
    }

    .hero-stats,
    .feature-grid,
    .panel-list,
    .two-columns,
    .overview-grid,
    .saga-panel {
        grid-template-columns: 1fr;
    }

    .realm-banner {
        padding: 14px;
    }

    .panel,
    .feature-grid article,
    .auth-card,
    .server-card {
        padding: 24px;
    }
}

.quest-chain {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-chain li {
    margin: 0;
}

.quest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.quest-row:hover {
    border-color: var(--gold);
    background: rgba(205, 165, 92, 0.08);
}

.quest-row-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quest-row-main strong {
    color: var(--gold-bright);
}

.quest-row-meta {
    font-size: 12px;
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .quest-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .quest-row-meta {
        text-align: left;
    }
}

.nav-group {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-group-label::before {
    content: "\25BE";
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--gold);
}

.nav-group-label {
    padding-right: 24px !important;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    background: var(--panel-strong);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    z-index: 60;
}

.nav-dropdown a {
    padding: 10px 14px;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-dropdown a::after {
    display: none;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    display: flex;
}

@media (max-width: 900px) {
    .nav-dropdown {
        left: 0;
        transform: none;
    }
}

/* Fix: puente invisible para no perder el hover entre etiqueta y menu */
.nav-group::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    height: 14px;
}

.nav-dropdown {
    top: 100%;
    padding-top: 10px;
}

.overview-card .coin-line {
    display: block;
    line-height: 1.35;
}

/* ================= Movimiento / dinamismo ================= */

/* Entrada de paneles al hacer scroll (solo con JS activo) */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-enabled .reveal.in {
    opacity: 1;
    transform: none;
}

/* Deriva lenta del arte del hero */
@keyframes heroDrift {
    from { background-position: 0 0, 0 0, center 24%; }
    to   { background-position: 0 0, 0 0, center 42%; }
}

.hero-copy {
    animation: heroDrift 48s ease-in-out infinite alternate;
}

/* Particulas doradas flotando en el hero */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-particles span {
    position: absolute;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 233, 176, 0.95), rgba(243, 211, 138, 0) 70%);
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0%   { transform: translateY(0) translateX(0); }
    50%  { transform: translateY(-55vh) translateX(14px); }
    100% { transform: translateY(-115vh) translateX(-10px); }
}

/* Particulas doradas a nivel pagina (inyectadas por JS) */
.page-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.page-particles span {
    position: absolute;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 233, 176, 0.95), rgba(243, 211, 138, 0) 70%);
    animation: floatUp linear infinite;
}

/* Vida extra en filas y tarjetas */
.rank-table tbody tr {
    transition: background 0.15s ease;
}

.rank-table tbody tr:hover {
    background: rgba(205, 165, 92, 0.07);
}

.status-pill {
    position: relative;
}

.status-pill::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    border: 1px solid rgba(243, 211, 138, 0.35);
    animation: pillPulse 3.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pillPulse {
    0%, 100% { opacity: 0; }
    50%      { opacity: 1; }
}

/* ============ Modo Streamer ============ */

.stream-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.stream-grid-offline {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.stream-card {
    background: rgba(20, 16, 10, 0.55);
    border: 1px solid rgba(205, 165, 92, 0.18);
    border-radius: 10px;
    overflow: hidden;
}

.stream-card.is-live {
    border-color: rgba(255, 80, 80, 0.45);
    box-shadow: 0 0 18px rgba(255, 60, 60, 0.12);
}

.stream-frame-lg {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.stream-frame-lg iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stream-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stream-platform {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(243, 211, 138, 0.85);
}

.stream-platform-twitch { color: #b58cff; }
.stream-platform-kick { color: #5df58a; }
.stream-platform-youtube { color: #ff6b6b; }
.stream-platform-trovo { color: #6bd5ff; }

.stream-viewers {
    font-size: 12px;
    color: #ff8f8f;
}

.stream-title {
    font-size: 13px;
    color: rgba(240, 228, 205, 0.8);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stream-offline-tag {
    font-size: 11px;
    color: rgba(240, 228, 205, 0.45);
}

.stream-noembed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    min-height: 90px;
    color: rgba(240, 228, 205, 0.75);
    font-size: 13px;
    text-align: center;
    padding: 10px;
}

.live-tag {
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 700;
}

.live-now-pill {
    color: #ff6b6b;
    font-weight: 700;
}

/* Stage: un solo stream cargado, las tarjetas lo intercambian */
.stream-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    margin-bottom: 18px;
}

@media (max-width: 760px) {
    .stream-stage { grid-template-columns: 1fr; }
}

.stream-stage-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 80, 80, 0.35);
    box-shadow: 0 0 24px rgba(255, 60, 60, 0.1);
}

.stream-stage-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stream-stage-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
}

.stream-stage-info strong {
    font-size: 18px;
}

.stream-stage-info .stream-title {
    white-space: normal;
}

.stream-others-title {
    margin: 20px 0 12px;
    font-size: 15px;
    color: rgba(243, 211, 138, 0.9);
}

.stream-card-pick {
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    padding: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.stream-card-pick:hover {
    transform: translateY(-2px);
    border-color: rgba(243, 211, 138, 0.5);
}

.stream-card-pick.active {
    border-color: #ff6b6b;
    box-shadow: 0 0 18px rgba(255, 60, 60, 0.25);
}

.stream-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #ff8f8f;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stream-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.stream-actions select {
    max-width: 90px;
    min-height: 0;
    padding: 6px 8px;
}

.status-pill.is-pending { color: #ffce7a; }
.status-pill.is-rejected { color: #ff8f8f; }
.status-pill.is-live { color: #7dff9b; }

/* Globo flotante de streams */
.stream-balloon {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 999;
    font-family: inherit;
}

.stream-balloon.is-hidden {
    display: none;
}

.stream-balloon-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 80, 80, 0.55);
    background: rgba(18, 12, 8, 0.92);
    color: #ffd9d9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.stream-balloon-box {
    display: block;
    width: 340px;
    background: rgba(18, 12, 8, 0.96);
    border: 1px solid rgba(205, 165, 92, 0.35);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.stream-balloon.is-min .stream-balloon-box {
    display: none;
}

.stream-balloon:not(.is-min) .stream-balloon-btn {
    display: none;
}

.stream-balloon-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(205, 165, 92, 0.18);
}

.stream-balloon-head .stream-name {
    font-size: 13px;
    color: #f0e4cd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-balloon-head .stream-meta {
    font-size: 11px;
    color: rgba(240, 228, 205, 0.6);
    margin-left: auto;
    white-space: nowrap;
}

.stream-min {
    background: none;
    border: 0;
    color: rgba(240, 228, 205, 0.65);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.stream-min:hover { color: #f3d38a; }

.stream-balloon .stream-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.stream-balloon .stream-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stream-balloon-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-top: 1px solid rgba(205, 165, 92, 0.18);
}

.stream-prev,
.stream-next {
    background: none;
    border: 0;
    color: rgba(240, 228, 205, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.stream-prev:hover,
.stream-next:hover { color: #f3d38a; }

.stream-balloon-foot a {
    font-size: 12px;
    color: #f3d38a;
    text-decoration: none;
}

.stream-balloon-foot a:hover { text-decoration: underline; }

.stream-balloon-foot .stream-all {
    margin-left: auto;
}

.stream-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4d;
    display: inline-block;
    flex-shrink: 0;
    animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.55); }
    50%      { box-shadow: 0 0 0 5px rgba(255, 77, 77, 0); }
}

@media (max-width: 480px) {
    .stream-balloon { right: 10px; bottom: 10px; }
    .stream-balloon-box { width: min(320px, calc(100vw - 20px)); }
}

@media (prefers-reduced-motion: reduce) {
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    body::before,
    .hero-copy,
    .hero-particles span,
    .page-particles span,
    .status-pill::after,
    .stream-live-dot {
        animation: none;
    }
}

/* ============ VIP ============ */

.vip-cta {
    border: 1px solid rgba(243, 211, 138, 0.35);
    background: linear-gradient(135deg, rgba(243, 211, 138, 0.08), rgba(20, 16, 10, 0.4));
}

.vip-nop2w-banner {
    border: 1px solid rgba(120, 220, 120, 0.3);
}

.vip-pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.vip-pet-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vip-pet-card.selected {
    border-color: #f3d38a;
    box-shadow: 0 0 0 1px #f3d38a, 0 6px 24px rgba(243, 211, 138, 0.15);
}

.vip-pet-card model-viewer {
    width: 100%;
    height: 260px;
    border-radius: 10px;
    background: radial-gradient(ellipse at 50% 60%, rgba(60, 50, 30, 0.6), rgba(10, 8, 5, 0.9));
    outline: none;
}

.vip-pet-card h3 {
    margin: 4px 0 0;
    font-size: 18px;
}

.vip-pet-card p { margin: 0; }

.vip-pet-tag {
    font-size: 12px;
    color: rgba(140, 220, 140, 0.85);
    letter-spacing: 0.4px;
}

.vip-pet-warning {
    color: #f3d38a;
    border-left: 3px solid #f3d38a;
    padding-left: 12px;
    margin: 12px 0;
}

.vip-pet-chosen { color: #f3d38a; }

.vip-compare-table .vip-equal td {
    color: rgba(140, 220, 140, 0.8);
}

.vip-compare-table td[colspan="2"] { text-align: center; }

@media (max-width: 640px) {
    .vip-pet-card model-viewer { height: 220px; }
}

.vip-pets-preview .vip-pet-grid-mini .vip-pet-card model-viewer { height: 200px; }
.vip-pets-preview .vip-pet-card h3 { text-align: center; }
.vip-pets-preview .vip-pet-card .vip-pet-tag { text-align: center; }

.vip-pet-card-more .vip-pet-more-visual {
    height: 200px;
    border-radius: 10px;
    background: radial-gradient(ellipse at 50% 60%, rgba(60, 50, 30, 0.6), rgba(10, 8, 5, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
}

.vip-pet-card-more .vip-pet-more-visual span {
    font-size: 56px;
    font-weight: 700;
    color: #f3d38a;
    text-shadow: 0 2px 18px rgba(243, 211, 138, 0.35);
}

.vip-pet-card-more h3 { text-align: center; }

/* Herramientas de guild: preview del mark 8x8 escalado */
.guild-tools { border-top: 1px solid rgba(243, 211, 138, 0.12); padding-top: 14px; margin-top: 14px; }
.guild-tools:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.guild-tools-name { color: #f3d38a; margin: 0 0 4px; }
.guild-mark-preview {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(243, 211, 138, 0.25);
    border-radius: 4px;
    margin: 6px 0;
}
.guild-tools .form { margin-top: 10px; }

/* Cuenta: layout con menu lateral */
.account-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    background: rgba(13, 16, 26, 0.7);
    border: 1px solid rgba(243, 211, 138, 0.15);
    border-radius: 12px;
    padding: 10px;
}

.account-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #b8bcc9;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, color 0.15s ease;
}

.account-nav-link:hover {
    background: rgba(243, 211, 138, 0.08);
    color: #f3d38a;
}

.account-nav-link.active {
    background: linear-gradient(135deg, rgba(243, 211, 138, 0.18), rgba(243, 211, 138, 0.06));
    color: #f3d38a;
    box-shadow: inset 2px 0 0 #f3d38a;
}

.account-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== AdminCP ===== */
.admin-nav .admin-nav-group {
    display: block;
    padding: 14px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(243, 211, 138, 0.55);
}

.admin-dash-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.admin-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.admin-feed li {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.admin-feed em {
    font-style: normal;
    font-size: 12px;
}

.admin-feed-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-feed-tag.ok   { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.admin-feed-tag.fail { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.admin-feed-tag.warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

.admin-search {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-search input[type="text"] {
    flex: 1;
    min-width: 220px;
}

.admin-search-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #b8bcc9;
    white-space: nowrap;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.admin-detail-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.admin-detail-grid span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(184, 188, 201, 0.7);
}

.admin-detail-grid strong {
    font-size: 14px;
    color: #e9e4d8;
    word-break: break-all;
}

.text-danger { color: #f87171; }

/* Tarjetas de personaje en Resumen de cuenta */
.char-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 16px;
}

.char-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 1px solid rgba(243, 211, 138, 0.16);
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
    transition: border-color 160ms ease, transform 160ms ease;
}

.char-card:hover {
    border-color: rgba(243, 211, 138, 0.42);
    transform: translateY(-2px);
}

.char-emblem {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 96px;
    border-bottom: 2px solid;
    overflow: hidden;
}

.char-emblem svg { width: 52px; height: 52px; margin: auto; }

.char-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.char-emblem-dw    { color: #b39dff; border-bottom-color: rgba(179, 157, 255, 0.5);  background: radial-gradient(circle at 50% 15%, rgba(179, 157, 255, 0.3), rgba(22, 16, 46, 0.9)); }
.char-emblem-dk    { color: #ff8d70; border-bottom-color: rgba(255, 141, 112, 0.5);  background: radial-gradient(circle at 50% 15%, rgba(255, 141, 112, 0.26), rgba(48, 16, 12, 0.9)); }
.char-emblem-fe    { color: #7be29a; border-bottom-color: rgba(123, 226, 154, 0.5);  background: radial-gradient(circle at 50% 15%, rgba(123, 226, 154, 0.24), rgba(12, 40, 24, 0.9)); }
.char-emblem-mg    { color: #f3d38a; border-bottom-color: rgba(243, 211, 138, 0.55); background: radial-gradient(circle at 50% 15%, rgba(243, 211, 138, 0.28), rgba(44, 32, 10, 0.9)); }
.char-emblem-dl    { color: #ff7aa2; border-bottom-color: rgba(255, 122, 162, 0.5);  background: radial-gradient(circle at 50% 15%, rgba(255, 122, 162, 0.26), rgba(46, 14, 26, 0.9)); }
.char-emblem-su    { color: #7cc8ff; border-bottom-color: rgba(124, 200, 255, 0.5);  background: radial-gradient(circle at 50% 15%, rgba(124, 200, 255, 0.26), rgba(12, 32, 48, 0.9)); }
.char-emblem-rf    { color: #ffbe66; border-bottom-color: rgba(255, 190, 102, 0.5);  background: radial-gradient(circle at 50% 15%, rgba(255, 190, 102, 0.26), rgba(46, 30, 12, 0.9)); }
.char-emblem-other { color: #b8bcc9; border-bottom-color: rgba(184, 188, 201, 0.4);  background: radial-gradient(circle at 50% 15%, rgba(184, 188, 201, 0.2), rgba(20, 22, 32, 0.9)); }

.char-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 12px 0;
    text-align: center;
}

.char-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
    color: #fff7df;
}

.char-class {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.char-stats {
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 10px 12px 14px;
}

.char-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.char-stat small {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.char-stat strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    color: #f3d38a;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    align-items: start;
}

.guild-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 12px;
    align-items: start;
}

.guild-tools-grid .form {
    border: 1px solid rgba(243, 211, 138, 0.12);
    border-radius: 10px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 0;
    align-content: start;
}

@media (max-width: 860px) {
    .account-layout { flex-direction: column; }
    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
        position: static;
        min-width: 0;
        width: 100%;
    }
    .account-nav-link.active { box-shadow: inset 0 -2px 0 #f3d38a; }
}

/* Donaciones: selectores producto/moneda */
.donate-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.donate-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.donate-selector-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a8f9d;
    font-weight: 700;
}

.mark-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 10px;
}

.mark-swatch {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    padding: 0;
}

.mark-swatch.active {
    outline: 2px solid #e8b64c;
    outline-offset: 2px;
}

.mark-swatch-erase {
    background: repeating-conic-gradient(#3a3a46 0% 25%, #17171d 0% 50%);
    background-size: 12px 12px;
}

.mark-editor {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: #0b0b12;
    cursor: crosshair;
    touch-action: none;
    max-width: 100%;
}

.mark-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ==================== Features v2 ==================== */

/* Tabs de rankings */
.rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.rank-tab {
    padding: 8px 16px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    background: var(--panel);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.rank-tab:hover { color: var(--gold-bright); }

.rank-tab.active {
    color: var(--gold-bright);
    border-color: var(--gold);
    background: rgba(205, 165, 92, 0.12);
}

.rank-link {
    color: var(--text);
    text-decoration: none;
}

.rank-link:hover { color: var(--gold-bright); text-decoration: underline; }

/* Guild mark SVG */
.guild-mark {
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    image-rendering: pixelated;
}

.mark-cell { width: 30px; }

/* Gens family badges */
.gens { font-weight: 600; }
.gens-duprian { color: #6fb7ff; }
.gens-vanert, .gens-varnert { color: #c66bff; }

/* Castle Siege */
.siege-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 26px 30px;
    border-color: rgba(205, 165, 92, 0.5);
    background:
        linear-gradient(135deg, rgba(205, 165, 92, 0.08), rgba(10, 8, 17, 0.2)),
        var(--panel);
}

.siege-banner.siege-live {
    border-color: var(--blood);
    box-shadow: 0 0 30px rgba(157, 47, 61, 0.35);
}

.siege-owner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.siege-owner h2 { margin: 2px 0; font-size: 1.7rem; }

.siege-empty-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border: 1px dashed rgba(205, 165, 92, 0.5);
    border-radius: 8px;
    color: var(--gold);
    font-size: 1.6rem;
}

.siege-clock { text-align: right; }

.siege-timer {
    display: block;
    font-size: 2rem;
    color: var(--gold-bright);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.siege-live-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--blood);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    animation: siegePulse 1.4s ease-in-out infinite;
}

@keyframes siegePulse {
    50% { opacity: 0.55; }
}

.row-active td {
    background: rgba(205, 165, 92, 0.14) !important;
}

.siege-guilds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.siege-guild {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    background: rgba(10, 8, 17, 0.5);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.siege-guild:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

.siege-guild span { font-weight: 600; }
.siege-guild small { margin-left: auto; text-align: right; }

/* Vote cards */
.vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.vote-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vote-card-head h2 { margin: 0; font-size: 1.15rem; }

.vote-actions {
    display: flex;
    gap: 10px;
    margin: 12px 0 6px;
}

.vote-cd { margin: 0; font-size: 0.85rem; }

/* Perfiles */
.profile-card { padding: 24px 28px; }

.profile-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-head h2 { margin: 0; font-size: 1.6rem; }
.profile-head .status-pill { margin-left: auto; }

.profile-stats { margin-top: 10px; }

.linklike {
    background: none;
    border: none;
    padding: 0;
    color: var(--blood);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

/* Founder badge */
.founder-badge {
  display: inline-block;
  padding: 1px 8px;
  margin-left: 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #b8860b, #f3d38a);
  color: #1a1206;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}
