/* ------------------------------------------------------------------- */
/*
 * COMPLETE STYLESHEET FOR SOCIAL CLAN APPLICATION
 * Version: 3.0.0
 * Date: 2025-10-01
 * Description: Contains global styles, typography, layout grid, component
 * styles (cards, lists, forms), and comprehensive media queries
 * for full responsiveness, including the new mobile menu and modals.
 * -------------------------------------------------------------------
 */

/* === 1. GLOBAL STYLES & RESETS === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}
body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at center, #151515 0%, #0d0d0d 100%);
    color: #e5e7eb;
    min-height: 100vh;
    padding: 2rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    overflow-x: hidden;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Scroll Lock for Modals */
body.modal-open {
    overflow: hidden;
}

/* Split Screen Layout (Used for Sign-in/Auth pages) */
.split-screen-body {
    padding: 0; 
    display: flex; 
    flex-direction: column;
    overflow-y: hidden;
}

/* Custom scrollbar (Aesthetic dark theme) */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0d0d;
}
::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* Text and Links */
a {
    text-decoration: none;
    color: #3b82f6;
    transition: color 0.3s ease;
}
a:hover {
    color: #5b9bf9;
}
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5rem 0;
    color: #f9fafb;
}

/* === 2. HEADER AND NAVIGATION (DEFAULT: DESKTOP) === */
.site-header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    margin: 0 auto 2rem auto; 
    /* MODIFIED FOR STICKY HEADER */
    position: sticky; /* Makes the header "snap" into place when scrolling */
    top: 0; /* Snaps to the very top of the viewport */
    background: rgba(13, 13, 13, 0.95); /* Semi-transparent background for floating effect */
    backdrop-filter: blur(8px); /* Apply blur for a modern floating look */
    -webkit-backdrop-filter: blur(8px);
    z-index: 100; /* Increased z-index to sit above most page content (like post-cards at z-index: 20) */
}

.site-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9fafb;
    text-decoration: none;
    letter-spacing: -0.05em;
}

/* Hamburger button is hidden by default on desktop */
#mobile-menu-toggle {
    display: none;
}

.nav-menu {
    /* Desktop default: horizontal flex container */
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Desktop: Main navigation links wrapper is just a horizontal container */
.main-nav-links-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: none; 
    transform: none; 
}

/* Desktop: Standard horizontal list, remove list style */
.nav-menu > .main-nav-links-wrapper > ul { 
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.nav-menu li {
    position: relative;
    list-style: none; /* Ensure no visible dots/markers */
}

.nav-menu a {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transform-origin: left;
}

.nav-menu a:hover {
    color: #f9fafb;
    transform: scale(1.05);
}

/* Dropdown Menu Styles (Applies to Explore, Post Options, Request) */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #151515;
    border: 1px solid rgba(42, 42, 42, 0.8);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000; /* High z-index */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
}

.nav-menu li.nav-active .dropdown-menu,
.dropdown-link.active .dropdown-menu,
.post-options-container.active .post-options-menu,
.profile-request-container.active .dropdown-menu,
.user-menu-container.active .dropdown-menu { 
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: block;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: none;
}

/* === NEW SEPARATE SELECTORS FOR THE CONFLICTING DROPDOWNS === */

.profile-request-container.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.post-options-container.active .post-options-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* === NOTIFICATION CENTER === */
.notification-container {
    position: relative;
    z-index: 101;
}

.notification-toggle {
    background-color: rgba(21, 21, 21, 0.7);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 9999px;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.notification-toggle:hover {
    transform: scale(1.05);
    background-color: rgba(21, 21, 21, 1);
}

.notification-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #f9fafb;
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.unread-badge.hidden {
    transform: scale(0);
}

.notification-dropdown {
    position: absolute;
    top: 150%;
    right: 0;
    width: 380px;
    background-color: rgba(21, 21, 21, 0.8);
    border-radius: 1rem;
    border: 1px solid rgba(42, 42, 42, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.notification-tabs {
    display: flex;
    justify-content: space-around;
    background-color: #0d0d0d;
    border-radius: 0.75rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.tab-button {
    flex-grow: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.tab-button:hover {
    color: #f9fafb;
}

.tab-button.active {
    background-color: #3b82f6;
    color: #f9fafb;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-list.hidden {
    display: none;
}

.notification-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: rgba(21, 21, 21, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(42, 42, 42, 0.5);
}

.notification-item:nth-of-type(even) {
    background-color: rgba(21, 21, 21, 0.5);
}

.notification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.notification-item.unread {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.notification-item .content-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #2a2a2a;
}

.notification-item p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #c0c0c0;
    margin: 0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.notification-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #f9fafb;
    margin: 0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.notification-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.notification-actions a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #3b82f6;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #3b82f6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: inline-block;
    width: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.notification-actions a:hover {
    background-color: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.notification-dismiss {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.notification-item:hover .notification-dismiss {
    opacity: 1;
}

.notification-dismiss svg {
    width: 0.75rem;
    height: 0.75rem;
    color: #9ca3af;
}

/* === CARD STYLES (COMMON) === */
.card {
    background-color: rgba(21, 21, 21, 0.7);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 10px rgba(59, 130, 246, 0.2);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f9fafb;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* === SOCIAL PROFILE SPECIFIC STYLES === */
.social-main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-banner {
    width: 100%;
    height: 300px;
    background: no-repeat center center/cover;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
    position: relative;
}

.profile-info-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    color: #f9fafb;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #151515;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
}

.profile-details h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.profile-details p {
    font-size: 1rem;
    color: #9ca3af;
    margin: 0.25rem 0 0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.social-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 3rem;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.right-column,#wall_posts_container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
    overflow: hidden;
}
.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.about-text {
    line-height: 1.6;
    color: #c0c0c0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.friends-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.friend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #9ca3af;
    transition: color 0.3s ease, transform 0.3s ease;
}

.friend-item:hover {
    color: #f9fafb;
    transform: scale(1.05);
}

.friend-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
}

.friend-name {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* New Member Spotlight Styles */
.member-spotlight-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.spotlight-member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: rgba(21, 21, 21, 0.5);
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.spotlight-member:hover {
  transform: translateX(5px);
  background-color: rgba(21, 21, 21, 0.7);
}

.spotlight-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.spotlight-info {
  display: flex;
  flex-direction: column;
}

.spotlight-name {
  font-weight: 600;
  color: #f9fafb;
  font-size: 0.9rem;
}

.spotlight-role {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Updated Upcoming Events Styles */
.upcoming-events-card {
  box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1);
}

.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  display: flex;
  flex-direction: column; /* Stack event info and countdown */
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: rgba(21, 21, 21, 0.7);
  transition: all 0.3s ease;
}

.event-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(59, 130, 246, 0.3);
  background-color: rgba(21, 21, 21, 0.85);
}

.event-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.event-name {
  font-weight: 700;
  color: #f9fafb;
  font-size: 1.1rem;
}

.event-date {
  font-size: 0.85rem;
  color: #9ca3af;
  font-weight: 500;
}

.event-countdown {
  font-size: 1rem;
  font-weight: 700;
  color: #4ade80;
  background-color: rgba(74, 222, 128, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.clans-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.clan-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(21, 21, 21, 0.5);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(42, 42, 42, 0.5);
}

.clan-item:hover {
    transform: translateY(-3px);
    background-color: rgba(21, 21, 21, 0.7);
}

.clan-name {
    font-weight: 600;
    color: #f9fafb;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.clan-detail {
    font-size: 0.875rem;
    color: #9ca3af;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.battle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

/* Updated styles for Battle History Items (Left Column) */
.battle-item {
    display: flex;
    flex-direction: column; /* Stack vertically for narrow column */
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(21, 21, 21, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(42, 42, 42, 0.5);
}

.battle-item:hover {
    transform: translateY(-3px);
    background-color: rgba(21, 21, 21, 0.85);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.battle-teams {
    display: flex;
    flex-direction: column; /* Stack teams and vs vertically */
    align-items: center;
    gap: 0.1rem; 
    font-weight: 500;
    color: #f9fafb;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
}

.battle-teams .team-name {
    padding: 0.1rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.battle-teams .vs {
    font-size: 0.65rem; 
    font-weight: 400;
    color: #9ca3af;
}
.battle-teams .vs::before {
    content: "vs"; /* Changed from "-" to "vs" */
}

.winner .team-name {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6; /* Highlight winner's name */
    font-weight: 600;
}

.battle-score {
    font-weight: 700;
    color: #9ca3af;
    font-size: 1rem; /* Further reduced score size for narrow column */
    transition: color 0.3s ease, text-shadow 0.3s ease;
    margin-top: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(42, 42, 42, 0.5); /* Separator line between teams and score */
    width: 100%;
}

.battle-score.winner-score {
    color: #4ade80;
    text-shadow: none;
}

.post-card {
    padding: 1.5rem;
    /* 👈 THE FIX: Override default .card overflow to allow menus to escape. */
    overflow: visible; 
    /* 👈 THE FIX: Increase z-index on the post-card itself for popups */
    z-index: 20; 
}

/* NEW: Style for the dedicated Create Post card */
.create-post-card {
    padding: 1rem 1.5rem; /* Make it a bit more compact than a regular post */
    overflow: hidden; /* Keep standard overflow for the container itself */
    display: flex;
    align-items: center;
}

.create-post-card .post-header {
    /* Reuse post-header layout, but ensure full width to contain the button */
    width: 100%; 
}

.post-header {
    /* Ensure relative positioning for the post-options-container*/
    position: relative; 
    /* Adjust alignment to account for the new menu*/
    justify-content: space-between;
    align-items: flex-start; /* Align avatar/author and options to the top*/
    
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-meta-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-options-container {
    position: relative;
    z-index: 10;
}

.post-options-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-options-toggle:hover {
    background-color: rgba(42, 42, 42, 0.5);
    color: #f9fafb;
}

.post-options-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.post-options-menu {
    /* Reuse general dropdown-menu styling but customize position*/
    position: absolute;
    top: 100%; /* Position below the toggle button*/
    right: 0;
    left: auto; /* Ensure it stays on the right*/
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Post Options Dropdown Selector - FIX: uses explicit selector to avoid conflict */
.post-options-container.active .post-options-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.post-options-menu li {
    list-style: none;
    border-bottom: 1px solid #2a2a2a;
}

.post-options-menu li:last-child {
    border-bottom: none;
}

.post-options-menu a {
    color: #9ca3af;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-options-menu a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: none; /* Remove horizontal shift for this menu*/
}

.post-options-menu a.report-option:hover {
    color: #f87171;
    background-color: rgba(248, 113, 113, 0.1);
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.post-author h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f9fafb;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.post-author span {
    font-size: 0.75rem;
    color: #9ca3af;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.post-body p {
    line-height: 1.6;
    color: #c0c0c0;
    margin-bottom: 1.5rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.post-image {
    width: 100%;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding-top: 1rem;
    border-top: 1px solid rgba(42, 42, 42, 0.5);
    position: relative;
    z-index: 10;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.action-button:hover {
    color: #3b82f6;
    transform: translateY(-2px);
}
/* Override for the text input button style on the create-post-card */
.create-post-card .action-button:hover {
    color: #f9fafb;
    transform: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}


.action-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.dropdown-link.share-container {
    position: relative;
    z-index: 10; 
}

.share-container .dropdown-menu {
    left: auto;
    right: 0;
    min-width: 120px;
    padding: 0; /* Updated to 0 */
    background-color: #1a1a1a;
    z-index: 1000;
    
    /* FIX: Added necessary display/gap for menu items */
    display: flex;
    flex-direction: column;
    gap: 0; /* Updated to 0 to match profile-request-container */

    /* Positioning to be above the trigger button in the footer */
    top: auto; 
    bottom: 100%; 
    transform: translateY(-10px); 
    
    /* FIX: Remove list markers from post dropdown menus */
    list-style: none;
}

/* NEW: Add Border Separator styles to share menu list items */
.share-container .dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #2a2a2a; /* Matches profile-request-container li */
    transition: background-color 0.2s ease;
}

.share-container .dropdown-menu li:last-child {
    border-bottom: none;
}

/* NEW: Apply link styling matching profile-request-container links */
.share-container .dropdown-menu a {
    /* Set color/padding to match profile-request-container */
    color: #9ca3af;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    
    /* FIX: Added transform transition for the hover effect */
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease; 
    
    white-space: nowrap;
    display: block; /* Ensure link fills the list item */
}

.share-container .dropdown-menu a:hover {
    /* Apply profile-request-container hover styles */
    background-color: #1f2937;
    color: #3b82f6;
    transform: translateX(5px); 
}

/* === NEW PROFILE NAV STYLES === */
.profile-nav-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-top: -1rem;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
}

.profile-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.profile-nav-menu a {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.profile-nav-menu a:hover,
.profile-nav-menu a.active {
    color: #f9fafb;
    border-bottom-color: #3b82f6;
}

.profile-request-container {
    position: relative;
    z-index: 10;
}

.request-button {
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.request-button:hover {
    background-color: #5b9bf9;
    color: #282d35;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.request-button::after {
    content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="white" class="w-4 h-4"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /></svg>');
    display: inline-block;
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.profile-request-container.active .request-button::after {
    transform: rotate(180deg);
}

.profile-request-container .dropdown-menu {
    left: auto;
    right: 0;
    min-width: 200px;
    z-index: 100;
    padding: 0;
}

/* Styles for the links inside the request dropdown */
.profile-request-container .dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s ease;
}

.profile-request-container .dropdown-menu li:last-child {
    border-bottom: none;
}

.profile-request-container .dropdown-menu a {
    color: #9ca3af;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.profile-request-container .dropdown-menu a:hover {
    background-color: #1f2937;
    color: #3b82f6;
    transform: translateX(5px);
}


/* === DASHBOARD SPECIFIC STYLES === */
.dashboard-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #f9fafb;
    position: relative;
    letter-spacing: -0.05em;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.dashboard-header h1::after {
    /*content: '';*/
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #9333ea);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    animation: pulse 2s infinite ease-in-out;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.4);
}

.card::before {
    
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title.dashboard {
    font-size: 1rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.card-icon {
    color: #3b82f6;
    width: 1.5rem;
    height: 1.5rem;
}

.card-value {
    font-size: 3rem;
    font-weight: 700;
    color: #f9fafb;
    margin-top: 1rem;
    animation: slideIn 0.8s ease-out;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.card-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.trend-up {
    color: #4ade80;
}

.trend-down {
    color: #f87171;
}

.trend-stable {
    color: #9ca3af;
}

.chart-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.progress-circle-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    background: conic-gradient(
        #9333ea 0deg,
        #3b82f6 75%,
        rgba(42, 42, 42, 0.5) 75%,
        rgba(42, 42, 42, 0.5) 100%
    );
    border-radius: 50%;
    animation: rotateGradient 4s linear infinite;
}

.progress-circle-container::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    background-color: #151515;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.progress-circle-text {
    position: relative;
    font-size: 2.8rem;
    font-weight: 600;
    color: #f9fafb;
    z-index: 1;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.chart-description {
    margin-top: 1rem;
    font-size: 1rem;
    color: #9ca3af;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.bar-chart-card {
    grid-column: 1 / -1;
}

.bar-chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 150px;
    gap: 1rem;
    padding-top: 1rem;
}

.bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 15%;
    position: relative;
}

.bar {
    width: 100%;
    background-color: #3b82f6;
    border-radius: 6px 6px 0 0;
    transition: height 0.5s ease-out;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    animation: barRise 1.5s ease-in-out forwards;
}

.bar-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.recent-activity-card {
    grid-column: 1 / -1;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.activity-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: rgba(59, 130, 246, 0.2);
}

.activity-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #3b82f6;
}

.activity-content {
    flex-grow: 1;
}

.activity-title {
    font-size: 1rem;
    font-weight: 500;
    color: #f9fafb;
    margin: 0;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.activity-details {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.activity-time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #6b7280;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.member-list-card {
    grid-column: 1 / -1;
}

.member-list-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.member-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    transition: all 0.3s ease;
}

.member-list-header:hover {
    background-color: rgba(21, 21, 21, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.member-list-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(21, 21, 21, 0.5);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}

.member-list-item:hover {
    background-color: rgba(21, 21, 21, 0.8);
    border: 1px solid rgba(42, 42, 42, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.member-list-item:nth-of-type(even) {
    background-color: rgba(21, 21, 21, 0.2);
}

.member-name {
    font-weight: 600;
    color: #f9fafb;
    transition: color 0.3s ease;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* New Roster styling for cool_profile.html */
.roster-card {
    padding: 2rem;
}

.roster-list-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.roster-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    transition: all 0.3s ease;
}

.roster-list-header:hover {
    background-color: rgba(21, 21, 21, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.roster-list-header .sort-button {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-transform: inherit;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.roster-list-header .sort-button:hover,
.roster-list-header .sort-button.active {
    color: #f9fafb;
    transform: translateY(-2px);
}

.roster-list-header .sort-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: #6b7280;
    transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.roster-list-header .sort-button.active .sort-icon {
    opacity: 1;
}

.roster-list-header .sort-button.sort-asc .sort-icon {
    transform: rotate(90deg);
}

.roster-list-header .sort-button.sort-desc .sort-icon {
    transform: rotate(-90deg);
}


.roster-list-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(21, 21, 21, 0.5);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.roster-list-item:hover {
    background-color: rgba(21, 21, 21, 0.8);
    border: 1px solid rgba(42, 42, 42, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.roster-list-item:nth-of-type(even) {
    background-color: rgba(21, 21, 21, 0.2);
}

.member-name {
    font-weight: 600;
    color: #f9fafb;
    transition: color 0.3s ease;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* === USER DROPDOWN SPECIFIC STYLES === */
.user-menu-container {
    position: relative;
    list-style: none;
}

.user-menu-toggle {
    font-size: 1rem;
    font-weight: 500;
    color: #f9fafb;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(21, 21, 21, 0.7);
    border: 1px solid rgba(42, 42, 42, 0.5);
    transition: background-color 0.3s ease;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.user-menu-toggle:hover {
    background-color: rgba(21, 21, 21, 1);
}

.user-dropdown-menu {
    left: auto;
    right: 0;
    padding: 0;
    width: 200px;
    list-style: none;
}

.user-dropdown-menu li {
    list-style: none;
}

.user-dropdown-menu a {
    padding: 0.75rem 1.5rem;
    transition: background-color 0.3s ease;
}

.dropdown-footer {
    border-top: 1px solid #2a2a2a;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-footer a {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* === STYLED LINKS FOR TITLES === */
.card-title a.styled-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a.styled-link:hover {
    color: #3b82f6;
}

/* NEW STYLES for Clan Details */
.clan-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.clan-details-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.clan-details-list .detail-label {
    font-weight: 600;
    color: #f9fafb;
}

.clan-details-list .detail-value {
    flex-grow: 1;
    text-align: right;
    color: #e5e7eb;
}

/* NEW STYLES for Allies */
.allies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ally-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(21, 21, 21, 0.7);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(42, 42, 42, 0.5);
}

.ally-item:hover {
    transform: translateY(-3px);
    background-color: rgba(21, 21, 21, 0.85);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.ally-name {
    font-weight: 600;
    color: #f9fafb;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.ally-members {
    font-size: 0.875rem;
    color: #9ca3af;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}


/* NEW TEAM AREA STYLES */
.teams-card {
    padding: 2rem;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.team-item {
    background-color: rgba(21, 21, 21, 0.5);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.team-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    padding-bottom: 1rem;
}

.team-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f9fafb;
    margin: 0;
}

.team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #3b82f6;
}

/* New sorting header for each team */
.member-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
}

.member-list-header .sort-button {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-transform: inherit;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.member-list-header .sort-button:hover,
.member-list-header .sort-button.active {
    color: #f9fafb;
    transform: translateY(-2px);
}

.member-list-header .sort-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: #6b7280;
    transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.member-list-header .sort-button.active .sort-icon {
    opacity: 1;
}

.member-list-header .sort-button.sort-asc .sort-icon {
    transform: rotate(90deg);
}

.member-list-header .sort-button.sort-desc .sort-icon {
    transform: rotate(-90deg);
}


/* User list styling */
.team-members-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
    padding-bottom: 1rem;
}

.sortable-members {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
}

.team-members-list li, .sortable-members li {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #c0c0c0;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* Hover effect */
.team-members-list li:hover, .sortable-members li:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

/* Fixed leader and co-leader styling */
.team-leader {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b;
    font-weight: 700;
}

.co-leader {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6;
    font-weight: 600;
}

.member-name {
    font-weight: 500;
    color: #f9fafb;
}

.member-role {
    font-style: italic;
    color: #9ca3af;
}

.member-status {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.member-status.active {
    background-color: rgba(76, 209, 55, 0.2);
    color: #4ade80;
}

.member-status.inactive {
    background-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.member-status.on-leave {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}
/* === SIGN IN SPECIFIC STYLES === */

/* Updated Container for Split Screen */
.split-screen-container {
    display: flex;
    /* MODIFIED: This is the critical change. It tells this container to grow 
       and take up all available vertical space below the header. */
    flex-grow: 1; 
    min-height: 0; /* Important for flex children */
    width: 100%;
}

.left-visual-panel {
    /* MODIFIED: Inherit flex-grow to ensure it takes up its share of the height */
    flex: 1 1 50%;
    /* MODIFIED: Allow the panel to scroll its own content if necessary */
    overflow-y: auto; 
    background: url('https://placehold.co/800x1200/1a1a1a/e5e7eb?text=Connect+%26+Compete') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4rem;
    box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.5);
}

.left-visual-content {
    color: #f9fafb;
    text-align: center;
    z-index: 10;
    max-width: 80%;
}

.left-visual-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.left-visual-content p {
    font-size: 1.1rem;
    color: #c0c0c0;
    line-height: 1.5;
}

.right-form-panel {
    /* MODIFIED: Inherit flex-grow to ensure it takes up its share of the height */
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: #0d0d0d;
    /* MODIFIED: Allow this panel to scroll if the form is too tall for the viewport */
    overflow-y: auto; 
}

.signin-container {
    width: 100%;
    max-width: 450px; /* Slightly wider max width for form */
    margin: 0; /* Remove top margin */
    padding: 0;
    text-align: center;
}

.signin-card {
    background-color: rgba(21, 21, 21, 0.9);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 1rem; /* Smaller radius to fit a more compact style */
    padding: 2.5rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.signin-card:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(59, 130, 246, 0.4);
    transform: none; /* Remove hover transform on card in the form panel */
}

.signin-card::before {
    /*content: '';*/
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    opacity: 0.3;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.signin-card:hover::before {
    opacity: 0.5;
}

.signin-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 0.5rem;
    z-index: 1;
    position: relative;
}

.signin-subtitle {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 2rem;
    z-index: 1;
    position: relative;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
    z-index: 1;
    position: relative;
}

.form-group input,
.form-group select { /* ADDED SELECT HERE */
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    color: #f9fafb;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;

    /* Dropdown specific reset/style */
    appearance: none; /* Remove default arrow on some browsers */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%239ca3af" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus { /* ADDED SELECT HERE */
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f9fafb;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    background: linear-gradient(90deg, #3b82f6 0%, #9333ea 100%); /* Cool gradient button */
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 1rem;
    z-index: 1;
    position: relative;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.7);
}

.forgot-password {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 1;
    position: relative;
}

.forgot-password:hover {
    color: #3b82f6;
}

/* === Multi-Step Form Logic Fixes === */
.form-step {
    /* Set display to none by default, overridden by JS for the active step */
    display: none;
    /* Animation for smooth transitions (optional but nice) */
    opacity: 0;
    transition: opacity 0.5s ease;
}

.form-step.active {
    display: block; /* MUST be block or similar to take up vertical space */
    opacity: 1;
}

/* === MODAL STYLES (COMMON) === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.modal-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.modal-box {
    background-color: #151515;
    border-radius: 1rem;
    border: 1px solid rgba(42, 42, 42, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    padding: 2rem;
    width: 90%;
    max-width: 600px; /* Slightly wider for grid content */
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 80vh; 
    overflow-y: auto;
}

.modal-overlay.visible .modal-box {
    transform: translateY(0);
}

.modal-content {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 0 0 0.5rem 0;
}

.modal-message {
    font-size: 1rem;
    color: #c0c0c0;
    margin: 0;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-button {
    flex-grow: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-button.modal-cancel {
    background-color: #424242;
    color: #f9fafb;
}

.modal-button.modal-yes {
    background-color: #3b82f6;
    color: white;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-button.modal-yes:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Styles specific to the textarea in the Post modals */
.modal-textarea:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

/* NEW: Styles for the Report Modal */
.modal-report-post .modal-box {
    padding: 1.5rem; /* Slightly smaller padding for denser content */
}
.modal-report-post .modal-content {
    text-align: left;
}

/* Styles for radio buttons in report form */
.report-reasons input[type="radio"] {
    /* Reset default input styles to look cleaner */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #3b82f6;
    border-radius: 50%;
    margin: 0;
    vertical-align: middle;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.report-reasons input[type="radio"]:checked {
    background-color: #f87171; /* Highlight checked with red/warning color */
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.3);
}

/* Style for action buttons in report success state */
.report-success-content .action-button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    color: white;
    box-shadow: none;
}
.report-success-content .action-button:hover {
    transform: translateY(-3px);
}
.report-success-content .block-user:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}
.report-success-content .unfollow-user:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}


/* Battle History Container fixes */
.battle-history-container {
    padding: 1.5rem;
    overflow: hidden;
}
.scroll-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
}
.scroll-container::-webkit-scrollbar {
    height: 8px;
}
.scroll-container::-webkit-scrollbar-thumb {
    background-color: #3b82f6;
    border-radius: 4px;
}
.battle-card {
    min-width: 250px;
    background-color: rgba(21, 21, 21, 0.7);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.battle-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.battle-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}
.battle-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.team-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e5e7eb;
}
.winner-team {
    color: #3b82f6;
    font-weight: 700;
}
.vs-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
}
.battle-score {
    font-size: 2rem;
    font-weight: 700;
    color: #4ade80;
}


/* === GAME FILTER MODAL STYLES (REDESIGN) === */

/* Clan Search Specific Styles (Minimal additions, relying mostly on existing CSS) */
.search-grid {
    display: grid;
    grid-template-columns: 1fr 3fr; /* Filter sidebar on the left, wider results on the right */
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
}

.filter-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem; /* Keeps sidebar visible while scrolling results */
    height: fit-content;
}

.filter-card {
    padding: 1.5rem;
}

.filter-card .form-group {
    margin-bottom: 1.25rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #c0c0c0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.checkbox-group input[type="checkbox"] {
    /* Basic styling to replace default checkboxes */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    margin-right: 0.5rem;
    cursor: pointer;
    position: relative;
    background-color: #0d0d0d;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.clan-result-card {
    position: relative; /* Establish positioning context for children */
    overflow: hidden; /* Ensure banner doesn't spill out */
    border-radius: 1rem;
    background-color: rgba(21, 21, 21, 0.7);
    border: 1px solid rgba(42, 42, 42, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    padding: 0; /* Remove padding here, it will be on inner content */
    display: flex; /* Flexbox for internal content */
    flex-direction: column; /* Stack banner and content vertically */
}

.clan-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 10px rgba(59, 130, 246, 0.2);
}

.clan-banner-bg {
    width: 100%;
    height: 120px; /* Fixed height for the banner */
    background-position: center top; /* Focus on the top part of the image */
    background-size: cover;
    border-radius: 1rem 1rem 0 0; /* Rounded top corners, sharp bottom */
    position: relative;
    z-index: 1;
    /* Apply a slight overlay for text readability */
    box-shadow: inset 0 -40px 50px rgba(0, 0, 0, 0.8);
}

.clan-content-wrapper {
    display: flex;
    align-items: flex-start; /* Align avatar and text to top */
    gap: 1.5rem;
    padding: 1.5rem; /* Apply padding to the content wrapper */
    position: relative; /* Keep content over banner */
    z-index: 2; /* Ensure content is above banner */
    background-color: rgba(21, 21, 21, 0.8); /* Semi-transparent background for readability */
    border-radius: 0 0 1rem 1rem; /* Rounded bottom corners */
    margin-top: -30px; /* Pull content up over the banner */
    padding-top: 1rem; /* Adjust top padding */
}


.clan-info-header {
    display: flex;
    flex-direction: column;
}

.clan-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #3b82f6;
    flex-shrink: 0;
    margin-top: -20px; /* Pull the logo up to overlap the banner */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.clan-name-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9fafb;
    line-height: 1.2;
}

.clan-tag {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
}

.clan-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: #c0c0c0;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4ade80; /* Success/Active Color */
}

/* NEW STAND-OUT BUTTON STYLE */
.create-clan-button {
    /* Inherits most style from submit-button/card but overrides color/shadow */
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 0.75rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block; /* Make it a block-level link/button */
    text-decoration: none;
    
}

.create-clan-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.7);
}

/* Styling the button that opens the modal */
.modal-open-button {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    color: #f9fafb;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-open-button:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.modal-open-button .count {
    font-weight: 700;
    background-color: #3b82f6;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.85rem;
}

/* Modal search and selected area */
.selected-games-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    min-height: 20px;
}

.game-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer; /* Chip is clickable to deselect */
}

/* Game Grid Styling (Modern look) */
.game-list-container {
    max-height: 400px; /* Increased height for better browsing */
    overflow-y: auto;
    padding-right: 10px; 
    margin-top: 1rem;
    padding-top: 1rem;
}

#game-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* Use grid for masonry effect */
    gap: 1rem;
}

.game-list-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 0.75rem;
    background-color: rgba(21, 21, 21, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    padding: 0; /* Content padding is internal */
    overflow: hidden;
    border: 2px solid transparent;
}

.game-list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: #3b82f6;
}

.game-list-item.selected {
    border-color: #4ade80; /* Highlight selected item */
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
}

.game-item-content {
    display: block;
    width: 100%;
    padding: 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
}

.game-icon-bg {
    width: 100%;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 0.75rem 0.75rem 0 0;
    position: relative;
}

.game-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f9fafb;
    padding: 0.75rem 0.5rem;
    width: 100%;
    background-color: rgba(21, 21, 21, 0.9);
    border-radius: 0 0 0.75rem 0.75rem;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(59, 130, 246, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none; /* Allows click-through to the underlying list item */
}

.game-list-item.selected .selection-overlay {
    opacity: 1;
}

.selection-overlay svg {
    width: 3rem;
    height: 3rem;
    color: #4ade80;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 0.5rem;
}

/* Checkbox hide */
.game-list-item input[type="checkbox"] {
    display: none;
}

/* Styling the generic form inputs outside the modal, to maintain consistency */
.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    color: #f9fafb;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    /* Dropdown specific styles are already included */
}

 /* Style for the new standalone TOC link */
        .standalone-toc-link {
            display: block;
            text-align: center;
            font-size: 0.9rem;
            margin-top: 1rem;
            margin-bottom: 1rem;
            color: #9ca3af;
            text-decoration: none;
        }
        .standalone-toc-link:hover {
            color: #3b82f6;
            text-decoration: underline;
        }

/* === ANIMATIONS === */
@keyframes pulse {
    0% {
        transform: scaleX(1);
        opacity: 0.8;
    }
    50% {
        transform: scaleX(1.1);
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 0.8;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rotateGradient {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes barRise {
    from {
        height: 0;
    }
}

/* === MEDIA QUERIES FOR RESPONSIVENESS === */
@media (min-width: 768px) {
    .social-grid {
        grid-template-columns: 1fr 2fr;
    }
    .grid-container.three-column {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Hide the mobile toggle button on desktop */
    #mobile-menu-toggle {
        display: none;
    }
    
    /* Ensure desktop menu elements display correctly (reset mobile styling) */
    .nav-menu {
        /* Reset mobile overlay behavior */
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        padding: 0;
        transition: none;
        transform: none;
        z-index: auto;
    }
    
    .main-nav-links-wrapper {
        display: flex;
        align-items: center;
        gap: 2rem;
        width: auto;
        transition: none;
        transform: none;
    }
    
    .nav-menu > .main-nav-links-wrapper > ul {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
    }
    
    /* Reposition Notification and User Menu on Desktop */
    /* They are now side-by-side with the main nav links, automatically positioned by .site-header's flex */
    .site-header {
        /* Reset mobile layout/order */
        flex-direction: row;
        gap: 2rem;
    }
    .notification-container,
    .user-menu-container {
        /* Reset mobile width */
        width: auto; 
    }
}

/* Mobile Breakpoint (<= 768px) */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    /* NEW: Display the hamburger toggle button */
    #mobile-menu-toggle {
        display: flex;
        background: none;
        border: none;
        color: #f9fafb;
        padding: 0.5rem;
        cursor: pointer;
        z-index: 200;
    }
    #mobile-menu-toggle svg {
        width: 1.5rem;
        height: 1.5rem;
        transition: transform 0.3s ease;
    }
    #mobile-menu-toggle.active svg {
        transform: rotate(90deg); /* Optional visual cue */
    }

    .site-header {
        flex-direction: row;
        /* Ensure logo is left, utilities are centered, and toggle is right on mobile header line */
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: none;
        margin: 0 auto 1.5rem auto; 
        padding: 1rem 0;
        /* Add gap between user and notification items */
        gap: 0.5rem;
    }
    
    /* FIX: Make the navigation container a full-screen, hidden overlay */
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100vw;
        background-color: #0d0d0d;
        z-index: 150;
        transform: translateX(100%); /* Start off-screen */
        transition: transform 0.4s ease-in-out;
    }
    
    /* Show the menu when the .menu-open class is applied by JS */
    .nav-menu.menu-open {
        transform: translateX(0); 
    }
    
    /* FIX: Style the contents of the mobile menu */
    .main-nav-links-wrapper {
        /* Ensure content takes full height of the visible menu area */
        height: 100%;
        box-sizing: border-box;
        overflow-y: auto;
        /* Layout */
        display: flex; /* <-- FIX: Ensure display is set to show content */
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 60px 2rem 2rem 2rem; /* Clear space for logo/hamburger area */
        gap: 1.5rem;
    }

    .main-nav-links-wrapper > ul {
        display: flex;
        flex-direction: column; 
        width: 100%;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(42, 42, 42, 0.5);
        margin: 0;
    }
    
    .main-nav-links-wrapper > ul li {
         /* Remove default list styling that shows dots on mobile */
        list-style-type: none !important; 
    }

    .main-nav-links-wrapper > ul a {
        font-size: 1.25rem;
        padding: 0.75rem 0;
    }

    /* Utility containers stack vertically in the overlay */
    /* They are now outside the main nav, but need subtle alignment in the mobile header row */
    .notification-container,
    .user-menu-container {
        position: static;
        /* Reduced size on mobile to fit the header row better */
        width: auto; 
    }
    
    .user-menu-container .user-menu-toggle {
        /* Reset desktop width styling */
        width: auto;
        padding: 0.5rem;
    }
    
    /* FIX 4: Center and size the notification dropdown better */
    .notification-dropdown {
        position: fixed;
        top: 60px; /* Below the main header area */
        bottom: 0;
        height: calc(100vh - 60px); 
        width: 95vw; /* Use viewport width */
        max-width: 400px;
        right: 50%;
        left: 50%;
        transform: translateX(-50%) scale(0.95);
        transform-origin: top center;
        padding: 1.5rem;
        border-radius: 0.5rem;
    }

    .notification-dropdown.active {
        transform: translateX(-50%) scale(1);
    }
    
    /* Ensure the mobile nav slides out *from* the right */
    .nav-menu.menu-open {
        transform: translateX(0); 
    }
    /* When closed, hide notifications entirely if they are part of the hidden menu */
    .nav-menu:not(.menu-open) .notification-dropdown.active {
        visibility: hidden;
        opacity: 0;
    }
    
    /* General mobile cleanup */
    .profile-banner {
        height: 200px;
        border-radius: 0.75rem;
    }

    .social-grid {
        grid-template-columns: 1fr;
        margin-top: 5rem;
    }
    
    /* Mobile-specific adjustments for elements previously missed */
    .member-spotlight-list {
        grid-template-columns: 1fr;
    }

    .clan-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .member-list-header {
        display: none;
    }
    .member-list-item {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Post card adjustments */
    .post-header {
        align-items: center;
    }
    .post-meta-area {
        align-items: center;
    }
    .post-options-menu {
        right: 0;
        top: 90%; 
    }
}
/* Added for extra small screens/devices */
@media (max-width: 500px) {
    .signin-container {
        padding: 0.5rem;
        margin-top: 0;
    }
    .signin-card {
        padding: 1.5rem;
    }
    .left-visual-panel {
        padding: 1rem;
    }
    .left-visual-content h2 {
        font-size: 1.5rem;
    }
}