@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100..900&display=swap');

* {
    font-family: "Poppins", sans-serif;
}

:root {
    --background: #f0f0f0;
    --background-rgb: 240, 240, 240;
    --bannerOpacity: 0.2;
    --text: #000;
    --elements: #fff;
    --shadow: #0000009e;
}

html[theme="dark"] {
    --background: #121212;
    --background-rgb: 18, 18, 18;
    --bannerOpacity: 0.8;
    --text: #FAF9F6;
    --elements: #FAF9F6;
    --shadow: #0000009e;
}

body {
    background: var(--background);
    max-width: 900px;
    margin: auto;
    padding: 3em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--text);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

/* Theme Switch */
#theme-switch {
    position: fixed;
    top: 1em;
    right: 1em;
    color: var(--text);
    font-size: 1.25em;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#theme-switch:hover {
    transform: scale(1.1);
}

/* Profile Picture */
#profilePicture {
    background-size: cover;
    background-position: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

#profilePicture img{
    width: 110%;
    height: 110%;
    margin-left: -5%;
    margin-top: -8%;
}

/* Hero Section */
.hero {
    color: var(--text);
    margin-top: 5em;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: clamp(15px, calc(5vw + 20px), 50px);
}

.hero p {
    font-size: clamp(10px, 5vw, 20px);
}

/* Elements Section */
.elements {
    margin-top: 3em;
    display: grid;
    gap: 1em;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(clamp(0px, 50%, 300px), 1fr));
}

.element {
    color: var(--elements);
    padding: 1em;
    border-radius: 1.5em;
    text-align: center;
    box-shadow: 0 3px 20px 0 var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(150px, 30vw, 200px);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.element:hover {
    transform: scale(1.05);
}

.element::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-30deg);
}

.element:hover::before {
    left: 110%;
    transition: left 0.7s;
}

.element h2 {
    font-size: clamp(10px, 5vw, 30px);
    margin: 0;
    text-transform: uppercase;
}

.element h2::after {
    content: "";
    display: block;
    width: 50%;
    margin: 0 auto 0.25em auto;
    border-bottom: 2px solid var(--elements);
    transition: width 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.element:hover h2::after {
    width: 55%;
}

.element p {
    font-size: clamp(6px, 3vw, 15px);
    margin: 0;
}

/* Element Background Images */
#scenepacks { background-image: url("images/scenepacks.webp"); }
#discord { background-image: url("images/discord.webp"); }
#youtube { background-image: url("images/youtube.webp"); }
#tiktok { background-image: url("images/tiktok.webp"); }

/* Video Section */
#video {
    margin-top: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 3px 20px 0 var(--shadow);
    border-radius: 1.5em;
    overflow: hidden;
}

.fade-out {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: -1;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.fade-out::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    bottom: -3px;
    right: 0px;
    background: linear-gradient(to bottom, rgba(var(--background-rgb), var(--bannerOpacity)) 0%, var(--background) 100%);
    pointer-events: none;
}

.fade-out img {
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    filter: blur(5px);
    transform: translate(-3px, -3px);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none; /* Ensures the iframe does not block interactions with elements below it */
    display: none; /* Hide the iframe by default */
}

@media (min-width: 1200px) { /* Adjust the min-width value as needed */
    #overlay {
        display: block; /* Show the iframe when the viewport is wide enough */
    }
}

#toggle-chat {
    position: fixed;
    top: 1em;
    right: 3em; /* Adjusted to place it next to the theme switch */
    color: var(--text);
    font-size: 1.25em;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#toggle-chat:hover {
    transform: scale(1.1);
}