:root {
    --community-accent: #ffd166;
    --community-accent-strong: #ffd700;
    --community-text: #e6edf7;
    --community-muted: #c7d2e4;
}

html,
body {
    margin: 0;
    padding: 0;
}

.community-body {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    background: #0f0f12 url("/files/images/home-background.jpg") center / cover no-repeat fixed;
    color: var(--community-text);
    overflow-x: hidden;
}

/*
 * Bu sayfada navbar (ve içindeki #page-preloader) yok; ortak preloader scripti
 * "preloader-lock" sınıfını body'den kaldıramadığı için scroll kilitli kalıyordu.
 * Bu kuralla dikey scroll her durumda açık tutulur.
 */
body.community-body.preloader-lock {
    overflow-y: auto;
}

.community-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(
            1300px 800px at 50% 44%,
            rgba(28, 28, 32, 0.35) 0%,
            rgba(0, 0, 0, 0.82) 78%
        ),
        linear-gradient(
            160deg,
            rgba(10, 10, 12, 0.94) 0%,
            rgba(16, 16, 19, 0.95) 55%,
            rgba(6, 6, 8, 0.97) 100%
        );
    z-index: 0;
}

.community-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 1500px;
    margin: 0 auto;
    padding: clamp(18px, 4vh, 48px) 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* İçerik ekrandan uzunsa üstten hizala (üst kısım kesilmesin / scroll erişilebilir olsun) */
    justify-content: safe center;
    align-items: center;
    gap: clamp(18px, 3.5vh, 40px);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===================== HERO ===================== */
.community-hero {
    text-align: center;
}

.community-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-weight: 700;
    font-size: clamp(11px, 1.4vh, 13px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 clamp(4px, 1vh, 10px);
}

.community-hero h1 {
    font-family: "Cinzel", "Inter", serif !important;
    font-size: clamp(22px, min(4vw, 5vh), 40px);
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0%, #cfd4dc 55%, #9aa0a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===================== LOGO SIRALAMASI ===================== */
.community-constellation {
    width: 100%;
}

.community-orbit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 2.4vw, 36px);
}

.community-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--community-text);
    width: clamp(150px, 13vw, 200px);
    gap: clamp(8px, 1.6vh, 18px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.community-node__logo {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(112px, min(12.5vw, 24vh), 178px);
    height: clamp(112px, min(12.5vw, 24vh), 178px);
}

.community-node__halo {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    transition: opacity 0.6s ease;
}

.community-node__halo::before,
.community-node__halo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

/* Yörüngede dönen ışık kaynağı — parlak nokta logonun çevresinde döner */
.community-node__halo::before {
    background:
        radial-gradient(circle at 30% 28%, var(--logo-color, #ffd166) 0%, transparent 50%),
        radial-gradient(circle at 72% 74%, var(--logo-color, #ffd166) 0%, transparent 46%);
    filter: blur(14px);
    opacity: 0.55;
    animation: communityHaloSpin 7s linear infinite;
}

/* Organik, şekil değiştiren yumuşak bloom (kusursuz daire değil) */
.community-node__halo::after {
    background: radial-gradient(circle at 50% 52%, var(--logo-color, #ffd166) 0%, transparent 60%);
    border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
    filter: blur(18px);
    animation: communityHaloMorph 9s ease-in-out infinite;
}

@keyframes communityHaloSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes communityHaloMorph {
    0%, 100% {
        border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
        transform: rotate(0deg) scale(0.96);
        opacity: 0.4;
    }
    50% {
        border-radius: 58% 42% 47% 53% / 44% 56% 44% 56%;
        transform: rotate(-180deg) scale(1.1);
        opacity: 0.66;
    }
}

/* ---- Partikül efekti (her düğüm kendi logo renginde) ---- */
.community-node__particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.community-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--ps, 4px);
    height: var(--ps, 4px);
    margin: calc(var(--ps, 4px) / -2) 0 0 calc(var(--ps, 4px) / -2);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, #fff 0%, var(--logo-color, #ffd166) 45%, transparent 100%);
    box-shadow: 0 0 12px var(--logo-color, #ffd166), 0 0 24px var(--logo-color, #ffd166);
    opacity: 0;
    transform: translate(0, 0) scale(0.2);
    will-change: transform, opacity;
    mix-blend-mode: screen;
}

.community-node:hover .community-particle,
.community-node:focus-visible .community-particle {
    animation: communityParticle var(--pdur, 2.6s) cubic-bezier(0.4, 0, 0.4, 1) var(--pd, 0s) infinite;
}

@keyframes communityParticle {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.2);
    }
    15% {
        opacity: 1;
        transform: translate(calc(var(--mx, 0px) * 0.4), calc(var(--my, 0px) * 0.4)) scale(1.25);
    }
    55% {
        opacity: 0.95;
        transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.5);
    }
}

.community-node__logo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.6));
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.4s ease;
}

.community-node:hover,
.community-node:focus-visible {
    transform: translateY(-10px);
    outline: none;
}

.community-node:hover .community-node__logo img,
.community-node:focus-visible .community-node__logo img {
    transform: scale(1.08);
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.65));
}

.community-node:hover .community-node__halo,
.community-node:focus-visible .community-node__halo {
    opacity: 0.9;
}

.community-node__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.community-node__name {
    font-family: "Cinzel", "Inter", serif;
    font-size: clamp(16px, 1.5vw, 20px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.community-node__tagline {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--logo-color, var(--community-accent));
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* Her etiket kendi logosunun rengiyle eşleşir (okunabilirlik için parlatılmış tonlar) */
.community-node[data-app="dominara"] { --logo-color: #ec5f5c; }
.community-node[data-app="shop"] { --logo-color: #e8c06a; }
.community-node[data-app="dmnknd"] { --logo-color: #eef2f8; }
.community-node[data-app="hq"] { --logo-color: #b18ad6; }
.community-node[data-app="lejyon"] { --logo-color: #5fa3e0; }

/* ---- Merkez (dmnknd) düğümü: en büyük ve en dikkat çekici ---- */
.community-node--center {
    order: 0;
    width: clamp(200px, 22vw, 320px);
    gap: clamp(10px, 1.8vh, 22px);
}

.community-node--center .community-node__logo {
    width: clamp(160px, min(21vw, 34vh), 300px);
    height: clamp(160px, min(21vw, 34vh), 300px);
}

.community-node--center .community-node__logo img {
    filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.65));
}

.community-node--center:hover .community-node__halo,
.community-node--center:focus-visible .community-node__halo {
    opacity: 1;
}

.community-node--center .community-node__name {
    font-size: clamp(20px, 2vw, 26px);
}

@media (prefers-reduced-motion: reduce) {
    .community-node__halo::before,
    .community-node__halo::after {
        animation: none;
    }

    .community-node:hover .community-particle,
    .community-node:focus-visible .community-particle {
        animation: none;
    }
}

/* ===================== RESPONSIVE =====================
 * Yaklaşım:
 *  - Geniş ekran (16:9 vb.): yatay "takımyıldız" — tek sırada 5 logo, DMNKND
 *    ortada ve daha büyük. (Yukarıdaki temel stiller.)
 *  - Dar / portre ekran: TAMAMEN farklı bir düzen — dikey kart listesi.
 *    Her platform bir satır kart olur (logo solda, isim + açıklama sağda),
 *    DMNKND en üstte öne çıkan kart. Böylece sıkışık minik logolar yerine
 *    okunaklı, şık ve dokunması kolay bir menü elde edilir.
 */

/* Kısa ama geniş ekranlar (ör. dizüstü 16:9 az yükseklik): takımyıldız korunur,
   yalnızca ölçek küçülür ki dikeyde taşmasın. */
@media (min-width: 861px) and (max-height: 620px) {
    .community-main {
        gap: clamp(12px, 2.5vh, 28px);
    }

    .community-node__logo {
        width: min(20vh, 12.5vw);
        height: min(20vh, 12.5vw);
    }

    .community-node--center .community-node__logo {
        width: min(34vh, 21vw);
        height: min(34vh, 21vw);
    }

    .community-hero h1 {
        font-size: clamp(20px, 5vh, 34px);
    }
}

/* -------- Dar / portre: dikey kart listesi -------- */
@media (max-width: 860px) {
    .community-main {
        justify-content: safe center;
        padding: clamp(20px, 4vh, 40px) 18px;
        gap: clamp(16px, 3vh, 30px);
    }

    .community-constellation {
        display: flex;
        justify-content: center;
    }

    .community-orbit {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: clamp(9px, 1.5vh, 14px);
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
    }

    /* Her düğüm → yatay kart */
    .community-node,
    .community-node--center {
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 16px;
        padding: clamp(9px, 1.5vh, 14px) 16px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.035);
        border: 1px solid rgba(255, 255, 255, 0.08);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    }

    /* DMNKND en üstte, öne çıkan kart */
    .community-node--center {
        order: -1;
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.16);
    }

    /* Kartlarda dikey zıplama yerine hafif yatay kayma + zemin vurgusu */
    .community-node:hover,
    .community-node:focus-visible,
    .community-node--center:hover,
    .community-node--center:focus-visible {
        transform: translateX(4px);
        background: rgba(255, 255, 255, 0.09);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .community-node__logo {
        flex: 0 0 auto;
        width: clamp(52px, 11vh, 72px);
        height: clamp(52px, 11vh, 72px);
    }

    .community-node--center .community-node__logo {
        width: clamp(62px, 13vh, 86px);
        height: clamp(62px, 13vh, 86px);
    }

    .community-node__body {
        align-items: flex-start;
        text-align: left;
        width: auto;
        gap: 3px;
    }

    .community-node__name {
        font-size: clamp(15px, 2.1vh, 19px);
    }

    .community-node--center .community-node__name {
        font-size: clamp(17px, 2.5vh, 22px);
    }

    .community-node__tagline {
        font-size: clamp(10px, 1.5vh, 12px);
        letter-spacing: 0.12em;
        line-height: 1.35;
    }

    /* Partiküller kartın dışına taşmasın; kartlarda daha sade dursun */
    .community-node__particles {
        display: none;
    }
}
