:root {
    --bg: #06080d;
    --bg-soft: #0b0e16;

    --card: rgba(255,255,255,.045);
    --card-hover: rgba(255,255,255,.075);

    --border: rgba(255,255,255,.09);
    --border-hover: rgba(126,92,255,.55);

    --text: #f7f8ff;
    --muted: #8d94a8;

    --purple: #805cff;
    --blue: #31a8ff;
    --cyan: #1de1cf;

    --radius: 22px;

    --transition:
        .25s cubic-bezier(.2,.8,.2,1);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(128,92,255,.18),
            transparent 42%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Cairo,
        system-ui,
        sans-serif;

    overflow-x: hidden;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


/* =========================
   BACKGROUND
========================= */

.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}


.grid {
    position: absolute;
    inset: 0;

    opacity: .10;

    background-image:
        linear-gradient(
            rgba(255,255,255,.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.045) 1px,
            transparent 1px
        );

    background-size: 70px 70px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 75%
        );
}


.glow {
    position: absolute;

    width: 450px;
    height: 450px;

    border-radius: 50%;

    filter: blur(110px);

    opacity: .14;
}


.glow-one {
    top: -220px;
    right: 15%;
    background: var(--purple);
}


.glow-two {
    bottom: 0;
    left: -220px;
    background: var(--blue);
}


/* =========================
   HEADER
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 50;

    height: 78px;

    padding:
        0 clamp(18px, 5vw, 80px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid var(--border);

    background:
        rgba(6,8,13,.78);

    backdrop-filter: blur(24px);
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}


.brand-logo {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            var(--purple),
            var(--blue)
        );

    color: white;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-weight: 700;

    box-shadow:
        0 0 35px rgba(128,92,255,.35);
}


.brand-text strong {
    display: block;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 15px;

    letter-spacing: 1px;
}


.brand-text span {
    display: block;

    color: var(--muted);

    font-size: 9px;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}


.live-status {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 7px 11px;

    border:
        1px solid rgba(29,225,207,.15);

    border-radius: 100px;

    background:
        rgba(29,225,207,.045);

    color: var(--cyan);

    font-size: 10px;
}


.live-status span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--cyan);

    box-shadow:
        0 0 12px var(--cyan);

    animation: pulse 2s infinite;
}


.header-button {
    width: 40px;
    height: 40px;

    border:
        1px solid var(--border);

    border-radius: 11px;

    background: var(--card);

    color: white;

    font-size: 20px;

    transition: var(--transition);
}


.header-button:hover {
    border-color: var(--border-hover);

    background:
        rgba(128,92,255,.12);

    transform: rotate(25deg);
}


/* =========================
   HERO
========================= */

.hero {
    max-width: 1380px;

    margin: auto;

    padding:
        90px clamp(20px, 6vw, 90px)
        75px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 60px;
}


.hero-content {
    max-width: 720px;
}


.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--cyan);

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 9px;

    letter-spacing: 3px;

    margin-bottom: 20px;
}


.eyebrow span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--cyan);

    box-shadow:
        0 0 14px var(--cyan);
}


.hero h1 {
    font-family:
        "Space Grotesk",
        Cairo,
        sans-serif;

    font-size:
        clamp(45px, 7vw, 86px);

    line-height: .98;

    letter-spacing: -4px;

    font-weight: 700;
}


.hero h1 strong {
    display: block;

    background:
        linear-gradient(
            100deg,
            #ffffff,
            #a48dff,
            #48baff
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;

    background-size: 200%;

    animation:
        gradient 6s ease infinite;
}


.hero p {
    max-width: 610px;

    margin-top: 25px;

    color: var(--muted);

    line-height: 2;

    font-size: 14px;
}


.hero-stats {
    display: flex;
    align-items: center;

    gap: 22px;

    margin-top: 32px;
}


.stat strong {
    display: block;

    color: white;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 25px;
}


.stat span {
    color: var(--muted);

    font-size: 9px;
}


.stat-line {
    width: 1px;
    height: 30px;

    background: var(--border);
}


/* =========================
   HERO SYMBOL
========================= */

.hero-symbol {
    width: 280px;
    height: 280px;

    position: relative;

    display: grid;
    place-items: center;
}


.hero-core {
    width: 145px;
    height: 145px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #9e87ff,
            #5638d0 55%,
            #18122f
        );

    border:
        1px solid rgba(255,255,255,.25);

    box-shadow:
        0 0 80px rgba(128,92,255,.35),
        inset 0 0 30px rgba(255,255,255,.15);

    animation:
        floating 5s ease-in-out infinite;

    position: relative;

    z-index: 2;
}


.hero-core::after {
    content: "";

    position: absolute;

    inset: 17px;

    border-radius: 50%;

    border:
        1px solid rgba(255,255,255,.22);
}


.hero-core span {
    position: relative;
    z-index: 3;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 35px;

    font-weight: 700;
}


.orbit {
    position: absolute;

    border:
        1px dashed
        rgba(128,92,255,.28);

    border-radius: 50%;
}


.orbit-one {
    width: 230px;
    height: 230px;

    animation:
        rotate 16s linear infinite;
}


.orbit-two {
    width: 280px;
    height: 280px;

    border-color:
        rgba(49,168,255,.16);

    animation:
        rotateReverse 22s linear infinite;
}


/* =========================
   TOOLBAR
========================= */

.toolbar {
    max-width: 1380px;

    margin: auto;

    padding:
        0 clamp(20px, 6vw, 90px);

    display: flex;

    gap: 10px;
}


.search {
    flex: 1;

    height: 58px;

    display: flex;
    align-items: center;

    padding: 0 17px;

    border:
        1px solid var(--border);

    border-radius: 17px;

    background:
        rgba(255,255,255,.035);

    backdrop-filter: blur(18px);

    transition: var(--transition);
}


.search:focus-within {
    border-color:
        rgba(128,92,255,.6);

    box-shadow:
        0 0 0 4px
        rgba(128,92,255,.07);
}


.search-icon {
    color: var(--muted);

    font-size: 24px;

    margin-left: 10px;
}


.search input {
    flex: 1;

    height: 100%;

    border: 0;
    outline: 0;

    background: transparent;

    color: white;

    font-size: 13px;
}


.search input::placeholder {
    color: #5f6679;
}


kbd {
    color: #666d80;

    border:
        1px solid var(--border);

    border-radius: 6px;

    padding: 4px 7px;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 8px;
}


.reload-button {
    height: 58px;

    padding: 0 18px;

    border:
        1px solid var(--border);

    border-radius: 17px;

    background: var(--card);

    color: #dce0ee;

    white-space: nowrap;

    font-size: 11px;

    transition: var(--transition);
}


.reload-button:hover {
    border-color:
        rgba(128,92,255,.4);

    background:
        rgba(128,92,255,.1);
}


.reload-button span {
    margin-left: 6px;

    font-size: 16px;
}


/* =========================
   DIRECTORY
========================= */

.directory {
    max-width: 1380px;

    margin: auto;

    padding:
        70px clamp(20px, 6vw, 90px)
        100px;
}


.section-heading {
    display: flex;

    align-items: end;
    justify-content: space-between;

    margin-bottom: 25px;
}


.section-heading > div:first-child > span {
    color: var(--purple);

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 8px;

    letter-spacing: 4px;
}


.section-heading h2 {
    margin-top: 4px;

    font-size: 27px;
}


.result-text {
    color: var(--muted);

    font-size: 10px;
}


/* =========================
   GRID
========================= */

.links-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(245px, 1fr)
        );

    gap: 14px;
}


/* =========================
   LINK CARD
========================= */

.link-card {
    position: relative;

    min-width: 0;

    overflow: hidden;

    padding: 18px;

    border:
        1px solid var(--border);

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.018)
        );

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

    animation:
        cardIn .45s both;
}


.link-card::before {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    top: -55px;
    left: -55px;

    background: var(--purple);

    filter: blur(65px);

    opacity: .08;
}


.link-card:hover {
    transform: translateY(-5px);

    border-color:
        var(--border-hover);

    box-shadow:
        0 25px 65px rgba(0,0,0,.35);
}


.card-top {
    display: flex;

    align-items: center;

    gap: 13px;
}


.site-icon {
    width: 55px;
    height: 55px;

    flex: 0 0 55px;

    display: grid;
    place-items: center;

    overflow: hidden;

    border:
        1px solid rgba(255,255,255,.1);

    border-radius: 16px;

    background:
        rgba(255,255,255,.055);
}


.site-icon img {
    width: 31px;
    height: 31px;

    object-fit: contain;

    display: block;
}


.site-icon-fallback {
    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 18px;

    font-weight: 700;

    color: #a996ff;
}


.site-info {
    min-width: 0;
}


.site-arabic {
    font-size: 15px;

    font-weight: 700;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.site-english {
    direction: ltr;
    text-align: right;

    color: #8d94a8;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 10px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.site-domain {
    direction: ltr;
    text-align: right;

    margin-top: 12px;

    color: #626a7d;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 9px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.card-bottom {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: 16px;

    padding-top: 13px;

    border-top:
        1px solid rgba(255,255,255,.06);
}


.clicks {
    color: #777f94;

    font-size: 9px;
}


.clicks strong {
    color: #b5bbca;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 10px;
}


.open-button {
    min-width: 82px;
    height: 34px;

    padding: 0 12px;

    border: 0;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            rgba(128,92,255,.72),
            rgba(49,168,255,.58)
        );

    color: white;

    font-size: 10px;

    transition: var(--transition);
}


.open-button:hover {
    filter: brightness(1.12);

    transform: translateY(-1px);
}


/* =========================
   MESSAGES
========================= */

.hidden {
    display: none !important;
}


.loading {
    min-height: 280px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 14px;

    color: var(--muted);

    font-size: 12px;
}


.spinner {
    width: 38px;
    height: 38px;

    border:
        2px solid rgba(255,255,255,.08);

    border-top-color:
        var(--purple);

    border-radius: 50%;

    animation:
        rotate .8s linear infinite;
}


.message {
    min-height: 280px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    gap: 8px;

    color: var(--muted);
}


.message-icon {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin-bottom: 5px;

    border:
        1px solid var(--border);

    border-radius: 18px;

    background: var(--card);

    color: var(--purple);

    font-size: 25px;
}


.message h3 {
    color: white;

    font-size: 18px;
}


.message p {
    font-size: 11px;
}


.message code {
    direction: ltr;

    color: #a995ff;

    font-family:
        "Space Grotesk",
        monospace;
}


.message button {
    margin-top: 12px;

    padding: 9px 16px;

    border: 0;

    border-radius: 9px;

    background: var(--purple);

    color: white;

    font-size: 11px;
}


.error .message-icon {
    color: #ff6c83;
}


/* =========================
   FOOTER
========================= */

.footer {
    min-height: 90px;

    padding:
        22px clamp(20px, 6vw, 90px);

    border-top:
        1px solid var(--border);

    display: flex;

    align-items: center;
    justify-content: space-between;

    background:
        rgba(0,0,0,.2);

    color: var(--muted);
}


.footer strong {
    display: block;

    color: white;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 11px;

    letter-spacing: 1px;
}


.footer span {
    font-size: 9px;
}


/* =========================
   TOAST
========================= */

.toast {
    position: fixed;

    left: 50%;
    bottom: 25px;

    z-index: 100;

    transform:
        translate(-50%, 100px);

    padding: 11px 17px;

    border:
        1px solid var(--border);

    border-radius: 11px;

    background:
        rgba(15,17,26,.92);

    backdrop-filter: blur(15px);

    color: white;

    font-size: 10px;

    transition:
        transform .3s ease;
}


.toast.show {
    transform:
        translate(-50%, 0);
}


/* =========================
   ANIMATIONS
========================= */

@keyframes pulse {
    0%,100% {
        opacity: .4;
        transform: scale(.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}


@keyframes gradient {
    0% {
        background-position: 0%;
    }

    50% {
        background-position: 100%;
    }

    100% {
        background-position: 0%;
    }
}


@keyframes floating {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}


@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}


@keyframes rotateReverse {
    to {
        transform: rotate(-360deg);
    }
}


@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 800px) {

    .hero {
        padding-top: 65px;
        padding-bottom: 55px;
    }

    .hero-symbol {
        display: none;
    }

    .hero h1 {
        letter-spacing: -3px;
    }

    .links-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(190px, 1fr)
            );
    }

}


@media (max-width: 600px) {

    .header {
        height: 70px;
    }

    .brand-text span {
        display: none;
    }

    .live-status {
        display: none;
    }

    .hero {
        padding-top: 55px;
    }

    .hero h1 {
        font-size: 43px;
    }

    .hero p {
        font-size: 12px;
    }

    .toolbar {
        flex-direction: column;
    }

    .reload-button {
        width: 100%;
    }

    .search kbd {
        display: none;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .links-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));

        gap: 9px;
    }

    .link-card {
        padding: 13px;
        border-radius: 17px;
    }

    .site-icon {
        width: 45px;
        height: 45px;

        flex-basis: 45px;

        border-radius: 13px;
    }

    .site-icon img {
        width: 26px;
        height: 26px;
    }

    .site-arabic {
        font-size: 12px;
    }

    .site-english {
        font-size: 8px;
    }

    .site-domain {
        font-size: 8px;
    }

    .open-button {
        min-width: 65px;
        height: 31px;
        padding: 0 7px;
        font-size: 9px;
    }

    .clicks {
        font-size: 8px;
    }

    .footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

}


@media (max-width: 380px) {

    .links-grid {
        grid-template-columns: 1fr;
    }

}
