html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    font-family: 'Inter', sans-serif;
}

/* navbar */

#navbar {
    background: url(image/HeaderFlag.gif);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    margin: 0;
    padding: 1rem 2rem;
    height: 120px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#navbar ul {
    margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 0.5rem;
}

#right-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
    gap: 1rem;
    margin-right: 1%;
}

#navbar h2 {
    color: #f5e9d4;
    margin: 0;
    font-size: 2rem;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px #000;
    flex-grow: -1;
}

#navbar #login button {
    background-color: #6a3e13;
    color: #f5e9d4;
    border: 2px solid #d4af37;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#navbar #login button:hover {
    transform: scale(1.05);
}

.admin-button {
    display: flex;
    align-items: center;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-family: sans-serif;
    text-decoration: none;
}

.admin-button .left,
.admin-button .right {
    image-rendering: pixelated;
    width: 20px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.admin-button .left {
    background-image: url('image/ButtonLeft.png');
    margin-right: -6px;
}

.admin-button .right {
    background-image: url('image/ButtonRight.png');
}

.admin-button .middle {
    image-rendering: pixelated;
    background-image: url('image/ButtonMiddle.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    margin-right: -1px;
}

.open-menu,
.close-menu {
    position: absolute;
    color: var(--color1);
    cursor: pointer;
    font-size: 2rem;
    display: none;
}

.open-menu {
    top: 23%;
    right: 20px;
    transform: translateY(-50%);
}

.close-menu {
    top: 15%;
    align-items: center;
}

#check {
    display: none;
}

/* pres */

#pres {
    margin-top: -120px;
    text-align: center;
    padding: 85px 0;
    height: 78vh;
    background-image: url(image/goblinTower.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#logo {
    width: 400px;
    height: 400px;
    margin-bottom: 15px;
}

#pres img {
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

#pres img:hover {
    transform: scale(1.1);
}

#pres a:first-of-type {
    display: inline-block;
    margin-top: 20px;
}

#pres p {
    color: white;
    font-weight: bolder;
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 15px;
    margin-bottom: 25px;
    padding: 0 20px;
}

#info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 40px;
    margin: 0;
    flex-wrap: wrap;
    background-image: url(image/tree.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#info img {
    max-width: 800px;
    height: auto;
}

#info h2 {
    font-size: 3rem;
    margin-bottom: 10px;
}

#text {
    text-align: center;
    max-width: 600px;
}

#info p {
    line-height: 1.6;
    text-align: left;
    font-size: larger;
}

#btn img {
    margin-top: 5%;
    width: 32px;
    animation: bounce 2s infinite;
}

/* Login Modal */

#login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
}

.login-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2b1e10;
    color: #f5e9d4;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    min-width: 300px;
    text-align: center;
    list-style: none;
}

.login-container h3 {
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.login-container input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.login-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.login-switch-register {
    margin-top: 1rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Giveaway */
.modal {
    display: block;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #2b1e10;
    color: #f5e9d4;
    margin: 8% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
    border: 2px solid #d4af37;
    font-family: 'Inter', sans-serif;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
    text-align: center;
    color: #d4af37;
    font-family: 'Cinzel', serif;
}

.modal-content li span {
    color: #a89b86;
    font-size: 0.85rem;
}

.close {
    float: right;
    font-size: 1.8rem;
    font-weight: bold;
    color: #d4af37;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close:hover {
    transform: scale(1.2);
    color: #fff;
}

/* Button Giveaway */
.copy-btn {
    background-color: #6a3e13;
    border: 1px solid #d4af37;
    color: #f5e9d4;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #8b4e1d;
}

/* Giveaway */
#giveawaySection {
    text-align: center;
    padding: 85px 0;
    background-image: url(image/cave.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: white;
}

h3 {
    font-size: 3rem;
}

.marquee {
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%);
    mask-image: linear-gradient(to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%);
}

.marquee_header {
    font-size: 35px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
}

.marquee__inner {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.marquee__group {
    display: flex;
}

.marquee__group img {
    width: 100px;
    height: auto;
    margin: 0 1.5rem;
    padding: 4px 16px 4px 12px;
    white-space: nowrap;
    image-rendering: pixelated;
    transition: transform 0.3s ease;
}

.marquee__group img:hover {
    transform: scale(1.1);
}

#giveawayDate {
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }

    #navbar {
        flex-direction: column;
        padding: 1rem;
    }

    #navbar ul {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 0;
    }

    #navbar h2 {
        font-size: 1.4rem;
        text-align: center;
    }

    #right-section {
        flex-direction: column;
        justify-content: center;
        width: 100%;
        height: 60vh;
        position: fixed;
        padding: 0;
        margin: 0;
        top: 8%;
        right: -100%;
        z-index: 100;
        flex-wrap: wrap;
        gap: 0.5rem;
        background: url(image/Card2.png);
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        image-rendering: pixelated;
    }

    .open-menu, .close-menu {
        display: block;
    }

    #check:checked ~ #right-section {
        right: 0;
    }

    #check:checked ~ .open-menu {
        display: none;
    }

    #navbar #login button,
    #admin-link a,
    #right-section button {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        text-align: center;
    }

    #logo {
        width: 180px;
        height: 180px;
    }

    h1 {
        font-size: 2rem;
    }

    #pres {
        padding: 80px 0;
        height: auto;
        text-align: center;
    }

    #pres p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    #info {
        flex-direction: column;
        padding: 40px 10px;
    }

    #info img {
        width: 100%;
        max-width: 100%;
    }

    #info h2 {
        font-size: 1.6rem;
    }

    #text {
        max-width: 100%;
        padding: 0 1rem;
    }

    .login-container,
    .modal-content {
        width: 90%;
        padding: 1rem;
    }

    .login-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .login-buttons button {
        width: 100%;
    }

    .modal-content h2 {
        font-size: 1.6rem;
    }

    .modal-content li {
        flex-direction: column;
        align-items: flex-start;
        font-size: 0.9rem;
    }

    .copy-btn {
        margin-top: 0.5rem;
        margin-left: 0;
        width: 100%;
    }

    .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
}