* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --min-font-size: 14px;
    --max-font-size: 18px;
    --responsive-font-size: clamp(var(--min-font-size), 1.1vw, var(--max-font-size));
}

body {
    background-color: #231e3f;
    background-image: radial-gradient(ellipse at 50% 40%,
            rgba(115, 99, 218, 0.25) 0%,
            #231e3f 60%);

    font-family: 'Lilita One', cursive;
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    font-size: var(--responsive-font-size);
    flex-grow: 1;
}

/* --- COMMON UTILS --- */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.main-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.header {
    margin-top: 10px;
    margin-bottom: 30px;
    position: relative;
}

.top-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: clamp(55px, 5vw, 80px);
    position: relative;
    z-index: 1001;
    width: 98vw;
    left: 50%;
    transform: translateX(-50%);
}

.nav-center-title {
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header h1 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    margin-bottom: 0;
    color: #fff;
    position: relative;
    text-align: center;
}

.author-credit {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
    display: block;
    text-align: center;
    margin: -2px auto 0;
    width: fit-content;
}

/* --- NAV RIGHT (Discord & Lang) --- */
.nav-links-right {
    position: relative;
    display: flex;
    align-items: center;
}

.discord-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(88, 101, 242, 0.8);
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid rgba(88, 101, 242, 1);
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.9rem, 1.2vw, 1.0rem);
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.discord-link:hover {
    background-color: rgba(88, 101, 242, 1);
}

.discord-link .fab {
    font-size: 1.2rem;
}

/* --- LANGUAGE SELECTOR --- */
#languageSelector {
    cursor: pointer;
    position: relative;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    transition: background-color 0.2s ease;
    color: #fff;
    cursor: pointer;
}

.language-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-flag {
    width: 24px;
    height: auto;
    border-radius: 4px;
    vertical-align: middle;
}

#selectedLanguage {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#languageDropdown {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: #2c2c2c;
    border-radius: 10px;
    overflow: hidden;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#languageSelector.open #languageDropdown {
    display: block;
}

/* --- BURGER MENU & OVERLAY --- */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 2.2rem;
    height: 2.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2010;
    position: relative;
}

.burger-menu span {
    width: 2.2rem;
    height: 0.25rem;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.menu-overlay a {
    color: #fff;
    text-decoration: none;
    font-size: 2.5rem;
    margin: 15px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu-overlay a:hover {
    color: #f1c40f;
    transform: scale(1.05);
}

.menu-close {
    position: absolute;
    top: 30px;
    right: 50px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    z-index: 2010;
}

/* --- TOS CONTENT --- */
.tos-section {
    margin-bottom: 25px;
}

.tos-section h2 {
    color: #f1c40f;
    margin-bottom: 15px;
    font-size: 1.8rem;
    border-bottom: 1px solid rgba(241, 196, 15, 0.3);
    padding-bottom: 5px;
}

.tos-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.tos-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.tos-section li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 20px;
    margin-top: auto;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
    color: inherit;
    text-decoration: underline;
}

footer a:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.4rem;
    }

    .top-nav-bar {
        padding: 10px 15px;
    }
}