@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Science+Gothic:wght@100..900&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

@property --size1-w { syntax: '<percentage>'; initial-value: 100%; inherits: false; }
@property --size1-h { syntax: '<percentage>'; initial-value: 50%; inherits: false; }

@property --size2-w { syntax: '<percentage>'; initial-value: 140%; inherits: false; }
@property --size2-h { syntax: '<percentage>'; initial-value: 100%; inherits: false; }

@property --size3-w { syntax: '<percentage>'; initial-value: 80%; inherits: false; }
@property --size3-h { syntax: '<percentage>'; initial-value: 80%; inherits: false; }

@property --position1-1 {
    syntax: '<percentage>';
    initial-value: 130%;
    inherits: false;
}
@property --position1-2 {
    syntax: '<percentage>';
    initial-value: 80%;
    inherits: false;
}

@property --position2-1 {
    syntax: '<percentage>';
    initial-value: 100%;
    inherits: false;
}

@property --position2-2 {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}

@property --position3-1 {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}

@property --position3-2 {
    syntax: '<percentage>';
    initial-value: 100%;
    inherits: false;
}

@property --color1 {
    syntax: '<color>';
    initial-value: rgba(15, 185, 185, 0.5);
    inherits: false;
}

@property --color2 {
    syntax: '<color>';
    initial-value: rgba(23, 26, 214, 0.582);
    inherits: false;
}

@property --color3 {
    syntax: '<color>';
    initial-value: rgba(15, 89, 185, 0.5);
    inherits: false;
}

:root {
    --bg: #212121;
    --bg-lighter: #2f2f2f;
    --bg-blue-tint: #131418;
    --font-color: #e4e3e3;
    --primary-button: #5865F2;
    --secondary-button: #E0E3FF;
}

body {
    font-family: "Inter", sans-serif;
    color: var(--font-color);
    margin: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
	background-color: var(--bg-blue-tint);
}

main {
    height: 100%;
    background-color: var(--bg-blue-tint);
    padding: 1rem 2rem 0rem;
}

.header {
    width: 100%;
	flex-shrink: 0;
	padding: 0 3rem 0 1.5rem;
    display: inline-flex;
    align-items: center;
    height: 5rem;
	position: sticky;
	top: 0;
	z-index: 2;
    justify-content: space-between;
    background-color: var(--bg);
}

.logo-container {
    height: 40px;
    width: 40px;
    margin: 0 1rem;
}

.logo-container > img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
}

.profile-container {
    display: flex;
    align-items: center;
}

.user {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    padding: .25rem .7rem;
    background-color: var(--bg-lighter);
    font-size: clamp(.75rem, 2vw, 1rem);
    gap: .5rem;
    margin: 0 .5rem;
}

.user > img {
    border-radius: 50dvh;
    width: 32px;
}

a {
    font-size: clamp(.75rem, 2vw, 1rem);
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: .25rem .25rem;
    padding: .55rem .5rem;
    text-decoration: none;
    color: var(--font-color);
    border-radius: .75rem;
    corner-shape: superellipse(1.1);
    transition: all .3s ease;
}

.login > img {
    height: 1rem;
}

.logout {
    background-color: var(--secondary-button);
    color: #2f2f2f;
    margin-right: .25rem;
}

.invite {
    align-self: center;
    justify-self: start;
}

a > span.material-symbols-rounded {
    font-size: 1.4rem;
    font-weight: 300;
}

a.invite-bot {
    width: max-content;
    height: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem !important;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 1);
    transition: all .3s ease;
}

.servers, .login, .invite-bot {
    gap: .5rem;
    background-color: var(--primary-button);
    font-weight: 500;
    margin: 0;
}

.login {
    margin: 0 .75rem;
}

.welcome {
    position: relative;
    height: max-content;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    background:
        radial-gradient(var(--size1-w) var(--size1-h) at var(--position1-1) var(--position1-2), var(--color1) 20%, transparent 95%), 
        radial-gradient(var(--size2-w) var(--size2-h) at var(--position2-1) var(--position2-2), var(--color2) 20%, transparent 80%), 
        radial-gradient(var(--size3-w) var(--size3-h) at var(--position3-1) var(--position3-2), var(--color3) 20%, transparent 80%),
        #000000;
    transition: padding .5s ease;
	background-repeat: no-repeat;
	background-size: contain;
	background-position: center;
    padding: 0 0 20rem;
    corner-shape: superellipse(1.1);
    animation: 
        flickerColors 8s cubic-bezier(0.5, 1, 0.89, 1) infinite,
        morphSizes 25s ease infinite;
}

.welcome-heading {
	margin: clamp(2rem, 10vw, 8rem) clamp(3rem, 10vw, 5rem) 0;
    transition: margin .3s ease;
	position: relative;
	z-index: 1;
}

.welcome::after {
    content: '';
    position: absolute;
    inset: 0;
    
    background-image: url("../imgs/bingo-card-3d.png");
    background-repeat: no-repeat;
    
    /* FIX 1: Use a percentage for horizontal position to keep it fluid, 
       or use left with clamp for more precise control */
    background-position: right 10% center; 
    
    /* FIX 2: Limit the size so it doesn't overwhelm the text on mobile */
    background-size: clamp(200px, 40vw, 600px);
    
    z-index: 0;
    pointer-events: none; /* Allows users to still click buttons/text "under" the image */
    opacity: 0.8; /* Optional: helps text legibility */
}

.welcome-heading > h1 {
    font-family: "Science Gothic";
    font-size: clamp(3.5rem, 5vw, 5rem);
    margin: 0 0;
}

.welcome-heading > p {
	backdrop-filter: blur(5px);
	border-radius: 1rem;
	corner-shape: superellipse(1.1);
	padding: .5rem;
	border: 1px solid #323232;
    width: 100%;
    max-width: 30rem;
    font-size: clamp(1rem, 2vw + 0.5rem, 1.5rem);
}

.WIP {
    position: relative;
    height: 40dvh;
}

.WIP > span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(2) rotate(-30deg);
}

.learn-more {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    font-size: clamp(.95rem, 2vw, 1.2rem);
    bottom: 0;
    margin: 0 0 clamp(1rem, 2vw, 2rem);
    left: 50%;
    transform: translate(-50%);
	z-index: 1;
}

/* .bingo-card {
	position: absolute;
	top: 0;
	right: 0;
	margin: 0 10rem 0 0;
	width: 50rem;
	height: 50rem;
}
still not needed
.bingo-card img {
	width: 100%;
	height: 100%;
} */

@media (hover: hover) {
    a:hover {
        box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, .2);
        filter: brightness(.9);
    }
}

@media screen and (max-width: 420px) {
    .logo-container {
        margin: .25rem;
    }

    .welcome {
        padding: 0 0 5rem;
    }
}

@media screen and (max-width: 520px) {
    .welcome {
        height: max-content;
        padding: 0 0 5rem;
    }
}

@media screen and (min-width: 2050px) {
    .welcome-heading {
        margin: clamp(2rem, 10vw, 8rem) 50rem 0;
    }
}

@keyframes flickerColors {
    0%, 100% {
        --color1: rgba(15, 185, 185, 0.5);
        --color2: rgba(23, 26, 214, 0.582);
        --color3: rgba(15, 89, 185, 0.5);
    }
    50% {
        --color1: rgba(12, 209, 209, 0.8);
        --color2: rgba(34, 37, 240, 0.8);
        --color3: rgba(23, 109, 221, 0.61);
    }
}

@keyframes morphSizes {
    0%, 100% {
        --size1-w: 100%; --size1-h: 50%;
        --size2-w: 140%; --size2-h: 100%;
        --size3-w: 80%;  --size3-h: 80%;
    }
    25% {
        --size1-w: 140%; --size1-h: 40%;
        --size2-w: 90%;  --size2-h: 80%;
        --size3-w: 100%; --size3-h: 110%;
    }
    50% {
        --size1-w: 80%;  --size1-h: 90%;
        --size2-w: 120%; --size2-h: 140%;
        --size3-w: 130%; --size3-h: 70%;
    }
    75% {
        --size1-w: 110%; --size1-h: 60%;
        --size2-w: 150%; --size2-h: 90%;
        --size3-w: 60%;  --size3-h: 130%;
    }
}