/* --- CORE THEME & LAYOUT --- */
body {
    background: #000;
    color: #eee;
    font-family: 'Cinzel', serif;
    margin: 0;
    overflow-x: hidden;
}

:root {
    /* Default to PoE2 images/titlebar/1.png */
    --titlebar-img: url('images/titlebar/1.png');
    --pure-white: #ffffff;
}

/* Theme Swapping Logic */
body[data-title-theme="1"] { --titlebar-img: url('images/titlebar/1.png'); }
body[data-title-theme="2"] { --titlebar-img: url('images/titlebar/2.png'); }
body[data-title-theme="3"] { --titlebar-img: url('images/titlebar/3.png'); }
body[data-title-theme="4"] { --titlebar-img: url('images/titlebar/4.png'); }

.main-header {
    height: 100px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--pure-white);

    background: 
        linear-gradient(to right, 
            rgba(0,0,0,0) 0%, 
            rgba(0,0,0,1) 35%, 
            rgba(0,0,0,1) 65%, 
            rgba(0,0,0,0) 100%
        ),
        var(--titlebar-img) left center / auto 100% no-repeat,
        var(--titlebar-img) right center / auto 100% no-repeat;

    background-color: transparent; 
}

/* Ensure the center area stays empty since the image is now in the background */
.header-center {
    flex: 1; /* Takes up all remaining middle space */
    display: flex;
    justify-content: center;
}

.center-logo {
    height: 70px; /* Adjust this to fit your logo's height preference */
    width: 80%;
    object-fit: contain;
    z-index: 1001; /* Sits above the background gradient */
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.8)); /* Helps it pop against the black center */
}

.header-right {
    width: 5%;
    min-width: 60px; /* Prevents it from disappearing */
    display: flex;
    justify-content: flex-end;
}

.header-left {
    width: 5%;
    min-width: 60px; /* Prevents it from disappearing */
    display: flex;
    justify-content: flex-end;
}

/* Note: If your CSS is inside a 'css' folder, use url('../images/titlebar/1.png') instead */
/* --- PAGE SPACING FIX --- */
.content-container {
    padding-top: 120px;    /* Keeps content from hiding under the 100px header */
    padding-left: 5%;      /* Adds responsive padding to the left */
    padding-right: 5%;     /* Adds responsive padding to the right */
    max-width: 1400px;     /* Prevents the content from getting too wide on huge monitors */
    margin: 0 auto;        /* Centers the content box */
    box-sizing: border-box; /* Ensures padding doesn't break the width math */
    transition: opacity 0.3s ease;
}

/* ---  NAVIGATION --- */

.menu-container {
    width: 5%;
    min-width: 60px; /* Prevents it from disappearing on small screens */
    display: flex;
    justify-content: flex-start;
    margin-right: 0; /* Removing the 40px margin you currently have */
}

.menu-trigger {
    width: 100%;
    background: transparent;    /* Removes the background color/box */
    border: none;              /* Removes the white border box */
    color: #ffffff;            /* Forces text to be pure white */
    padding: 10px 0;
    font-size: 0.75rem;
    font-family: 'Cinzel', serif; /* Ensures it keeps the PoE2 font */
    cursor: pointer;
    letter-spacing: 1px;
    outline: none;             /* Removes the focus box when clicked */
    transition: color 0.3s ease;
}

/* Optional: Add a subtle glow or color change when hovering */
.menu-trigger:hover {
    color: #00d4ff;            /* Turns light blue on hover to match your accents */
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

/* The Profile Image (Auth Toggle) */
#authToggleImg {
    width: 100%;       /* Fills the 5% container */
    max-width: 45px;    /* Prevents it from getting too large */
    height: auto;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #333;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: #050505;
    border: 1px solid #1a1a1a;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(247, 247, 247, 0.5);
}

.menu-container:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #aaa;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.8rem;
    transition: 0.3s;
}

.dropdown-content a:hover {
    background: #111;
    color: #00d4ff;
}

.menu-divider {
    height: 1px;
    background: #222;
    margin: 5px 0;
}

/* --- DISCORD SIDEBAR --- */
.discord-sidebar {
    position: fixed;
    left: -220px;
    right: 0;
    top: 100px;
    height: calc(100vh - 140px);
    width: 220px;
    background: #050505;
    border: 1px solid #1a1a1a;
    transition: 0.5s;
    z-index: 999;
}

.discord-sidebar:hover {
    left: 0;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill the sidebar height */
    padding: 20px;
    box-sizing: border-box;
}

#discord-list {
    flex-grow: 0; /* Let the list be as long as it needs to be */
    margin-bottom: 10px;
}

/* Optional: Add a hover effect for the Discord-blue button */
.sidebar-footer .cta-btn:hover {
    background: #4752c4 !important;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.4);
}
.sidebar-tab {
    position: absolute;
    right: -40px;
    top: -1px;
    width: 40px;
    height: 40px;
    background: #050505;
    border: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-tab img { width: 25px; opacity: 0.5; }

/* --- MEMBERS PAGE --- */
.member-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.tab-btn {
    background: none;
    border: none;
    color: #555;
    font-family: 'Cinzel';
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.tab-btn.active {
    color: #00d4ff;
    text-shadow: 0 0 8px #00d4ff;
}

.member-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    padding: 20px 0; /* Vertical spacing */
}

.member-card {
    background: #050505;
    border: 1px solid #1a1a1a;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
}

.member-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #222;
    object-fit: cover;
    margin-bottom: 10px;
}

/* --- JOIN REQUESTS & ADMIN --- */
.join-request-box {
    grid-column: 1 / -1;
    padding: 60px 20px;
    border: 1px solid #1a1a1a;
    background: #030303;
    text-align: center;
}

.ritual-input {
    padding: 10px;
    background: #111;
    color: #fff;
    border: 1px solid #333;
    margin-bottom: 10px;
    width: 100%;
    max-width: 300px;
    font-family: 'Cinzel';
}

.cta-btn {
    background: #00d4ff;
    color: #000;
    border: none;
    padding: 12px 25px;
    font-family: 'Cinzel';
    font-weight: bold;
    cursor: pointer;
}

/* --- MODALS --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background-color: #050505;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid #1a1a1a;
    width: 300px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    box-sizing: border-box;
}

.close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.news-card {
    background: #050505;
    border: 1px solid #1a1a1a;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 4px solid #00d4ff;
}

.news-card h3 {
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    color: #fff;
}

.news-card small {
    color: #666;
    display: block;
    margin-bottom: 15px;
    font-style: italic;
}

.news-card p {
    line-height: 1.6;
    color: #ccc;
}

.disclaimer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.9); /* Dark theme to match PoE2 aesthetics */
    color: #a0a0a0; /* Subtle grey text */
    text-align: center;
    padding: 2px 15px;
    font-size: 9px; /* Small text */
    border-top: 1px solid #333;
    z-index: 9999; /* Ensures it stays above other content */
    font-family: sans-serif;
}

.disclaimer-bar a {
    color: #cea355; /* Gold-ish color common in PoE UI */
    text-decoration: none;
}

.disclaimer-bar a:hover {
    text-decoration: underline;
}

/* Prevents the footer from covering the bottom of your page content */
body {
    padding-bottom: 40px; 
}

        .news-grid {
            max-width: 900px;
            margin: 40px auto;
            padding: 0 20px;
        }
        .news-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid #222;
            padding: 30px;
            margin-bottom: 30px;
            transition: border 0.3s ease;
        }
        .news-card:hover {
            border-color: var(--pure-white);
        }
        .news-date {
            font-size: 0.8rem;
            color: #666;
            margin-bottom: 10px;
        }
        .news-title {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: var(--pure-white);
        }
        .news-body {
            line-height: 1.6;
            color: #ccc;
        }
        .admin-controls {
            display: none; /* Hidden by default, JS will show for Owner */
            margin-bottom: 40px;
            text-align: right;
        }
        .btn-post {
            background: none;
            border: 1px solid var(--pure-white);
            color: var(--pure-white);
            padding: 10px 25px;
            font-family: 'Cinzel', serif;
            cursor: pointer;
        }
