/* =============================================================================
 * Land of Heroes - base design system
 *
 * A fantasy MMORPG look: cinematic key-art hero, aged-gold accents on a warm
 * dark night palette, ornate dividers and engraved panels. A muted arcane
 * blue is kept as a secondary "magic" accent. Layered on top of the
 * Bootstrap 5 dark theme (CDN); every page reuses these styles.
 *
 *   1. Design tokens          8. Panels & cards
 *   2. Base & typography      9. Stats band
 *   3. Buttons               10. Top players
 *   4. Navbar                11. Gallery & FAQ
 *   5. Hero                  12. Footer
 *   7. Section headings      13. Forms & auth panels
 * ========================================================================== */

/* 1. Design tokens ---------------------------------------------------------- */

:root {
    /* Surfaces - warm, dark, night-fantasy. */
    --lh-bg-deep:    #0c0b10;
    --lh-bg:         #13111a;
    --lh-surface:    #1b1823;
    --lh-surface-2:  #251f2d;

    /* Borders. */
    --lh-border:      #393143;
    --lh-border-gold: #5d4a2c;

    /* Aged gold - the primary accent. */
    --lh-gold:        #c9a14e;
    --lh-gold-bright: #e9cb84;
    --lh-gold-deep:   #8c6c30;

    /* Arcane blue - secondary "magic" accent, used sparingly. */
    --lh-arcane:      #5fa8c8;

    /* Text. */
    --lh-text:       #cabfa7;
    --lh-text-muted: #8b8275;
    --lh-heading:    #f3ead2;

    /* Effects. */
    --lh-glow-gold: 0 0 24px rgba(201, 161, 78, 0.40);
    --lh-radius:    5px;

    --lh-font-display: 'Cinzel', 'Times New Roman', serif;
    --lh-font-body:    'Barlow', 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Map the Bootstrap dark theme onto the game palette. */
[data-bs-theme="dark"] {
    --bs-body-bg: var(--lh-bg);
    --bs-body-color: var(--lh-text);
    --bs-emphasis-color: var(--lh-heading);
    --bs-border-color: var(--lh-border);
    --bs-secondary-color: var(--lh-text-muted);
    --bs-link-color-rgb: 201, 161, 78;
    --bs-link-hover-color-rgb: 233, 203, 132;
}

/* 2. Base & typography ------------------------------------------------------ */

body {
    font-family: var(--lh-font-body);
    background-color: var(--lh-bg);
    /* Faint warm glow fixed behind the whole page. */
    background-image:
        radial-gradient(ellipse 70% 40% at 50% -6%, rgba(201, 161, 78, 0.10), transparent),
        radial-gradient(ellipse 55% 45% at 88% 6%, rgba(95, 168, 200, 0.07), transparent);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4 {
    font-family: var(--lh-font-display);
    color: var(--lh-heading);
}

a {
    text-decoration: none;
}

::selection {
    background: rgba(201, 161, 78, 0.30);
}

/* 3. Buttons ---------------------------------------------------------------- */

.btn {
    --bs-btn-font-family: var(--lh-font-body);
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--lh-radius);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* Primary - forged gold, with a warm glow on hover. */
.btn-primary {
    --bs-btn-color: #1a130a;
    --bs-btn-bg: var(--lh-gold);
    --bs-btn-border-color: var(--lh-gold-bright);
    --bs-btn-hover-color: #1a130a;
    --bs-btn-hover-bg: var(--lh-gold-bright);
    --bs-btn-hover-border-color: var(--lh-gold-bright);
    --bs-btn-active-color: #1a130a;
    --bs-btn-active-bg: var(--lh-gold-bright);
    --bs-btn-active-border-color: var(--lh-gold-bright);
    --bs-btn-focus-shadow-rgb: 201, 161, 78;
    background-image: linear-gradient(180deg, var(--lh-gold-bright), var(--lh-gold));
}

.btn-primary:hover {
    box-shadow: var(--lh-glow-gold);
}

/* Outline variant used on dark sections. */
.btn-outline-light {
    --bs-btn-border-color: var(--lh-border-gold);
    --bs-btn-color: var(--lh-heading);
    --bs-btn-hover-bg: rgba(201, 161, 78, 0.12);
    --bs-btn-hover-border-color: var(--lh-gold);
    --bs-btn-hover-color: var(--lh-gold-bright);
    --bs-btn-active-bg: rgba(201, 161, 78, 0.18);
    --bs-btn-active-border-color: var(--lh-gold);
    --bs-btn-active-color: var(--lh-gold-bright);
}

/* 4. Navbar ----------------------------------------------------------------- */

.navbar {
    background-color: rgba(12, 11, 16, 0.85);
    border-bottom: 1px solid var(--lh-border);
    backdrop-filter: blur(10px);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Toggled by Alpine.js once the page is scrolled (see partials/navbar). */
.navbar.navbar-scrolled {
    background-color: rgba(12, 11, 16, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-family: var(--lh-font-display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: var(--lh-heading) !important;
}

.navbar-logo,
.footer-logo {
    display: inline-block;
    background-color: var(--lh-gold);
    -webkit-mask: url(/images/logo_stylized.svg) center / contain no-repeat;
    mask: url(/images/logo_stylized.svg) center / contain no-repeat;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.navbar-logo { width: 36px; height: 36px; }
.footer-logo { width: 40px; height: 40px; }

/* Item-shop nav link: a gold, gently pulsing call-to-action. */
.nav-shop { color: var(--lh-gold) !important; animation: nav-shop-glow 2.4s ease-in-out infinite; }
.nav-shop:hover, .nav-shop.active { color: var(--lh-gold) !important; }
@keyframes nav-shop-glow {
    0%, 100% { text-shadow: 0 0 3px rgba(201, 161, 78, 0.35); }
    50%      { text-shadow: 0 0 11px rgba(201, 161, 78, 0.9), 0 0 20px rgba(201, 161, 78, 0.45); }
}
@media (prefers-reduced-motion: reduce) { .nav-shop { animation: none; } }

.navbar .nav-link {
    position: relative;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: 0.09em;
    color: var(--lh-text);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--lh-gold-bright);
}

/* Animated underline for the active / hovered link. */
.navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.1rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lh-gold), transparent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

/* Language selector. */
.lang-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
    margin-right: 0.35rem;
}

/* Center the flag against the text - both the toggle button and the menu rows -
   instead of relying on a baseline nudge. */
.lang-select .dropdown-toggle {
    display: inline-flex;
    align-items: center;
}

.lang-select .dropdown-item {
    display: flex;
    align-items: center;
}

.dropdown-menu {
    --bs-dropdown-bg: var(--lh-surface);
    --bs-dropdown-border-color: var(--lh-border);
    --bs-dropdown-link-color: var(--lh-text);
    --bs-dropdown-link-hover-bg: rgba(201, 161, 78, 0.10);
    --bs-dropdown-link-hover-color: var(--lh-gold-bright);
    --bs-dropdown-link-active-bg: rgba(201, 161, 78, 0.16);
    --bs-dropdown-link-active-color: var(--lh-gold-bright);
}

/* Right-side actions: a horizontal row on wide screens; once the navbar
   collapses (< xl) they stack full-width so nothing runs off a narrow screen. */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1199.98px) {
    .navbar-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-top: 0.85rem;
    }

    .navbar-actions > .btn,
    .navbar-actions > .dropdown,
    .navbar-actions > .dropdown > .btn {
        width: 100%;
    }
}

/* 5. Hero ------------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(560px, 84vh, 780px);
    padding: 7rem 0 5rem;
    text-align: center;
    border-bottom: 1px solid var(--lh-border-gold);
    /* Key art darkened so the copy stays legible, fading into the page. */
    background-image:
        linear-gradient(180deg, rgba(12, 11, 16, 0.55) 0%, rgba(12, 11, 16, 0.35) 40%, var(--lh-bg) 100%),
        url('/images/page-name.jpg');
    background-size: cover;
    background-position: center 32%;
}

/* Gold glow line along the bottom edge. */
.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lh-gold), transparent);
}

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

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 800;
    line-height: 1.08;
    text-transform: uppercase;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.9), 0 0 50px rgba(201, 161, 78, 0.25);
}

/* Small uppercase label above titles. */
.eyebrow {
    display: inline-block;
    color: var(--lh-gold);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.78rem;
    font-weight: 600;
}

/* 7. Section headings ------------------------------------------------------- */

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading .eyebrow {
    margin-bottom: 0.5rem;
}

.section-heading h1,
.section-heading h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.7rem);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

/* Ornamental divider: filigree line - gem - filigree line. */
.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1rem;
}

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

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

.ornament span {
    width: 9px;
    height: 9px;
    background: var(--lh-gold);
    transform: rotate(45deg);
    box-shadow: var(--lh-glow-gold);
}

/* Thin gradient rule between full-width sections. */
.edge-divider {
    height: 1px;
    border: 0;
    background: linear-gradient(90deg, transparent, var(--lh-border-gold), transparent);
    opacity: 0.7;
}

.section-deep {
    background-color: var(--lh-bg-deep);
}

/* 8. Panels & cards --------------------------------------------------------- */

.panel {
    position: relative;
    background: linear-gradient(160deg, var(--lh-surface-2), var(--lh-surface));
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
}

/* Gold accent engraved along the top edge. */
.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lh-gold), transparent);
    opacity: 0.5;
    transition: opacity 0.18s ease;
}

.panel:hover::before {
    opacity: 1;
}

.feature-card {
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--lh-gold);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(201, 161, 78, 0.12);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: var(--lh-radius);
    background: rgba(201, 161, 78, 0.10);
    border: 1px solid var(--lh-border-gold);
    color: var(--lh-gold);
    font-size: 1.45rem;
}

/* 9. Stats band ------------------------------------------------------------- */

.stats-band {
    position: relative;
    padding: 5rem 0;
    border-top: 1px solid var(--lh-border-gold);
    border-bottom: 1px solid var(--lh-border-gold);
    background-image:
        linear-gradient(rgba(12, 11, 16, 0.86), rgba(12, 11, 16, 0.92)),
        url('/images/about/about-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.stat-value {
    font-family: var(--lh-font-display);
    font-size: clamp(2.1rem, 3.6vw, 2.9rem);
    font-weight: 800;
    color: var(--lh-gold-bright);
    line-height: 1;
}

.stat-icon {
    color: var(--lh-gold);
    font-size: 2.4rem;
    margin-bottom: 0.85rem;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--lh-text);
    margin-top: 0.4rem;
}

/* 10. Top players ----------------------------------------------------------- */

.player-card {
    display: block;
    height: 100%;
    padding: 1.5rem 1rem;
    text-align: center;
    color: inherit;
}

/* Square framed thumbnail - matches the square job artwork. */
.player-portrait {
    width: 84px;
    height: 84px;
    margin: 0 auto 0.85rem;
    overflow: hidden;
    border-radius: var(--lh-radius);
    border: 1px solid var(--lh-border-gold);
    background: rgba(201, 161, 78, 0.08);
}

.player-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name-link { color: inherit; text-decoration: none; }
.name-link:hover { color: var(--lh-gold-bright); text-decoration: underline; }

.player-name {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-heading);
}

.player-card:hover .player-name {
    color: var(--lh-gold-bright);
}

.player-rank {
    position: absolute;
    top: 0.6rem;
    left: 0.7rem;
    font-family: var(--lh-font-display);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--lh-gold);
}

/* Top players - a horizontally scrolling row. The cards are rendered twice
   so the auto-scroll, and mouse dragging, can loop seamlessly. The scroll
   is driven by JavaScript; see the scripts section of the home view. */
.players-marquee {
    overflow-x: auto;
    /* Vertical breathing room so the cards' hover lift and glow are not
       clipped by the horizontal scroll container. */
    padding: 2rem 0;
    cursor: grab;
    user-select: none;
    scrollbar-width: none; /* Firefox - hide the scrollbar */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* Hide the scrollbar in WebKit / Blink browsers. */
.players-marquee::-webkit-scrollbar {
    display: none;
}

.players-marquee.is-dragging {
    cursor: grabbing;
}

.players-track {
    display: flex;
    width: max-content;
}

.players-track .player-card {
    flex: 0 0 230px;
    margin-right: 1.25rem;
}

/* 11b. Character classes (Alpine-powered selector) ------------------------- */

.class-tab {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.85rem 1rem;
    text-align: left;
    background: var(--lh-surface);
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    color: var(--lh-text);
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.class-tab:hover {
    border-color: var(--lh-border-gold);
}

.class-tab.active {
    border-color: var(--lh-gold);
    background: rgba(201, 161, 78, 0.10);
    color: var(--lh-gold-bright);
}

.class-tab img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.class-tab-name {
    font-family: var(--lh-font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.class-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 161, 78, 0.18), transparent 70%);
    border: 1px solid var(--lh-border-gold);
}

.class-emblem img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.class-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--lh-border-gold);
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lh-gold);
}

/* 11. Gallery & FAQ --------------------------------------------------------- */

.gallery-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--lh-radius);
    border: 1px solid var(--lh-border);
}

.gallery-tile img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-tile:hover img {
    transform: scale(1.08);
}

.gallery-tile figcaption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    background: linear-gradient(180deg, transparent 45%, rgba(12, 11, 16, 0.92));
    font-family: var(--lh-font-display);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--lh-heading);
}

.gallery-tile:hover {
    border-color: var(--lh-gold);
}

.accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-color: var(--lh-text);
    --bs-accordion-border-color: var(--lh-border);
    --bs-accordion-border-radius: var(--lh-radius);
    --bs-accordion-btn-color: var(--lh-heading);
    --bs-accordion-active-bg: rgba(201, 161, 78, 0.09);
    --bs-accordion-active-color: var(--lh-gold-bright);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(201, 161, 78, 0.22);
}

.accordion-button {
    font-family: var(--lh-font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
}

/* 12. Footer ---------------------------------------------------------------- */

.site-footer {
    position: relative;
    border-top: 1px solid var(--lh-border-gold);
    background-image:
        linear-gradient(rgba(12, 11, 16, 0.94), rgba(12, 11, 16, 0.99)),
        url('/images/footer-bg.jpg');
    background-size: cover;
    background-position: center;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lh-gold), transparent);
    opacity: 0.6;
}

.footer-heading {
    font-family: var(--lh-font-display);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lh-heading);
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    padding: 0.25rem 0;
    color: var(--lh-text-muted);
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--lh-gold-bright);
}

.footer-legal-link {
    color: var(--lh-text-muted);
    transition: color 0.15s ease;
}

.footer-legal-link:hover {
    color: var(--lh-gold-bright);
}

/* Legal / policy pages (Terms, Privacy, Imprint, Cookie Policy) */
.legal-content {
    line-height: 1.75;
}

.legal-intro {
    color: var(--lh-text-muted);
    margin-bottom: 1.5rem;
}

.legal-section {
    scroll-margin-top: 90px; /* clear the sticky navbar on in-page anchor jumps */
}

.legal-section + .legal-section {
    margin-top: 2rem;
}

.legal-heading {
    color: var(--lh-gold);
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--lh-border);
}

.legal-body p {
    margin-bottom: 1rem;
}

.legal-body ul,
.legal-body ol {
    margin-bottom: 1rem;
    padding-left: 1.3rem;
}

.legal-body li {
    margin-bottom: 0.5rem;
}

.legal-body a {
    color: var(--lh-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-body a:hover {
    color: var(--lh-gold-bright);
}

/* Two-factor authentication (enrolment QR + secret key) */
.twofa-qr {
    display: inline-block;
    padding: 12px;
    background: #ffffff;
    border-radius: 12px;
    line-height: 0;
}

.twofa-qr img,
.twofa-qr canvas {
    display: block;
}

.twofa-secret {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    letter-spacing: 2px;
    word-break: break-all;
    color: var(--lh-text);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--lh-border);
    border-radius: 10px;
    padding: 10px 12px;
}

.twofa-code {
    letter-spacing: 4px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    color: var(--lh-text);
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.footer-social:hover {
    color: var(--lh-gold-bright);
    border-color: var(--lh-gold);
    box-shadow: 0 0 14px rgba(201, 161, 78, 0.25);
}

/* 13. Forms & auth panels --------------------------------------------------- */

.form-label {
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--lh-heading);
}

.form-control {
    background-color: var(--lh-bg-deep);
    border-color: var(--lh-border);
    color: var(--lh-text);
    padding: 0.6rem 0.85rem;
}

.form-control:focus {
    background-color: var(--lh-bg-deep);
    border-color: var(--lh-gold);
    color: var(--lh-heading);
    box-shadow: 0 0 0 0.2rem rgba(201, 161, 78, 0.20);
}

.form-control::placeholder {
    color: var(--lh-text-muted);
}

.form-control.is-invalid {
    border-color: #d36b6b;
}

/* Round emblem at the top of auth result panels (success / verify). */
.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 161, 78, 0.18), transparent 70%);
    border: 1px solid var(--lh-border-gold);
    color: var(--lh-gold);
    font-size: 1.8rem;
}

.auth-icon-success {
    color: #6cc070;
    border-color: #3f7a43;
    background: radial-gradient(circle, rgba(108, 192, 112, 0.18), transparent 70%);
}

.auth-icon-danger {
    color: #d36b6b;
    border-color: #7a3f3f;
    background: radial-gradient(circle, rgba(211, 107, 107, 0.18), transparent 70%);
}

/* Registration / login: a full-height, centered card. ----------------------- */
.auth-screen {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 76px);
    padding: 3.5rem 0;
    background-color: var(--lh-bg-deep);
    background-image:
        radial-gradient(ellipse 75% 50% at 50% 0%, rgba(201, 161, 78, 0.06), transparent),
        linear-gradient(rgba(12, 11, 16, 0.93), rgba(12, 11, 16, 0.97));
}

/* Single centred panel - success / disabled / verify states. */
.auth-single {
    max-width: 520px;
}

/* The split card: key-art panel + form panel, equal height. */
.auth-card {
    max-width: 1000px;
    border: 1px solid var(--lh-border-gold);
    border-radius: var(--lh-radius);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.auth-card-art,
.auth-card-form {
    padding: clamp(2rem, 4vw, 3.25rem);
}

/* Left: darkened key-art with the headline and perks on top. */
.auth-card-art {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 240px;
    color: var(--lh-heading);
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
    background-image:
        linear-gradient(160deg, rgba(12, 11, 16, 0.50), rgba(12, 11, 16, 0.82)),
        url('/images/page-name.jpg');
    background-size: cover;
    background-position: 62% center;
}

.auth-card-title {
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0 0 1.5rem;
}

/* Right: the form, on the panel surface. */
.auth-card-form {
    background: linear-gradient(160deg, var(--lh-surface-2), var(--lh-surface));
}

.auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
}

.auth-perks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-perks li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(233, 203, 132, 0.16);
}

.auth-perks li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.auth-perk-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--lh-radius);
    background: rgba(201, 161, 78, 0.16);
    border: 1px solid var(--lh-border-gold);
    color: var(--lh-gold-bright);
    font-size: 1rem;
}

/* HTMX loading indicator: shown only while a request is in flight. */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Download page ------------------------------------------------------------- */

.download-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    margin-bottom: 0.85rem;
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    background: var(--lh-bg-deep);
    color: var(--lh-text);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.download-row:last-child {
    margin-bottom: 0;
}

.download-row:hover {
    border-color: var(--lh-gold);
    color: var(--lh-heading);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.download-featured {
    border-color: var(--lh-gold);
    background: rgba(201, 161, 78, 0.07);
}

/* "Coming soon" platforms - not yet downloadable. */
.download-row.is-disabled {
    opacity: 0.55;
    cursor: default;
    background: var(--lh-surface);
}

.download-row.is-disabled:hover {
    border-color: var(--lh-border);
    color: var(--lh-text);
    transform: none;
    box-shadow: none;
}

.download-soon {
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    color: var(--lh-text-muted);
}

.download-os-icon {
    flex: 0 0 auto;
    width: 2.2rem;
    text-align: center;
    font-size: 1.6rem;
    color: var(--lh-gold);
}

.download-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    margin-right: auto; /* pushes the badge + CTA to the right edge */
}

.download-name {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-heading);
}

.download-note {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lh-text-muted);
}

.download-you {
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    color: var(--lh-gold-bright);
}

.download-cta {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
    color: var(--lh-gold);
}

.download-row:hover .download-cta {
    color: var(--lh-gold-bright);
}

@media (max-width: 575.98px) {
    .download-you {
        display: none !important;
    }
}

/* System requirements table. */
.reqs-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--lh-text);
    --bs-table-border-color: var(--lh-border);
    font-size: 0.9rem;
}

.reqs-table thead th {
    color: var(--lh-gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
    border-bottom-color: var(--lh-border-gold);
}

.reqs-table tbody th {
    color: var(--lh-heading);
    font-weight: 600;
    white-space: nowrap;
}

/* Platform switcher for the requirements table. */
.req-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.req-tab {
    flex: 1 1 0;
    padding: 0.5rem 0.6rem;
    background: var(--lh-bg-deep);
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    color: var(--lh-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.req-tab:hover {
    border-color: var(--lh-border-gold);
    color: var(--lh-text);
}

.req-tab.active {
    border-color: var(--lh-gold);
    background: rgba(201, 161, 78, 0.10);
    color: var(--lh-gold-bright);
}

/* Alpine: keep x-cloak elements hidden until Alpine initialises. */
[x-cloak] {
    display: none !important;
}

/* Rankings ------------------------------------------------------------------ */

.form-select {
    background-color: var(--lh-bg-deep);
    border-color: var(--lh-border);
    color: var(--lh-text);
    padding: 0.6rem 2.25rem 0.6rem 0.85rem;
}

.form-select:focus {
    border-color: var(--lh-gold);
    box-shadow: 0 0 0 0.2rem rgba(201, 161, 78, 0.20);
}

.ranking-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--lh-text);
    --bs-table-border-color: var(--lh-border);
}

.ranking-table thead th {
    color: var(--lh-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.74rem;
    border-bottom-color: var(--lh-border-gold);
}

.ranking-table tbody tr {
    transition: background-color 0.12s ease;
}

.ranking-table tbody tr:hover {
    background-color: rgba(201, 161, 78, 0.06);
}

.ranking-rank {
    width: 3.5rem;
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-text-muted);
}

.ranking-player {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.ranking-job {
    width: 32px;
    height: 32px;
    border-radius: var(--lh-radius);
    border: 1px solid var(--lh-border-gold);
    background: rgba(201, 161, 78, 0.08);
}

.ranking-name {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-heading);
}

.ranking-empire {
    width: 26px;
    height: auto;
    vertical-align: middle;
}

.ranking-level {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-gold-bright);
    white-space: nowrap;
}

/* Top-3 medals. */
.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a130a;
}

.rank-1 { background: linear-gradient(180deg, #f5d98a, #c9a14e); }
.rank-2 { background: linear-gradient(180deg, #e8e8ea, #a8aab0); }
.rank-3 { background: linear-gradient(180deg, #e6b483, #b87333); }

/* Board tabs. */
.ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ranking-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.35rem;
    border-radius: 999px;
    border: 1px solid var(--lh-border);
    background: var(--lh-surface);
    color: var(--lh-text-muted);
    font-family: var(--lh-font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.ranking-tab:hover {
    color: var(--lh-gold-bright);
    border-color: var(--lh-border-gold);
}

.ranking-tab.active {
    color: var(--lh-gold-bright);
    border-color: var(--lh-gold);
    background: rgba(201, 161, 78, 0.10);
}

/* Guild emblem in the guild board (mirrors the player job-icon box). */
.ranking-guild-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--lh-radius);
    border: 1px solid var(--lh-border-gold);
    background: rgba(201, 161, 78, 0.08);
    color: var(--lh-gold);
    font-size: 0.85rem;
}

.ranking-kills {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-gold-bright);
    white-space: nowrap;
}

/* Account dashboard --------------------------------------------------------- */

.account-info {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
}

.account-info > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.account-info dt {
    margin: 0;
    color: var(--lh-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.account-info dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    color: var(--lh-heading);
    word-break: break-word;
}

.account-status {
    display: inline-block;
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.account-status-ok { background: rgba(95, 190, 110, 0.16); color: #74d68c; }
.account-status-other { background: rgba(255, 255, 255, 0.07); color: var(--lh-text-muted); }

.account-narrow { max-width: 560px; }

/* Quick-stat cards. */
.stat-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    padding: 1rem 1.15rem;
    background: linear-gradient(160deg, var(--lh-surface-2), var(--lh-surface));
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
}

.stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--lh-radius);
    background: rgba(201, 161, 78, 0.10);
    color: var(--lh-gold);
    font-size: 1.15rem;
}

.stat-card-icon-active { background: rgba(201, 161, 78, 0.20); color: var(--lh-gold-bright); }

.stat-card-body { min-width: 0; flex: 1; }

.stat-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, #f5d98a, #c9a14e);
    color: #1a130a;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(201, 161, 78, 0.45);
    transition: transform 0.15s ease;
    animation: stat-card-action-pulse 2.4s ease-in-out infinite;
}

.stat-card-action:hover {
    transform: scale(1.09);
    animation: none;
    box-shadow: 0 4px 16px rgba(201, 161, 78, 0.65);
    color: #1a130a;
}

@keyframes stat-card-action-pulse {
    0%, 100% { box-shadow: 0 2px 9px rgba(201, 161, 78, 0.40); }
    50%      { box-shadow: 0 3px 15px rgba(201, 161, 78, 0.72); }
}

@media (prefers-reduced-motion: reduce) {
    .stat-card-action { animation: none; }
}

.stat-card-value {
    font-family: var(--lh-font-display);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.15;
    color: var(--lh-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lh-text-muted);
}

/* Recharge packages. */
.recharge-event {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    max-width: 680px;
    margin: 0 auto 2rem;
    padding: 0.85rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(201, 161, 78, 0.18), rgba(201, 161, 78, 0.06));
    border: 1px solid var(--lh-border-gold);
    border-radius: 999px;
    color: var(--lh-gold-bright);
    font-family: var(--lh-font-display);
    font-weight: 700;
    font-size: 1.05rem;
}

.recharge-event i { font-size: 1.25rem; }

.recharge-grid { max-width: 1000px; margin-inline: auto; }

.recharge-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.3rem 1.1rem 1.2rem;
    text-align: center;
    background: linear-gradient(165deg, var(--lh-surface-2), var(--lh-surface));
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.recharge-card:hover {
    border-color: var(--lh-border-gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

.recharge-card-featured {
    border-color: var(--lh-gold);
    box-shadow: 0 0 0 1px var(--lh-gold), 0 10px 34px rgba(201, 161, 78, 0.16);
}

.recharge-card-featured:hover {
    box-shadow: 0 0 0 1px var(--lh-gold), 0 16px 40px rgba(201, 161, 78, 0.26);
}

.recharge-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #f5d98a, #c9a14e);
    color: #1a130a;
    font-family: var(--lh-font-display);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(201, 161, 78, 0.4);
}

.recharge-badge-best {
    background: linear-gradient(180deg, #ffe6a3, #b07f2b);
    box-shadow: 0 4px 14px rgba(176, 127, 43, 0.45);
}

.recharge-coin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 0.6rem;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 38%, rgba(201, 161, 78, 0.30), rgba(201, 161, 78, 0.03) 70%);
    color: var(--lh-gold-bright);
    font-size: 1.35rem;
    filter: drop-shadow(0 4px 10px rgba(201, 161, 78, 0.25));
}

.recharge-amount {
    font-family: var(--lh-font-display);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--lh-gold-bright);
}

.recharge-unit {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lh-text-muted);
}

.recharge-was {
    margin-top: 0.6rem;
    font-size: 1rem;
    color: var(--lh-text-muted);
}

.recharge-was del {
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(201, 161, 78, 0.55);
}

.recharge-price {
    margin-top: auto;
    margin-bottom: 0.9rem;
    padding-top: 0.7rem;
    font-family: var(--lh-font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--lh-heading);
}

/* Vertically centre short page content (character/guild); tall content still
   top-aligns instead of clipping under the navbar (flex auto margins). */
.page-center { flex: 1 1 auto; display: flex; flex-direction: column; }
.page-center > .container { margin-block: auto; }

/* Character page. */
.char-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, rgba(201, 161, 78, 0.25), rgba(201, 161, 78, 0.02) 70%);
    border: 1px solid var(--lh-border-gold);
}

.char-emblem img { width: 48px; height: 48px; object-fit: contain; }

.char-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.char-status i { font-size: 0.55rem; }
.char-status.is-online { background: rgba(95, 190, 110, 0.14); color: #7ddb95; }
.char-status.is-offline { background: rgba(150, 150, 160, 0.12); color: var(--lh-text-muted); }

.char-stat {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    text-align: center;
    background: var(--lh-surface-2);
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
}

.char-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lh-text-muted); }
.char-stat-value { font-family: var(--lh-font-display); font-weight: 700; font-size: 1.35rem; color: var(--lh-heading); }
.char-stat-value-text { font-size: 1.05rem; }
.char-rank { margin-top: 0.15rem; font-weight: 700; font-size: 0.95rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); }

/* Guild page. */
.char-emblem i { font-size: 2rem; color: var(--lh-gold); }

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

.guild-bonuses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.guild-bonuses li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; color: #e6ddc0; }

.guild-bonus-lv {
    flex-shrink: 0;
    min-width: 46px;
    padding: 0.12rem 0.4rem;
    text-align: center;
    border-radius: 4px;
    background: rgba(201, 161, 78, 0.14);
    color: var(--lh-gold-bright);
    font-size: 0.72rem;
    font-weight: 700;
}


.equip-frame {
    padding: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--lh-border-gold);
    border-radius: var(--lh-radius);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.5);
}

@media (max-width: 400px) {
    .equip-frame { padding: 6px; }
}

.equip-panel {
    position: relative;
    width: 310px;
    height: 188px;
    background: url(/images/equipment_bg.png) no-repeat top left;
}

.equip-item {
    position: absolute;
    line-height: 0;
    cursor: help;
}

.equip-item img { display: block; image-rendering: -webkit-optimize-contrast; }

.equip-item:hover,
.equip-item:focus-visible { outline: none; z-index: 5; }

/* Item tooltip (shared by the character page and, later, the item-shop). */
.item-tip {
    position: absolute;
    right: calc(100% + 8px);
    top: 0;
    z-index: 1000;
    width: max-content;
    max-width: 280px;
    padding: 0.6rem 0.85rem;
    background: rgba(8, 8, 12, 0.98);
    border: 1px solid var(--lh-border-gold);
    border-radius: var(--lh-radius);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    pointer-events: none;
}

.equip-item:hover .item-tip,
.equip-item:focus-visible .item-tip { opacity: 1; visibility: visible; }

.item-tip-name { font-weight: 700; color: #fff; font-size: 0.95rem; margin-bottom: 0.35rem; }
.item-tip-line { white-space: nowrap; }

.item-tip-socket {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
    color: var(--lh-text-muted);
}

.item-tip-socket img { width: 16px; height: 16px; }
.item-tip-desc { margin-top: 0.4rem; color: var(--lh-text-muted); font-style: italic; white-space: normal; }
.item-tip-classes { margin-top: 0.4rem; color: var(--lh-text-muted); font-size: 0.72rem; }
.item-link { color: var(--lh-gold); font-style: normal; }
.item-star { font-size: 0.82em; margin: 0 0.5px; vertical-align: baseline; }
.item-star--1 { color: #6aa9e0; } /* {S1} blue */
.item-star--2 { color: #eaa53f; } /* {S2} orange */
.item-star--3 { color: #e05a5a; } /* {S3} red */

/* Settings list. */
.settings-list { display: grid; gap: 0.5rem; }
@media (min-width: 768px) { .settings-list { grid-template-columns: repeat(2, 1fr); } }

.settings-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.settings-item:hover { border-color: var(--lh-border-gold); background: rgba(201, 161, 78, 0.05); }
/* Confirmation modals. */
.modal-content {
    background: linear-gradient(160deg, var(--lh-surface-2), var(--lh-surface));
    border: 1px solid var(--lh-border);
    color: var(--lh-text);
}

.modal-header { border-bottom-color: var(--lh-border); }
.modal-title { font-family: var(--lh-font-display); color: var(--lh-heading); }
.modal .btn-close { filter: invert(1) grayscale(1) brightness(1.8); }

.settings-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: var(--lh-radius);
    background: rgba(201, 161, 78, 0.10);
    color: var(--lh-gold);
}

.settings-text { display: flex; flex-direction: column; gap: 0.1rem; }
.settings-name { font-family: var(--lh-font-display); font-weight: 700; color: var(--lh-heading); }
.settings-desc { font-size: 0.82rem; color: var(--lh-text-muted); }
.settings-arrow { margin-left: auto; color: var(--lh-text-muted); font-size: 0.85rem; }

.char-server-name {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--lh-border);
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-heading);
}

.char-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    height: 100%;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--lh-border);
    border-radius: var(--lh-radius);
    transition: border-color 0.12s ease;
}

.char-card:hover { border-color: var(--lh-border-gold); }

.char-card-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--lh-radius);
    border: 1px solid var(--lh-border-gold);
    background: rgba(201, 161, 78, 0.08);
}

.char-card-info { min-width: 0; flex: 1; }

.char-card-name {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-card-class { font-size: 0.8rem; color: var(--lh-text-muted); }

.char-card-level {
    font-family: var(--lh-font-display);
    font-weight: 700;
    color: var(--lh-gold-bright);
    white-space: nowrap;
}

/* Utilities ----------------------------------------------------------------- */

.text-accent {
    color: var(--lh-gold) !important;
}

.text-muted-2 {
    color: var(--lh-text-muted) !important;
}

/* ==========================================================================
   ITEM SHOP
   ========================================================================== */

.shop-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--lh-radius);
    background: var(--lh-surface-2);
    border: 1px solid var(--lh-border);
}
.shop-balance > i { color: var(--lh-gold); }
.shop-balance__num { font-family: var(--lh-font-display); font-weight: 800; font-size: 1.15rem; color: var(--lh-heading); }
.shop-balance__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lh-text-muted); }

/* Category tabs */
.shop-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-radius: var(--lh-radius);
    border: 1px solid var(--lh-border);
    background: var(--lh-surface-2);
}
.shop-tab {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--lh-text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease, border-color .12s ease, transform .12s ease;
}
.shop-tab:hover { color: var(--lh-heading); background: rgba(255, 255, 255, .05); transform: translateY(-1px); }
.shop-tab--active { color: #1a1206; background: linear-gradient(180deg, var(--lh-gold), #b9862f); border-color: var(--lh-gold); }

/* Grid + loading overlay */
.shop-loading {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%); /* centred without inset - inset was not applying */
    z-index: 1500;
    width: 70px; height: 70px;
    background: rgba(10, 10, 16, .88);
    border: 1px solid var(--lh-border); border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
    pointer-events: none;
}
/* Only while loading. Two-class selector so it beats the global
   .htmx-request.htmx-indicator { display: inline-block } and flex-centres the spinner. */
.shop-loading.htmx-request { display: flex; align-items: center; justify-content: center; }
.shop-loading .spinner-border { width: 2.4rem; height: 2.4rem; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .shop-grid { grid-template-columns: 1fr; } }

/* Card */
.shop-card {
    position: relative;
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--lh-border);
    background: var(--lh-surface-2);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.shop-card:hover { transform: translateY(-2px); border-color: rgba(201, 161, 78, .4); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.shop-card--promo { border-color: rgba(255, 144, 0, .28); }

.shop-card__badge {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    padding: 4px 9px; border-radius: 10px;
    background: linear-gradient(180deg, #ffcc66, #ff9000);
    color: #1a1206; font-weight: 900; font-size: 0.78rem;
    transform: rotate(-5deg);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
}
.shop-card__timer {
    position: absolute; top: 10px; right: 12px; z-index: 3;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 9px; border-radius: 10px;
    border: 1px solid rgba(255, 144, 0, .35);
    background: rgba(0, 0, 0, .45);
    color: #ffd9a6; font-weight: 800; font-size: 0.72rem;
}

.shop-card__media {
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--lh-border);
    background: rgba(0, 0, 0, .25);
    min-height: 86px;
    outline: none;
}
.shop-card__icon { width: 40px; height: auto; max-height: 78px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.shop-card__icon-fallback { font-size: 30px; color: var(--lh-text-muted); }

.shop-card__body { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.shop-card__name { font-family: var(--lh-font-display); font-weight: 700; font-size: 1rem; color: var(--lh-heading); line-height: 1.2; }
.shop-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.shop-card__price { display: flex; flex-direction: column; gap: 2px; }
.shop-card__old { color: var(--lh-text-muted); font-size: 0.78rem; text-decoration: line-through; display: inline-flex; align-items: center; gap: 4px; }
.shop-card__old > i, .shop-card__new > i { color: var(--lh-gold); font-size: 0.85em; }
.shop-card__new { color: var(--lh-heading); font-weight: 800; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 5px; }
.shop-card--promo .shop-card__new { color: #ff9d2e; }

/* Buy controls */
.shop-card__buy { display: flex; align-items: center; gap: 8px; }
.shop-qty { display: flex; align-items: center; border-radius: 10px; border: 1px solid var(--lh-border); overflow: hidden; }
.shop-qty__btn { width: 30px; height: 32px; border: 0; background: rgba(255, 255, 255, .04); color: var(--lh-heading); cursor: pointer; font-size: 15px; }
.shop-qty__btn:hover { background: rgba(255, 255, 255, .09); }
.shop-qty__val { width: 40px; height: 32px; border: 0; outline: 0; text-align: center; background: transparent; color: var(--lh-heading); font-weight: 700; -moz-appearance: textfield; }
.shop-qty__val::-webkit-outer-spin-button, .shop-qty__val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.shop-buy-btn {
    height: 34px; padding: 0 14px; border-radius: 10px;
    border: 1px solid var(--lh-gold);
    background: linear-gradient(180deg, var(--lh-gold), #b9862f);
    color: #1a1206; font-weight: 800; cursor: pointer; white-space: nowrap;
    transition: transform .12s ease, filter .12s ease;
}
.shop-buy-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.shop-buy-btn:disabled { opacity: .7; cursor: default; }

/* Item stats / bonuses / description, shown inline in the card body. */
.shop-card__stats { font-size: 0.78rem; line-height: 1.5; }
.shop-card__stats .item-tip-line { white-space: normal; }
.shop-card__stats .item-tip-desc { margin-top: 0.35rem; font-size: 0.74rem; }

/* Pagination */
.shop-pager { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.shop-page {
    min-width: 38px; height: 38px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid var(--lh-border);
    background: var(--lh-surface-2); color: var(--lh-text-muted);
    text-decoration: none; font-weight: 700; cursor: pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.shop-page:hover { transform: translateY(-1px); color: var(--lh-heading); border-color: rgba(201, 161, 78, .4); }
.shop-page--active { background: linear-gradient(180deg, var(--lh-gold), #b9862f); border-color: var(--lh-gold); color: #1a1206; }
.shop-page--nav { font-size: 18px; }
.shop-page--dots { border-color: transparent; background: transparent; min-width: 18px; }
.shop-page.is-disabled { opacity: .4; pointer-events: none; }

/* Toasts */
.shop-toasts { position: fixed; z-index: 2000; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, 92vw); }
.shop-toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--lh-border);
    background: var(--lh-surface-2);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .5);
    color: var(--lh-heading); font-weight: 600; font-size: 0.9rem;
}
.shop-toast > i { font-size: 1.15rem; }
.shop-toast--ok { border-color: rgba(95, 190, 110, .5); }
.shop-toast--ok > i { color: #7ddb95; }
.shop-toast--err { border-color: rgba(224, 90, 90, .5); }
.shop-toast--err > i { color: #e46b6b; }
