#preloader {
    color: rgb(255, 255, 255);
    background: rgb(0, 0, 0);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#preloader p {
    font-weight: 600;
    font-size: 25px;
    margin-top: -10px;
    opacity: 0.5;
    background: linear-gradient(to right, white 50%, rgba(255,255,255,0.2) 60%);
    background-size: 200% 100%;
    background-position: 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fill-text 2.3s linear forwards 0.3s;
}

@keyframes fill-text {
    from {
        background-position: 100%;
    }
    to {
        background-position: 0%;
    }
}

.pre {
    opacity: 0;
    font-size: 80px;
    background: linear-gradient(to right, white 50%, rgba(255,255,255,0.2) 60%);
    background-size: 200% 100%;
    background-position: 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fill-text2 1.2s linear forwards;
}

@keyframes fill-text2 {
    from {
        opacity: 0;
        background-position: 100%;
    }
    to {
        opacity: 1;
        background-position: 0%;
    }
}


.logo {
    width: 120px;
    animation: fade 1.5s infinite alternate;
}

@keyframes fade {
    from {
        opacity: 0.3;
    }

    to {
        opacity: 1;
    }
}

@font-face {
    font-family: "MinecraftTen";
    src: url(./font/MinecraftTen.ttf) format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'MinecraftRegular';
    src: url(./font/MinecraftRegular.otf) format('truetype');
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    overflow-y: scroll;
    overflow-x: hidden;
}

body {
    scroll-snap-type: y mandatory;
    /* Removed min-width and min-height for responsiveness */
    overflow: auto;
    overflow-x: hidden;
}

body::-webkit-scrollbar {
    display: none;
    /* 크롬, 사파리, 오페라, 엣지 */
}

main>section {
    height: 100vh;
    scroll-snap-align: start;
}

header {
    position: fixed;
    top: 1vh;
    left: 0.5vw;
    display: flex;
    width: auto;
    background-color: white;
    padding: 1.5vh 2vw;
    /* Use vw and vh for padding */
    max-width: 96.9%;
    border-radius: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-domain {
    top: -8vh;
    /* Use vh */
    animation: slidedown 0.9s ease forwards 0.5s;
}

@keyframes slidedown {
    from {
        top: -8vh;
    }

    to {
        top: 1vh;
    }
}

header.header-discord {
    position: fixed;
    top: -8vh;
    /* Use vh */
    left: 17.585vw;
    /* Adjusted left position for responsiveness */
    width: auto;
    padding: 1.37vh 0.65vw;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    z-index: 1000;
    animation: slidedown2 0.9s ease forwards 0.65s;
}

@keyframes slidedown2 {
    from {
        top: -8vh;
    }

    to {
        top: 1vh;
    }
}

a.domain {
    text-decoration: none;
    font-weight: bold;
    color: rgb(255, 255, 255);
    font-size: 1.5vw;
    /* Use vw for font size */
    font-family: 'MinecraftRegular', sans-serif;
    font-weight: 300;
}

.NAVdiscord a i {
    font-size: 2vw;
    /* Use vw for icon size */
    color: #7289da;

}

.NAVdiscord a i:hover {
    color: #5b6eae;
}

.mainpage {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.BGvideo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
}

.BGintroduce {
    position: absolute;
    top: 0;
    left: -1.5vw;
    width: 103%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.introduce {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* Changed to column for better vertical stacking on smaller screens */
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
}

.introduce h2 {
    position: absolute;
    top: -2.2%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(22, 22, 22);
    font-family: 'MinecraftTen', sans-serif;
    font-weight: 300;
    font-size: 8vw;
    /* Use vw for font size */
    z-index: 2;
}

.introduce img {
    filter: brightness(1.15);
}

.introduce .sign {
    position: absolute;
    justify-content: center;
    width: 37vw;
    /* Use vw for width */
    transform: translateY(3.5vh);
    z-index: 0;
}

.introduce .p2 {
    position: absolute;
    transform: translateY(2.5vh);
    font-family: 'MinecraftRegular', sans-serif;
    font-size: 3.5vw;
    /* Use vw for font size */
    color: black;
    z-index: 1;
    text-align: center;
}

.introduce h3 {
    position: absolute;
    top: 7.9%;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'MinecraftTen', sans-serif;
    font-weight: 300;
    font-size: 8vw;
    /* Use vw for font size */
    color: rgb(72, 0, 0);
    z-index: 2;
}

.introduce h4 {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'MinecraftTen', sans-serif;
    font-weight: 300;
    font-size: 8vw;
    /* Use vw for font size */
    color: rgb(0, 0, 0);
    z-index: 2;
}

.introduce .p1 {
    position: absolute;
    transform: translateY(41.5vh);
    font-family: 'MinecraftRegular', sans-serif;
    font-size: 3.5vw;
    /* Use vw for font size */
    color: black;
    z-index: 1;
}

.join {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
}

.BGjoin {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.portal {
    position: absolute;
    justify-content: center;
    width: 30%;
    max-width: 100%;
    min-width: 400px;
    height: auto;
    transform: translateY(9.5vw);
    z-index: 1;
}

.toolbox {
    position: absolute;
    justify-content: center;
    width: -3%;
    max-width: 100%;
    height: 40%;
    transform: translateY(18.4vw);
    left: 10.5vh;
    z-index: 1;
}

.join h2 {
    position: absolute;
    top: -4.5%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(255, 255, 255);
    font-family: 'MinecraftTen', sans-serif;
    font-weight: 300;
    font-size: 8vw;
    /* Use vw for font size */
    z-index: 2;
}

.join .j1 {
    position: absolute;
    transform: translateY(-27.5vh);
    font-family: 'MinecraftRegular', sans-serif;
    font-size: 3.5vw;
    /* Use vw for font size */
    color: rgb(255, 255, 255);
    z-index: 1;
    text-align: center;
}

.join .j2 {
    position: absolute;
    transform: translateY(-20.8vh);
    font-family: 'MinecraftRegular', sans-serif;
    font-size: 2vw;
    /* Use vw for font size */
    color: rgb(124, 111, 111);
    z-index: 1;
    text-align: center;

    opacity: 0.5;
}


/*.anvil{
    position: absolute;
    justify-content: center;
    width: 12%;
    max-width: 100%;
    height: auto;
    transform: translateX(30vw);
    transform: translateY(23vw);
    left: 17.5vw;
    z-index: 1;
}

.bigchest{
    position: absolute;
    justify-content:center;
    width: 30%;
    max-width: 100%;
    min-width: 400px;
    height: auto;
    transform: translateY(12vw);
    left: 5vh;
    z-index: 2;
}*/

/* --- Media Queries for Mobile and Tablet --- */
@media (max-width: 768px) {
    header.header-discord {
        left: 25vw;
        padding: 1vh 1vw;
    }

    a.domain {
        font-size: 2vw;
    }

    .NAVdiscord a i {
        font-size: 4vw;
    }

    .introduce h2,
    .introduce h3,
    .introduce h4 {
        font-size: 10vw;
        text-align: center;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }

    .introduce h2 {
        top: 5%;
    }

    .introduce h3 {
        top: 25%;
    }

    .introduce h4 {
        top: 75%;
    }

    .introduce .p1 {
        font-size: 4vw;
        transform: translateY(40vh);
        text-align: center;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }

    .introduce .sign {
        width: 60vw;
        transform: translateY(5vh);
    }

    .introduce .p2 {
        font-size: 5vw;
        transform: translateY(4vh);
    }
}