/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #0d1530;
    background-image: url('pics/background.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow-x: hidden;
    padding: 0;
}

/* ===== Page Wrapper ===== */
.page-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* ===== Decorative Stars ===== */
/* All stars are fixed relative to the viewport on mobile for accurate placement */
.star {
    position: fixed;
    z-index: 10;
    pointer-events: none;
    animation: float-and-rotate 5s ease-in-out infinite;
}

/* ===== Animations ===== */
@keyframes float-and-rotate {
    0% {
        transform: translateY(0px) rotate(calc(var(--base-rotation, 0deg) - 15deg));
    }

    50% {
        transform: translateY(-8px) rotate(calc(var(--base-rotation, 0deg) + 15deg));
    }

    100% {
        transform: translateY(0px) rotate(calc(var(--base-rotation, 0deg) - 15deg));
    }
}

/* ── MOBILE star positions (from Figma node 18-2) ── */

/* star-1: Top-left of pfp (glowing gold star) */
.profile-section .star-1 {
    position: absolute;
    width: 60px;
    height: 58px;
    top: 15px;
    left: -20px;
    --base-rotation: -20deg;
    animation-delay: 0s;
}

/* star-2: Bottom-right of pfp (glowing gold star) */
.profile-section .star-2 {
    position: absolute;
    width: 60px;
    height: 58px;
    bottom: 10px;
    right: -20px;
    --base-rotation: 20deg;
    animation-delay: -1.8s;
}

/* ===== Discord Stars ===== */
.discord-card .star {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.discord-star-bl-big {
    width: 55px;
    height: 55px;
    left: -24px;
    bottom: -18px;
    --base-rotation: -15deg;
    animation-delay: -0.8s;
}

.discord-star-bl-small {
    width: 23px;
    height: 23px;
    left: 28px;
    bottom: -12px;
    --base-rotation: 10deg;
    animation-delay: -2.5s;
}

.discord-star-tr-big {
    width: 55px;
    height: 55px;
    right: -24px;
    top: -18px;
    --base-rotation: 20deg;
    animation-delay: -1.2s;
}

.discord-star-tr-small {
    width: 23px;
    height: 23px;
    right: 32px;
    top: -10px;
    --base-rotation: -15deg;
    animation-delay: -3.3s;
}

/* ===== Main Container ===== */
.container {
    position: relative;
    z-index: 2;
    width: calc(100% - 32px);
    max-width: 402px;
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(13, 21, 48, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(120, 162, 255, 0.2);
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    margin: 40px auto;
}

/* ===== Profile Picture ===== */
.profile-section {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 5;
    margin-bottom: 43px;
    /* gap from pfp bottom to top of social icons row */
}

/* Figma pfp wrapper: size-[256.803px], circular mask ~174px */
.pfp-wrapper {
    width: 257px;
    height: 257px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 1px solid #7EBAD4;
}

.pfp {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ===== Social Icons Row ===== */
/* Figma: 4 icons (YouTube, TikTok, Instagram, Twitch), horizontally centered */
.social-icons {
    display: flex;
    gap: 34px;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 5;
    margin-bottom: 24px;
    /* gap from icons to discord card */
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.social-icon svg {
    width: 30px;
    height: 30px;
}

.social-icon:hover {
    transform: scale(1.18);
    filter: drop-shadow(0 0 8px rgba(180, 200, 255, 0.65));
}

/* ===== Discord Card ===== */
/* Figma: w-[352.867px] h-[77.05px], rounded-[21px], bg rgba(39,70,138,0.2), border #78a2ff */
.discord-card {
    position: relative;
    width: 100%;
    max-width: 353px;
    height: 77px;
    border-radius: 21px;
    background: rgba(39, 70, 138, 0.2);
    border: 1px solid #78a2ff;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 5;
    margin-bottom: 14px;
    /* gap from discord card to first link button */
}

.discord-card:hover {
    background: rgba(39, 70, 138, 0.32);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(114, 141, 198, 0.5);
}

/* Figma: font Inter, 16px, white — "Join⋆.˚ ☾⭒.˚ Moonlight ⋆.˚ ☾⭒.˚" */
.discord-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
}

/* Figma: IBM Plex Mono italic 16px — "Discord Server" */
.discord-subtext {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    font-weight: 300;
    font-style: italic;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
}

/* ===== Link Buttons ===== */
/* Figma: w-[352.867px] h-[77.05px], gap between each = ~107-108px (top to top), so gap ~30px */
.links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 353px;
    z-index: 5;
}

/* Figma: rounded-[21px], border #78a2ff, bg rgba(39,70,138,0.5) */
.link-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 77px;
    border-radius: 21px;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid #78a2ff;
    background: rgba(39, 70, 138, 0.5);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.link-btn:hover {
    transform: translateY(-2px);
    border-color: #aaccff;
    box-shadow: 0 0 15px rgba(114, 141, 198, 0.5);
}

/* Banner image background — fills the button behind tint */
.link-btn-bg {
    position: absolute;
    inset: 0;
    background-image: url('pics/Banner.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* Blue tint + blur overlay — Figma: rgba(39,70,138,0.5) + blur(1.5px) */
.link-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(39, 70, 138, 0.5);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    z-index: 1;
}

/* Figma: Lexend Zetta Regular 16px, white */
.link-btn-text {
    position: relative;
    z-index: 2;
    font-family: 'Lexend Zetta', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0;
}


/* ===========================
   DESKTOP (min-width: 769px)
   Based on Figma node 8-5
   =========================== */
@media (min-width: 769px) {

    body {
        align-items: flex-start;
    }

    /* Stars switch to absolute (inside page-wrapper) on desktop */
    .star {
        position: absolute;
    }

    .container {
        max-width: 650px;
        padding: 48px 40px;
        gap: 0;
        background: rgba(13, 21, 48, 0.425);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        border: 1px solid rgba(120, 162, 255, 0.2);
        border-radius: 28px;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
        margin: 60px auto;
    }

    /* Pfp: Figma 8-5 shows 288px container, mask ~195px visible */
    .profile-section {
        margin-bottom: 23px;
    }

    .pfp-wrapper {
        width: 146px;
        height: 146px;
        box-shadow: none;
    }

    /* Social icons: larger gap between icons */
    .social-icons {
        gap: 30px;
        margin-bottom: 15px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }

    .social-icon svg {
        width: 24px;
        height: 24px;
    }

    /* Discord card: Figma 8-5 — w-[503px] h-[101px] */
    .discord-card {
        max-width: 377px;
        height: 76px;
        gap: 3px;
        padding: 0 18px;
        margin-bottom: 49px;
    }

    /* Discord text: Figma 8-5 — 24px Inter */
    .discord-text {
        font-size: 18px;
    }

    /* Discord subtext: Figma 8-5 — 24px IBM Plex Mono italic */
    .discord-subtext {
        font-size: 18px;
    }

    /* Links: Figma 8-5 — w-[503px] h-[106px], large gaps */
    .links {
        max-width: 377px;
        gap: 35px;
    }

    .link-btn {
        height: 80px;
    }

    /* Link text: Figma 8-5 — Lexend Tera Light 36px */
    .link-btn-text {
        font-family: 'Lexend Tera', sans-serif;
        font-size: 27px;
        font-weight: 300;
    }

    .profile-section .star-1 {
        width: 36px;
        height: 36px;
        top: 7px;
        left: -8px;
        position: absolute;
    }

    .profile-section .star-2 {
        width: 36px;
        height: 36px;
        bottom: 6px;
        right: -8px;
        position: absolute;
    }
}