.wth-wrap,
.wth-wrap * {
    box-sizing: border-box;
}

.wth-wrap {
    width: min(100%, var(--wth-max-width));
    margin: 28px auto;
    padding: 14px;
    color: var(--wth-text);
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--wth-radius) + 10px);
    isolation: isolate;
}

.wth-layout-wide {
    width: min(100%, calc(var(--wth-max-width) + 220px));
}

.wth-wrap .wth-bg-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--wth-accent) 28%, transparent), transparent 36%),
        radial-gradient(circle at 84% 0%, color-mix(in srgb, var(--wth-neon) 22%, transparent), transparent 32%),
        radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--wth-avatar-neon) 15%, transparent), transparent 36%),
        var(--wth-bg-image),
        var(--wth-wrap-bg);
    background-size: cover, cover, cover, min(620px, 82%) auto, cover;
    background-position: center, center, center, center, center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: -2;
}

.wth-wrap .wth-bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,.05), rgba(0,0,0,.35));
    z-index: -1;
}

.wth-shell {
    width: 100%;
    padding: clamp(16px, 4vw, 34px);
    border-radius: var(--wth-radius);
    backdrop-filter: blur(10px);
}

.wth-heading {
    text-align: center;
    margin: 0 auto 24px;
}

.wth-heading-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 6px 13px;
    border-radius: 999px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 12px;
    color: var(--wth-text);
    background: linear-gradient(135deg, var(--wth-accent), var(--wth-neon));
    box-shadow: 0 10px 26px rgba(0,0,0,.28), 0 0 24px color-mix(in srgb, var(--wth-neon) 28%, transparent);
}

.wth-heading h2 {
    margin: 0;
    color: var(--wth-text);
    font-size: clamp(24px, 6vw, var(--wth-title-size));
    line-height: 1.12;
    font-weight: 900;
    text-shadow: 0 3px 18px rgba(0,0,0,.46);
}

.wth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--wth-gap);
    align-items: stretch;
}

.wth-card,
.wth-publisher-wrap,
.wth-login-form,
.wth-register-form,
.wth-profile-form {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: clamp(16px, 4vw, 24px);
    border-radius: var(--wth-radius);
    color: var(--wth-text);
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), var(--wth-card-bg);
    border: var(--wth-border-width) solid var(--wth-border-color);
    box-shadow: var(--wth-shadow);
    transform-style: preserve-3d;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.wth-publisher-wrap {
    margin: 0 auto var(--wth-gap);
    max-width: 980px;
    width: 100%;
}

.wth-neon-on .wth-card,
.wth-neon-on .wth-publisher-wrap,
.wth-neon-on .wth-login-form,
.wth-neon-on .wth-register-form,
.wth-neon-on .wth-profile-form {
    box-shadow: var(--wth-shadow), 0 0 0 1px var(--wth-border-color), 0 0 30px var(--wth-neon-glow);
}

.wth-3d-on .wth-card:hover {
    transform: perspective(900px) rotateX(1.4deg) translateY(-5px);
    box-shadow: var(--wth-shadow), 0 18px 54px rgba(0,0,0,.42), 0 0 34px var(--wth-neon-glow);
}

.wth-card::before,
.wth-publisher-wrap::before,
.wth-login-form::before,
.wth-register-form::before,
.wth-profile-form::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,.13), transparent 36%, rgba(255,255,255,.04));
    opacity: .72;
}

.wth-card > *,
.wth-publisher-wrap > *,
.wth-login-form > *,
.wth-register-form > *,
.wth-profile-form > * {
    position: relative;
    z-index: 1;
}

.wth-card-top,
.wth-member-hello {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.wth-member-hello {
    justify-content: center;
    text-align: left;
    padding: 10px;
    border-radius: calc(var(--wth-radius) * .72);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
}

.wth-member-hello strong,
.wth-member-hello span {
    display: block;
}

.wth-member-hello strong {
    color: var(--wth-text);
    font-size: 18px;
}

.wth-member-hello span {
    color: var(--wth-muted);
    margin-top: 3px;
    font-size: 13px;
}

.wth-avatar {
    width: var(--wth-avatar-size);
    height: var(--wth-avatar-size);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--wth-avatar-neon) 88%, white 12%);
    box-shadow: 0 0 0 4px rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.34);
    flex: 0 0 auto;
}

.wth-avatar-neon-on .wth-avatar {
    box-shadow: 0 0 0 4px rgba(255,255,255,.07), 0 0 24px color-mix(in srgb, var(--wth-avatar-neon) 60%, transparent), 0 13px 30px rgba(0,0,0,.38);
}

.wth-author {
    font-weight: 900;
    font-size: 16px;
    line-height: 1.1;
    color: var(--wth-text);
}

.wth-date {
    display: block;
    margin-top: 4px;
    color: var(--wth-muted);
    font-size: 13px;
}

.wth-card-title,
.wth-single-title {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    color: var(--wth-text);
    font-size: clamp(21px, 4.8vw, calc(var(--wth-title-size) * .86));
    line-height: 1.15;
    font-weight: 900;
    text-shadow: 0 3px 18px rgba(0,0,0,.36);
}

.wth-single-title {
    font-size: clamp(26px, 7vw, var(--wth-title-size));
}

.wth-content {
    position: relative;
    z-index: 1;
    color: var(--wth-text);
    font-size: var(--wth-content-size);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.wth-content p {
    margin: 0 0 1em;
}

.wth-content p:last-child {
    margin-bottom: 0;
}

.wth-content a {
    color: var(--wth-neon);
    font-weight: 800;
}

.wth-content img,
.wth-content video,
.wth-content iframe,
.wth-content embed,
.wth-content object,
.wth-content audio {
    max-width: 100%;
    border-radius: calc(var(--wth-radius) * .58);
    height: auto;
    box-shadow: 0 14px 34px rgba(0,0,0,.34);
}

.wth-content audio {
    width: 100%;
}

.wth-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.wth-media-item {
    margin: 16px 0 0;
}

.wth-actions,
.wth-auth-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.wth-views,
.wth-shares,
.wth-button,
.wth-back,
.wth-wrap button.wth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 900;
    line-height: 1;
    border: 1px solid var(--wth-button-border);
    font-size: var(--wth-button-text-size);
}

.wth-views,
.wth-shares {
    color: var(--wth-text);
    background: rgba(255,255,255,.08);
}

.wth-button,
.wth-wrap button.wth-button {
    cursor: pointer;
    color: var(--wth-button-text) !important;
    background: linear-gradient(135deg, var(--wth-button-bg), color-mix(in srgb, var(--wth-button-bg) 64%, var(--wth-neon) 36%));
    border-color: var(--wth-button-border);
    box-shadow: 0 14px 28px rgba(0,0,0,.3), 0 0 20px var(--wth-neon-glow);
    transition: transform .16s ease, filter .16s ease;
}

.wth-button:hover,
.wth-back:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.wth-fb {
    background: linear-gradient(135deg, var(--wth-button-bg), color-mix(in srgb, var(--wth-button-bg) 58%, var(--wth-neon) 42%));
}

.wth-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
}

.wth-back {
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    color: var(--wth-text) !important;
    background: rgba(255,255,255,.08);
}

.wth-single-mode .wth-grid {
    grid-template-columns: minmax(0, 1fr);
}

.wth-single-card {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
}

.wth-empty,
.wth-login-needed {
    text-align: center;
    padding: 18px;
    border-radius: var(--wth-radius);
    color: var(--wth-text);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    margin: 0;
}

.wth-login-needed {
    font-weight: 900;
    font-size: clamp(18px, 4vw, var(--wth-form-title-size));
}

.wth-collapsible-panel {
    display: none;
    margin-top: 14px;
}

.wth-collapsible-panel.wth-open {
    display: block;
}

.wth-wrap form h3,
.wth-profile-details summary {
    color: var(--wth-text);
    font-size: var(--wth-form-title-size);
    margin: 0 0 16px;
    font-weight: 900;
    text-align: center;
}

.wth-profile-details {
    margin: 14px 0;
}

.wth-profile-details summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
}

.wth-profile-details summary::-webkit-details-marker {
    display: none;
}

.wth-ajax-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--wth-text);
    font-weight: 800;
    margin: 0 0 13px;
}

.wth-ajax-form label span {
    font-size: 14px;
    color: var(--wth-muted);
}

.wth-ajax-form input[type="text"],
.wth-ajax-form input[type="email"],
.wth-ajax-form input[type="password"],
.wth-ajax-form input[type="file"],
.wth-ajax-form textarea {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid var(--wth-border-color);
    background: rgba(0,0,0,.27);
    color: var(--wth-text);
    padding: 10px 12px;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.wth-ajax-form textarea {
    min-height: 110px;
    resize: vertical;
}

.wth-ajax-form input::file-selector-button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--wth-button-bg), color-mix(in srgb, var(--wth-button-bg) 66%, var(--wth-neon) 34%));
    font-weight: 800;
    margin-right: 10px;
}

.wth-grid-mini {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.wth-form-message {
    min-height: 24px;
    margin-top: 12px;
    text-align: center;
    font-weight: 800;
    color: var(--wth-muted);
}

.wth-form-message.wth-error {
    color: #fecaca;
}

.wth-form-message.wth-success {
    color: #d9f99d;
}

.wth-form-busy {
    opacity: .72;
}

.wth-form-busy button {
    pointer-events: none;
}

.wth-featured-label {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--wth-button-bg), color-mix(in srgb, var(--wth-button-bg) 66%, var(--wth-neon) 34%));
    color: var(--wth-button-text);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0,0,0,.32);
}

@media (min-width: 760px) {
    .wth-grid {
        grid-template-columns: repeat(var(--wth-columns), minmax(0, 1fr));
    }

    .wth-actions {
        justify-content: flex-start;
    }

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

@media (max-width: 480px) {
    .wth-wrap {
        margin: 16px auto;
        padding: 8px;
        border-radius: calc(var(--wth-radius) * .78);
    }

    .wth-shell {
        padding: 14px;
    }

    .wth-card,
    .wth-publisher-wrap,
    .wth-login-form,
    .wth-register-form,
    .wth-profile-form {
        padding: 15px;
    }

    .wth-card-top,
    .wth-member-hello {
        align-items: flex-start;
    }

    .wth-actions,
    .wth-auth-buttons {
        align-items: stretch;
    }

    .wth-views,
    .wth-shares,
    .wth-button,
    .wth-back,
    .wth-wrap button.wth-button {
        width: 100%;
    }

    .wth-featured-label {
        position: static;
        display: inline-flex;
        margin-bottom: 12px;
    }
}

/* v1.2.0 javítások: egyetlen poszt középre, FB beállítás lenyíló blokk */
.wth-grid.wth-count-1 {
    grid-template-columns: minmax(0, min(100%, 660px));
    justify-content: center;
    justify-items: center;
}

.wth-grid.wth-count-1 > .wth-card,
.wth-grid.wth-count-1 > .wth-empty {
    width: 100%;
}

.wth-card .wth-actions {
    justify-content: center;
}

.wth-fb-settings {
    margin: 8px 0 16px;
    border-radius: calc(var(--wth-radius) * .72);
    background: rgba(255,255,255,.055);
    border: 1px solid var(--wth-border-color);
    overflow: hidden;
}

.wth-fb-settings summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    color: var(--wth-text);
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--wth-accent) 42%, transparent), color-mix(in srgb, var(--wth-neon) 30%, transparent));
}

.wth-fb-settings summary::-webkit-details-marker {
    display: none;
}

.wth-fb-settings[open] {
    box-shadow: 0 0 24px var(--wth-neon-glow);
}

.wth-fb-settings .wth-grid-mini {
    padding: 14px;
}

@media (min-width: 760px) {
    .wth-grid.wth-count-1 {
        grid-template-columns: minmax(0, min(100%, 660px));
    }

    .wth-card .wth-actions {
        justify-content: center;
    }
}

/* v1.3.0 finomítások: kompakt beküldő, szolid FB blokk, kilépés gomb */
.wth-publisher-wrap {
    max-width: min(100%, 860px);
    padding: clamp(12px, 2.4vw, 18px);
}

.wth-submit-compact {
    max-width: 760px;
    margin: 0 auto;
}

.wth-submit-compact h3 {
    margin-bottom: 10px !important;
}

.wth-submit-compact label {
    margin-bottom: 9px;
}

.wth-submit-compact textarea {
    min-height: 82px;
}

.wth-submit-compact input[type="text"],
.wth-submit-compact input[type="file"],
.wth-submit-compact textarea {
    min-height: 40px;
    padding: 8px 11px;
}

.wth-member-hello {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.wth-member-hello .wth-hello-text {
    flex: 1 1 220px;
    min-width: 0;
}

.wth-member-hello .wth-logout {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(255,255,255,.10) !important;
    box-shadow: none;
}

.wth-fb-settings {
    margin: 6px auto 12px;
    max-width: 760px;
    background: rgba(255,255,255,.035);
    border: 1px solid var(--wth-border-color);
    box-shadow: none;
}

.wth-fb-settings summary {
    padding: 9px 12px;
    font-size: 14px;
    background: rgba(255,255,255,.075);
    color: var(--wth-muted);
}

.wth-fb-settings[open] {
    box-shadow: 0 0 16px var(--wth-neon-glow);
}

.wth-fb-help {
    margin: 10px 14px 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(0,0,0,.18);
    color: var(--wth-muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.wth-fb-settings .wth-grid-mini {
    padding: 10px 14px 12px;
}

@media (max-width: 480px) {
    .wth-publisher-wrap {
        padding: 12px;
    }

    .wth-member-hello {
        text-align: center;
    }

    .wth-member-hello .wth-hello-text {
        flex-basis: 100%;
    }

    .wth-member-hello .wth-logout {
        width: auto;
        min-width: 120px;
    }
}
