body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: #e5e7eb;
    overflow-x: hidden;
}

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

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 10000;
    padding: 10px 14px;
    border-radius: 8px;
    background: #f8fafc;
    color: #020617;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, textarea, [role="button"], [role="option"]):focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}

.is-busy {
    cursor: wait !important;
    opacity: 0.65;
    pointer-events: none;
}

/* ================= HEADER ================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(2, 6, 23, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    padding: 16px 24px;
    height: 80px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* LEFT: SEARCH */
.header-search input {
    width: 380px;
    height: 44px;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.5);
}

.header-search,
.header-logo,
.header-profile {
    align-self: center;
}

/* CENTER: LOGO */
.header-logo {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    opacity: 0.9;
    color: inherit;
    text-decoration: none;
}

.rarity{
    padding-top: 10px;
}
/* RIGHT: MENU */
.header-menu {
    justify-self: end;
    position: relative;
}


.menu-button {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
}

.menu-dropdown {
    position: absolute;
    right: 0;
    top: 48px;
    min-width: 180px;
    background: #020617;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    overflow: hidden;
    display: none;
}

.menu-dropdown a,
.menu-link-button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: background 0.2s;
    color: inherit;
    text-align: left;
    background: none;
    border: 0;
    cursor: pointer;
}

.menu-dropdown form {
    margin: 0;
}

.menu-dropdown a:hover,
.menu-link-button:hover {
    background: rgba(255,255,255,0.08);
}

.header-menu:hover .menu-dropdown,
.header-menu:focus-within .menu-dropdown,
.header-menu.is-open .menu-dropdown {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ================= CONTENT ================= */

h1, h2 {
    text-align: center;
    margin-top: 40px;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 30px;
    box-sizing: border-box;
    flex: 1 0 auto;
}

/* ===== Back Button ===== */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.back-button:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}

/* ===== Grid / Cards ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;

}

.card {
    position: relative;
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 18px;


    display: flex;
    flex-direction: column;
    justify-content: space-between;

    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

img {
    max-width: 100%;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
}
/* Jahr links oben */
.year {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 0.75rem;
    opacity: 0.7;
    z-index: 2;
}

/* Symbol rechts oben – IMMER klein */
.symbol {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: 0.9;
    z-index: 2;
    margin: 0;
    pointer-events: none;
}

/* Großes Logo in der Mitte */
.main-image {
    height: 110px;
    margin: 28px auto 12px;
    object-fit: contain;
    display: block;
}

/* ================= SET DETAIL HEADER ================= */

.set-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: -20px;
}

/* LEFT: Back button */
.set-header-left {
    flex: 0 0 auto;
}

/* CENTER: Logo + Name */
.set-header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.set-header-center h1 {
    margin: 0;
}

/* RIGHT: Progress */
.set-header-right {
    flex: 0 0 auto;
    text-align: right;
width: 140px;
}

/* ================= UNIFIED PROGRESS ================= */

.progress-bar.unified {
    position: relative;
    width: 100%;
    height: 18px;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    overflow: hidden;
}

/* Labels above bar */
.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.label-main {
    color: #22c55e;
}

.label-complete {
    color: #60a5fa;
}

/* Unified bar background */


/* Main set (green, left) */
.progress-main {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.3s ease;
}

/* Complete set extension (blue, after main) */
.progress-complete {
    position: absolute;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    transition: width 0.3s ease;
}

/* Numbers below bar */
.progress-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 6px;
}

/* ===== Set Progress (Overview) ===== */

.set-progress {
    margin-top: 10px;
}

/* kleinere Variante */
.progress-bar.unified.small {
    width: 100%;
    height: 8px;
}

.progress-bar.unified.small .progress-main,
.progress-bar.unified.small .progress-complete {
    height: 100%;
}

.progress-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.progress-svg-main {
    fill: #22c55e;
}

.progress-svg-complete {
    fill: #60a5fa;
}


/* Set Logo */
.set-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.set-logo.large {
    width: 240px;
    height: 240px;
    object-fit: contain;
    margin-bottom: 8px;
}

.action-button.loading {
    opacity: 0.7;
    cursor: wait;
}

.action-button.loading::after {
    content: " ⏳";
}



/* ===== Owned Checkbox (Custom) ===== */

.owned-toggle {
    position: absolute;
    top: 12px;
    left: 12px;
    cursor: pointer;
    z-index: 10;
}

/* native checkbox verstecken */
.owned-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* sichtbarer Kreis */
.checkmark {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

/* Hover */
.owned-toggle:hover .checkmark {
    background: rgba(255,255,255,0.18);
}

/* Häkchen */
.checkmark::after {
    content: "✓";
    font-size: 16px;
    color: #22c55e;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s, transform 0.15s;
}

/* checked state */
.owned-toggle input:checked + .checkmark {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
}

.owned-toggle input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.card-variant-rail {
    position: absolute;
    top: 22px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.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;
}

.variant-toggle {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 9px;
    background: rgba(8, 16, 34, .9);
    color: rgba(231, 239, 252, .72);
    font-size: .65rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transition:
        border-color .16s ease,
        background .16s ease,
        color .16s ease,
        transform .16s ease;
}

.variant-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(116, 170, 255, .72);
    color: #fff;
}

.variant-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.variant-toggle:has(input:focus-visible) {
    outline: 3px solid rgba(96, 165, 250, .55);
    outline-offset: 2px;
}

.variant-toggle.is-owned,
.variant-toggle:has(input:checked) {
    border-color: #22c55e;
    background: rgba(16, 116, 61, .78);
    color: #fff;
}

.interactive-card.has-variants .card-image-button {
    width: calc(100% - 80px);
    margin: 22px auto 0;
}

.card.owned,
.card.has-owned-version {
    outline: 2px solid #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

/* ===== Shared interactive card content ===== */
.card-image-button {
    width: calc(100% - 30px);
    margin: 22px auto 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.card-image-button img {
    width: 100%;
    height: auto;
    aspect-ratio: 2.5 / 3.5;
    object-fit: contain;
    margin: 0 auto 12px;
}

.interactive-card-info {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
}

.interactive-card-info .card-name {
    min-height: 2.4em;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-align: center;
}

.interactive-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    opacity: 0.78;
}

.interactive-card-meta .rarity {
    padding-top: 0;
    text-align: right;
}

.card-artist {
    min-height: 1.2em;
    font-size: 0.75rem;
    opacity: 0.62;
    text-align: center;
}

.card-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.card-lightbox[hidden] {
    display: none;
}

.card-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(8px);
}

.card-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 620px);
    max-height: 92vh;
}

.card-lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 88vh;
    margin: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

.card-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

body.lightbox-open {
    overflow: hidden;
}

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

@media (hover: none), (pointer: coarse) {
    .card .card-action {
        opacity: 1;
    }
}

/* ================= PAGE HEADER ================= */

.page-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin: 40px 0 50px;
}

.page-header-left {
    justify-self: start;
}

.page-header-center {
    text-align: center;
}



/* ================= TYPOGRAPHY SYSTEM ================= */

.page-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 40px 0 10px;
}

.page-subtitle {
    text-align: center;
    font-size: 1rem;
    opacity: 0.65;
    margin-bottom: 40px;
}

.section-title {
    margin: 60px 0 20px;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}


/* ================= CARD FILTERS ================= */

.card-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0 40px;
}

.filter-button {
    padding: 0 18px;
    height: 42px;
    line-height: 42px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, border-color 0.2s;
}

.filter-button:hover {
    background: rgba(255,255,255,0.14);
}

.filter-button.active {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.35);
}

/* ================= CARD TOOLBAR ================= */

.card-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LEFT */
.card-filters {
    display: flex;
    gap: 12px;
}

/* RIGHT */
.card-actions {
    display: flex;
    gap: 12px;
}

.action-button {
    padding: 0 22px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: linear-gradient(
135deg,
rgba(255,255,255,0.14),
rgba(255,255,255,0.08)
    );

    border: 1px solid rgba(255,255,255,0.22);

    backdrop-filter: blur(6px);

    color: #e5e7eb;
    font-size: 0.85rem;
    font-weight: 500;

    cursor: pointer;

    transition:
transform 0.15s ease,
box-shadow 0.15s ease,
background 0.2s ease,
border-color 0.2s ease;

    box-shadow:
0 4px 10px rgba(0,0,0,0.35),
inset 0 1px 0 rgba(255,255,255,0.1);
}

.action-button:hover {
    transform: translateY(-2px);

    background: linear-gradient(
135deg,
rgba(255,255,255,0.22),
rgba(255,255,255,0.12)
    );

    border-color: rgba(255,255,255,0.35);

    box-shadow:
0 8px 18px rgba(0,0,0,0.45),
inset 0 1px 0 rgba(255,255,255,0.15);
}

.logo-text-only img {
    height: 46px;
    opacity: 0.95;
    margin: 0;
    display: block;
}

/* Optional: leichtes Hover-Feedback */
.logo-text-only:hover img {
    opacity: 1;
}


.dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

#per-page-dropdown {
    z-index: 9999;
    position: absolute;
}

/* ================= FOOTER ================= */

.site-footer {
    margin-top: 80px;
    padding: 24px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-center {
    max-width: 1400px;
    margin: 0 auto;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;

    font-size: 0.85rem;
    opacity: 0.85;
}

.footer-center a:hover {
    text-decoration: underline;
}



/* Mobile: untereinander */
@media (max-width: 600px) {
    .footer-center {
text-align: center;
flex-wrap: wrap;
    }
}


/* ================= KO-FI BUTTON ================= */

.footer-stack {
    flex-direction: column;
    gap: 18px; /* etwas mehr Luft */
}

/* Ko-fi Button */
.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    padding: 12px 22px;          /* 🔥 größer */
    border-radius: 999px;

    background: linear-gradient(135deg, #0f264d, #1e3a8a);
    color: #fff;

    font-size: 0.95rem;          /* 🔥 größerer Text */
    font-weight: 600;

    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);

    transition: transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s;
}

.kofi-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.45);
    opacity: 0.97;
}

.kofi-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;

    position: relative;
    top: 5px; /* 🔥 nach Bedarf: 1–3px */
}

/* Legal Links */
.footer-legal {
    font-size: 0.85rem;
    opacity: 0.85;
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* ================= APP NAVIGATION ================= */
.mobile-nav-toggle {
    display: none;
}

.header-profile {
    justify-self: end;
}

.profile-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.profile-button .user-avatar {
    margin: 0;
    display: block;
}

.site-sidebar {
    position: fixed;
    top: 80px;
    bottom: 0;
    left: 0;
    z-index: 90;
    width: 240px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 18px;
    overflow-y: auto;
    background: rgba(2, 6, 23, 0.97);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-heading {
    padding: 0 12px 7px;
    color: rgba(226, 232, 240, 0.5);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-link.is-active {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    box-shadow: inset 3px 0 #60a5fa;
}

.sidebar-link.is-disabled {
    color: rgba(203, 213, 225, 0.35);
    cursor: not-allowed;
}

.sidebar-account {
    margin-top: auto;
    padding-top: 26px;
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout {
    color: #fca5a5;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1300px) {
    .container {
        padding: 22px 16px;
    }

    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .header-inner {
        height: 116px;
        padding: 10px 16px;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        grid-template-rows: 48px 44px;
        gap: 4px 8px;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        width: 44px;
        height: 44px;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.07);
    }

    .mobile-nav-toggle span {
        width: 100%;
        height: 2px;
        background: #e5e7eb;
    }

    .header-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header-search input {
        width: 100%;
        box-sizing: border-box;
    }

    .header-logo {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    .header-logo .logo-text-only {
        display: block;
        max-width: min(140px, 42vw);
    }

    .header-logo .logo-text-only img {
        width: 100%;
        height: auto;
        max-height: 40px;
    }

    .header-profile {
        grid-column: 3;
        grid-row: 1;
    }

    .menu-username {
        display: none;
    }

    .profile-button {
        width: 44px;
        height: 44px;
        box-sizing: border-box;
        justify-content: center;
        padding: 4px;
    }

    .site-sidebar {
        top: 116px;
        z-index: 1500;
        width: min(82vw, 290px);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    body.mobile-nav-open .site-sidebar {
        transform: translateX(0);
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 116px 0 0;
        z-index: 1400;
        width: 100%;
        border: 0;
        background: rgba(2, 6, 23, 0.72);
    }

    body.mobile-nav-open .sidebar-backdrop {
        display: block;
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}
