/* WAWEL_AUTH_DEFAULT_PUBLIC_PAGE */
@font-face {
    font-family: "Wawel Nerd Symbols";
    src: url("./fonts/nerd-fonts/SymbolsNerdFont-Subset.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --panel: rgba(16, 24, 46, 0.86);
    --panel-strong: rgba(12, 18, 36, 0.95);
    --line: rgba(107, 140, 230, 0.34);
    --line-strong: rgba(79, 140, 255, 0.48);
    --text: #ecf2ff;
    --muted: #a9b9df;
    --accent: #4f8cff;
    --accent-2: #3ed8b5;
    --shadow: 0 12px 38px rgba(4, 10, 20, 0.42);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", "SF Pro Display", "Inter", sans-serif;
    background: radial-gradient(circle at 20% 10%, #202f5f 0%, transparent 48%),
        radial-gradient(circle at 85% 20%, #184970 0%, transparent 40%),
        linear-gradient(160deg, #070b15 0%, #0d1328 55%, #0a0e1d 100%);
    color: var(--text);
}

body {
    display: flex;
    flex-direction: column;
}

.bg-blur {
    position: fixed;
    pointer-events: none;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.22;
    z-index: 0;
}

.bg-blur-a {
    background: #4f8cff;
    top: -10rem;
    left: -8rem;
}

.bg-blur-b {
    background: #3ed8b5;
    right: -12rem;
    bottom: -10rem;
}

.page {
    position: relative;
    z-index: 1;
    width: min(1240px, 96vw);
    margin: 2.2rem auto;
    min-height: calc(100vh - 4.4rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    background: linear-gradient(165deg, var(--panel) 0%, var(--panel-strong) 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hero {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    padding: 1.35rem 1.45rem;
}

.hero-art {
    display: flex;
    justify-content: center;
}

.icon-wrap {
    width: 132px;
    height: 132px;
    border-radius: 22px;
    padding: 10px;
    background: linear-gradient(160deg, rgba(19, 31, 68, 0.95) 0%, rgba(7, 14, 34, 0.98) 100%);
    border: 1px solid var(--line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.icon-wrap.is-switchable {
    cursor: pointer;
}

.icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.icon-wrap.fallback img {
    filter: grayscale(1) contrast(1.04) brightness(0.93);
}

.hero-copy {
    display: grid;
    gap: 0;
    min-width: 0;
}

.hero-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
    min-width: 0;
}

.hero-corner-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-self: start;
    gap: 0.65rem;
}

h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: 0.02em;
    min-width: 0;
    overflow-wrap: anywhere;
}

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

.sub {
    margin: 0.38rem 0 0;
    font-size: 1.08rem;
}

.hero-label {
    margin-top: 0.55rem;
}

.motd-line {
    color: #dbe6ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc {
    margin: 1rem 0 0;
    max-width: 66ch;
    line-height: 1.7;
    color: #dbe6ff;
    white-space: pre-wrap;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 125, 194, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: #eef3ff;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.05rem;
}

.btn {
    border: 1px solid rgba(104, 143, 236, 0.52);
    background: linear-gradient(160deg, rgba(33, 57, 117, 0.95) 0%, rgba(16, 32, 72, 0.98) 100%);
    color: var(--text);
    border-radius: 10px;
    padding: 0.64rem 0.86rem;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    border-color: rgba(79, 140, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}

.btn.alt {
    background: rgba(9, 16, 39, 0.7);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.icon-only-btn {
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.icon-only-btn .nf-icon {
    font-size: 1.18rem;
    width: 1.18rem;
}

.nf-icon {
    font-family: "Wawel Nerd Symbols";
    font-style: normal;
    font-weight: normal;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
}

.layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
}

.stack {
    display: grid;
    gap: 1rem;
}

.section {
    padding: 1.15rem 1.2rem;
}

.section-title {
    font-size: 1rem;
    color: var(--muted);
    margin: 0 0 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.label {
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9cb0db;
    margin: 0 0 0.65rem;
}

.value {
    font-size: 1.06rem;
    color: #f0f5ff;
}

.value-wrap {
    word-break: break-all;
}

.connect {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.server-address-block {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.server-address-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.stat-card,
.connect-card,
.fallback-entry {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(5, 13, 35, 0.56);
    border: 1px solid rgba(75, 102, 177, 0.38);
}

.connect-card h3 {
    margin: 0 0 0.55rem;
    font-size: 1rem;
}

.connect-card p {
    margin: 0;
    color: #cad8fb;
    line-height: 1.6;
}

.fallback-list {
    display: grid;
    gap: 0.75rem;
}

.player-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.player-entry {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(5, 13, 35, 0.56);
    border: 1px solid rgba(75, 102, 177, 0.38);
    min-width: 0;
}

.player-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    image-rendering: pixelated;
    flex: 0 0 auto;
}

.player-name {
    min-width: 0;
    color: #eef3ff;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modlist-widget {
    display: grid;
    gap: 0.75rem;
}

.fallback-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.modlist-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.fallback-arrow {
    display: inline-block;
    color: var(--accent-2);
    transition: transform 0.18s ease;
}

.fallback-entry.expanded .fallback-arrow {
    transform: rotate(90deg);
}

.modlist-widget.expanded .fallback-arrow {
    transform: rotate(90deg);
}

.fallback-name {
    font-weight: 600;
}

.modlist-count {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.9rem;
}

.fallback-details {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(75, 102, 177, 0.28);
}

.fallback-link-row {
    display: grid;
    gap: 0.22rem;
}

.fallback-link-label {
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9cb0db;
}

.fallback-link-value {
    color: #d9e7ff;
    text-decoration: none;
    word-break: break-all;
}

.fallback-link-value:hover {
    color: #ffffff;
    text-decoration: underline;
}

.modlist {
    display: grid;
    gap: 0.6rem;
}

.mod-entry {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(5, 13, 35, 0.56);
    border: 1px solid rgba(75, 102, 177, 0.38);
}

.mod-mainline {
    color: #eef3ff;
}

.mod-filename {
    margin-top: 0.28rem;
    color: #97a7d0;
    font-size: 0.86rem;
    opacity: 0.8;
    word-break: break-all;
}

code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.16rem 0.38rem;
    border-radius: 8px;
}

.footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.25rem 0.2rem 0.1rem;
    color: var(--muted);
}

.footer-logo {
    width: 1.8rem;
    height: 1.8rem;
    object-fit: contain;
    opacity: 0.92;
}

.footer-textline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.hidden {
    display: none !important;
}

@media (max-width: 960px) {
    .layout,
    .connect,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page {
        width: min(96vw, 96vw);
        margin: 1.2rem auto;
    }

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

    .hero-head {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .hero-corner-actions {
        justify-content: flex-end;
    }

    .footer {
        padding-left: 0;
    }
}
