@font-face {
    font-family: 'LocalVazir';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #05070d;
    --panel: rgba(10, 16, 30, 0.34);
    --panel-strong: rgba(13, 22, 38, 0.56);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: rgba(226, 232, 240, 0.72);
    --cyan: #22d3ee;
    --green: #34d399;
    --pink: #fb7185;
    --amber: #fbbf24;

    --orbit-radius: 38vmin;
    --node-width: 280px;
    --node-height: 104px;
    --orbit-speed: 30s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'LocalVazir', Tahoma, sans-serif;
    user-select: none;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 78% 18%, rgba(34, 211, 238, 0.12), transparent 34%),
        radial-gradient(circle at 16% 82%, rgba(251, 113, 133, 0.08), transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.04), transparent 38%),
        linear-gradient(135deg, #04050a 0%, #07111e 46%, #05070d 100%);
}

#galaxy-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scene-light {
    position: fixed;
    z-index: 1;
    border-radius: 999px;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.6;
    mix-blend-mode: screen;
}

.scene-light-a {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.15), transparent 70%);
}

.scene-light-b {
    left: -10%;
    bottom: -5%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(251, 113, 133, 0.08), transparent 70%);
}

.grid-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 76%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 76%);
}

.shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.orbit-stage {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 760px;
    overflow: visible;
    display: grid;
    place-items: center;
    isolation: isolate;
    border-radius: 40px;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: blur(14px);
    box-shadow: none;
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.orbit-ring-outer {
    width: calc(var(--orbit-radius) * 2);
    border: 1px solid rgba(34, 211, 238, 0.08);
    box-shadow:
        0 0 50px rgba(34, 211, 238, 0.05),
        inset 0 0 50px rgba(34, 211, 238, 0.05);
}

.orbit-ring-inner {
    width: calc(var(--orbit-radius) * 1.32);
    border: 1px dotted rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.02);
}

.center-hub {
    position: relative;
    z-index: 10;
    width: 220px;
    height: 220px;
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 36px;
    background:
        radial-gradient(circle at 30% 25%, rgba(34, 211, 238, 0.18), transparent 38%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(10, 16, 28, 0.56));
    box-shadow:
        0 0 48px rgba(34, 211, 238, 0.12),
        inset 0 0 38px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.center-hub::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%);
    pointer-events: none;
}

.center-hub:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow:
        0 0 68px rgba(34, 211, 238, 0.2),
        inset 0 0 44px rgba(255, 255, 255, 0.06);
}

.hub-status {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green);
    box-shadow:
        0 0 18px rgba(52, 211, 153, 0.95),
        0 0 34px rgba(52, 211, 153, 0.35);
}

.hub-logo {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 30px rgba(34, 211, 238, 0.06);
}

.hub-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.center-hub strong {
    font-size: 1.5rem;
}

.center-hub small {
    color: var(--muted);
    font-size: 0.82rem;
}

.orbit-track {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    animation: orbit-spin var(--orbit-speed) linear infinite;
    transform-origin: center;
}

.orbit-track:has(.orbit-card:hover) {
    animation-play-state: paused;
}

.orbit-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--node-width);
    height: var(--node-height);
    margin-top: calc(var(--node-height) / -2);
    margin-left: calc(var(--node-width) / -2);
    z-index: 5;
    pointer-events: auto;
}

.node-1 {
    transform: translateY(calc(var(--orbit-radius) * -1));
}

.node-2 {
    transform: rotate(120deg) translateY(calc(var(--orbit-radius) * -1)) rotate(-120deg);
}

.node-3 {
    transform: rotate(240deg) translateY(calc(var(--orbit-radius) * -1)) rotate(-240deg);
}

.orbit-card {
    position: relative;
    width: 100%;
    height: var(--node-height);
    min-height: var(--node-height);
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    direction: rtl;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 38%),
        var(--panel);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: counter-orbit var(--orbit-speed) linear infinite;
    transform-origin: center;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}

.orbit-track:has(.orbit-card:hover) .orbit-card {
    animation-play-state: paused;
}

.orbit-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: radial-gradient(
        circle at 15% 20%,
        color-mix(in srgb, var(--accent) 24%, transparent),
        transparent 42%
    );
    opacity: 0.9;
    pointer-events: none;
}

.orbit-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.orbit-card:hover {
    transform: scale(1.02);
    border-color: color-mix(in srgb, var(--accent) 68%, white 10%);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent 38%),
        var(--panel-strong);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.3),
        0 0 32px color-mix(in srgb, var(--accent) 20%, transparent),
        inset 0 0 15px color-mix(in srgb, var(--accent) 10%, transparent);
}

.orbit-card-icon {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 14px 30px color-mix(in srgb, var(--accent) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.orbit-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.orbit-card-content {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
}

.orbit-card-content strong {
    overflow: hidden;
    color: var(--text);
    font-size: 1.15rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.orbit-card-content small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.8rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.orbit-card-arrow {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.74);
    direction: ltr;
    font-size: 1rem;
}

.frost {
    --accent: #aa00ff; /* بنفش */
}

.sefrts {
    --accent: #ef0004; /* قرمز */
}

.list {
    --accent: #ff6b00; /* نارنجی */
}

@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes counter-orbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@media (max-width: 920px) {
    :root {
        --orbit-radius: 30vmin;
        --node-width: 250px;
        --node-height: 100px;
    }

    body {
        overflow-y: auto;
    }

    .shell {
        height: auto;
        min-height: 100vh;
        padding: 30px 0;
    }

    .orbit-stage {
        height: 80vh;
        min-height: 600px;
        border-radius: 30px;
    }

    .center-hub {
        width: 180px;
        height: 180px;
        flex-basis: 180px;
        border-radius: 30px;
    }

    .hub-logo {
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 640px) {
    :root {
        --orbit-radius: 32vmin;
        --node-width: 200px;
        --node-height: 88px;
        --orbit-speed: 36s;
    }

    .orbit-stage {
        height: 75vh;
        min-height: 500px;
        border-radius: 20px;
    }

    .center-hub {
        width: 140px;
        height: 140px;
        flex-basis: 140px;
        gap: 6px;
        border-radius: 22px;
    }

    .hub-status {
        top: 14px;
        right: 14px;
        width: 8px;
        height: 8px;
    }

    .hub-logo {
        width: 50px;
        height: 50px;
        border-radius: 14px;
    }

    .center-hub strong {
        font-size: 1.1rem;
    }

    .center-hub small {
        font-size: 0.7rem;
    }

    .orbit-card {
        height: var(--node-height);
        min-height: var(--node-height);
        padding: 10px 12px;
        grid-template-columns: 40px minmax(0, 1fr) 14px;
        gap: 8px;
        border-radius: 16px;
    }

    .orbit-card-icon {
        width: 40px;
        height: 40px;
        padding: 6px;
        border-radius: 10px;
    }

    .orbit-card-content {
        gap: 2px;
    }

    .orbit-card-content strong {
        font-size: 0.95rem;
    }

    .orbit-card-content small {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .orbit-track,
    .orbit-card {
        animation-duration: 0.001ms;
        animation-iteration-count: 1;
    }

    .center-hub,
    .orbit-card {
        transition: none;
    }
}
