/* --- Global Styles & Variables --- */
:root {
    --primary-color: #5865F2;
    --dark-bg-primary: #1B1B1B;
    --dark-bg-secondary: #25282B;
    --dark-bg-footer: #222528;
    --text-light: #FFFFFF;
    --text-medium: #a0a0a0;
    --header-height: 80px;
    --header-color-semi-transparent: rgba(27, 27, 27, 0.5);
}

/* --- Base & Typography --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg-primary);
    color: var(--text-light);
    font-family: 'Roboto', 'Poppins', sans-serif;
    margin: 0;
    padding-top: var(--header-height);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-light);
}

/* --- Section Layouts --- */
.section-default {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    background-color: var(--dark-bg-primary);
}

.section-hero {
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; /* Needed for z-index context */
    overflow: hidden; /* Ensures circles don't overflow outside */
}

/* Background Animation Styles from background/styles.css */
@import url('https://fonts.googleapis.com/css?family=Exo:400,700'); /* */

.area {
    background: var(--dark-bg-primary);
    background: -webkit-linear-gradient(to left, #8f94fb, #4e54c8);
    width: 100%;
    height: 100%; /* Changed to 100% to fill parent, not viewport */
    position: absolute; /* Position absolutely within .section-hero */
    top: 0;
    left: 0;
    z-index: 0; /* Ensure it's behind the content */
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    animation: animate 25s ease-in-out infinite; /* Changed 'linear' to 'ease-in-out' */
    bottom: -150px;
    will-change: transform, opacity, border-radius; /* Added for performance optimization */
}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg) translateZ(0); /* Added translateZ(0) for hardware acceleration */
        opacity: 1;
        border-radius: 0;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg) translateZ(0); /* Added translateZ(0) for hardware acceleration */
        opacity: 0;
        border-radius: 50%;
    }
}

/* Adjust .content-centered to be above the animation */
.section-hero .content-centered {
    position: relative;
    z-index: 1; /* Ensure content is above the animation */
}

.section-default-topalign {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 8vh;
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: var(--dark-bg-primary);
    min-height: calc(100vh - var(--header-height));
}

.section-alternating-a,
.section-alternating-b {
    width: 100%; /* Ensures the section spans the full viewport width */
    min-height: 50vh;
    padding-top: 80px;
    padding-bottom: 80px;
    /* max-width, horizontal margin/padding, and flex properties are removed */
}

.section-alternating-a {
    background-color: var(--dark-bg-primary);
}

.section-alternating-b {
    background-color: var(--dark-bg-secondary);
}

.content-centered {
    width: 100%;
    max-width: 1600px;   /* This provides the "boxed" width for your content */
    margin-left: auto;   /* This centers the container horizontally */
    margin-right: auto;  /* This centers the container horizontally */
    padding-left: 20px;  /* This provides side padding for the content on smaller screens */
    padding-right: 20px; /* This provides side padding for the content on smaller screens */
}

/* --- Header Styles --- */
.site-header {
    background-color: var(--header-color-semi-transparent);
    padding: 0 3%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    margin: 0 auto;
}

.site-logo {
    max-height: 50px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* --- Main Navigation (Desktop) --- */
.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation li {
    position: relative;
}

/* Hide the mobile-only user menu on desktop */
.main-navigation .mobile-user-menu {
    display: none;
}


/* UPDATED: Using :not() to exclude the user menu from styling */
.main-navigation li:not(.mobile-user-menu) > a {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* UPDATED: Using :not() to exclude the user menu from styling */
.main-navigation li:not(.mobile-user-menu) > a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

/* UPDATED: Using :not() to exclude the user menu from styling */
.main-navigation li:not(.mobile-user-menu) > a:hover {
    color: var(--primary-color);
}

/* UPDATED: Using :not() to exclude the user menu from styling */
.main-navigation li:not(.mobile-user-menu) > a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    color: var(--primary-color);
}

.main-navigation .current-menu-item > a::after,
.main-navigation .current-menu-ancestor > a::after {
    transform: scaleX(1);
}

/* Sub-menu (Dropdown) */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-bg-secondary);
    padding: 8px;
    border-radius: 4px;
    list-style: none;
    z-index: 1001;
    min-width: 200px;
    border: 1px solid #333;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, top 0.3s ease;
}

.main-navigation ul li:hover > ul {
    display: block;
    opacity: 1;
    visibility: visible;
    top: 100%;
}

.main-navigation ul ul li {
    width: 100%;
    margin-bottom: 0;
}

.main-navigation ul ul a {
    font-size: 15px;
    padding: 12px 15px;
    text-transform: uppercase;
    font-weight: 600;
}

.main-navigation ul ul a:hover {
    color: var(--primary-color);
    background-color: transparent;
}

.main-navigation ul ul a::after {
    bottom: 5px;
}

.main-navigation ul ul .current-menu-item > a {
    color: var(--primary-color);
}

.main-navigation ul ul .current-menu-item > a::after {
    transform: scaleX(1);
}

/* --- Mobile Menu --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
}

.submenu-toggle {
    display: none;
}

@media (max-width: 992px) {
    .header-right .main-navigation,
    .header-right .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation.toggled-on {
        display: flex;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--dark-bg-secondary);
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid #333;
    }
    
    /* Show and style the mobile user menu when toggled */
    .main-navigation.toggled-on .mobile-user-menu {
        display: block;
        padding-bottom: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #444;
        list-style: none; /* Ensure no bullets appear */
    }

    .main-navigation.toggled-on ul {
        flex-direction: column;
        width: 100%;
        text-align: left;
    }

    .main-navigation.toggled-on ul li {
        margin-bottom: 0;
    }

    /* UPDATED: Using :not() to exclude the user menu from styling */
    .main-navigation.toggled-on li:not(.mobile-user-menu) > a {
        padding: 15px 10px;
    }

    .main-navigation.toggled-on li:not(.mobile-user-menu) > a::after {
        display: none;
    }

    .main-navigation.toggled-on .current-menu-item > a {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .main-navigation .submenu-toggle {
        display: inline-block;
        margin-left: auto;
        padding-left: 15px;
        font-size: 12px;
        transition: transform 0.3s ease;
    }

    .main-navigation .submenu-open > a > .submenu-toggle {
        transform: rotate(180deg);
    }

    .main-navigation.toggled-on .sub-menu {
        display: none;
        list-style: none;
        padding-left: 20px;
        margin: 0;
        /* UPDATED: Changed to a solid background color */
        background: var(--dark-bg-primary);
    }

    .main-navigation.toggled-on .sub-menu a {
        font-size: 14px;
        padding-left: 20px;
    }
}

/* --- Footer Styles --- */
.site-footer {
    background-color: var(--dark-bg-footer);
    padding: 60px 5%;
    color: var(--text-medium);
}

.footer-main {
    max-width: 1600px;
    margin: 0 auto 40px auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-heading {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

/* Dynamic Multi-column Footer Links */
.quick-links .footer-menu {
    list-style: none !important; /* FIX: Remove list dots */
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px 20px;
}

.quick-links .footer-menu ul {
    display: contents;
}

/* FIX: Ensure all list items in the footer menu have no dots */
.quick-links .footer-menu li {
    list-style-type: none !important;
    padding-left: 0;
    margin-left: 0;
}

.quick-links a {
    font-size: 15px;
    color: var(--text-medium);
    transition: color 0.2s ease;
}

.quick-links a:hover {
    color: var(--primary-color);
}

.discord-invite {
    flex-grow: 0.5;
}

/* Footer Bar */
.footer-bar {
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .quick-links .footer-menu {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .footer-main {
        text-align: center;
        justify-content: center;
    }

    .footer-heading {
        text-align: center;
    }
}

/* --- Footer Discord Widget --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
  .discord-horizontal-invite {
    background-color: #2a2d2f; /* Dark background */
    display: flex;
    align-items: center;
    padding: 15px 25px;
    border-radius: 8px;
    border: 1px solid #444; /* Darker border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); /* Adjusted shadow for dark theme */
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 450px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
  }
  .discord-horizontal-invite:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); /* Adjusted hover shadow */
    background-color: #303336; /* Slightly lighter dark on hover */
  }
  .discord-horizontal-logo-container {
    margin-right: 20px;
    display: flex;
    align-items: center;
  }
  .discord-fa-icon {
    font-size: 36px;
    color: #5865F2;   /* Discord blurple color for the icon - kept as accent */
    transition: transform 0.3s ease, color 0.3s ease;
  }
  .discord-horizontal-invite:hover .discord-fa-icon {
    transform: scale(1.1);
  }
  .discord-horizontal-text-container {
    flex-grow: 1;
    /* Default text color will be inherited or set by specific elements below */
  }
  .join-text {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #e0e0e0; /* Light text color for dark theme */
  }
  .join-text strong {
    color: #5865F2; /* Discord blurple for server name - kept as accent */
  }
  .action-text {
    font-size: 0.9em;
    margin: 0;
    color: #a0a0a0; /* Softer light text color */
    transition: color 0.3s ease;
  }
.discord-horizontal-invite:hover .action-text {
    color: #ffffff; /* Brighter text on hover */
  }
.arrow {
    display: inline-block;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #5865F2; /* Changed to main blurple for consistency */
    font-weight: bold;
}
.discord-horizontal-invite:hover .arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer-specific styling for Discord Widget */
.footer-discord-widget {
    margin-left: 0 !important;
}


.page-main-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 3.5em;
    color: #EEEEEE;
    text-align: center;
    margin: 0;
}

.page-main-heading-bottommargin {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 3.5em;
    color: #EEEEEE;
    text-align: center;
    margin: 0 auto 20px auto;
}