/* Global Styles - Modern Aesthetic */
body {
    background-color: #000010; /* Deep, rich dark background */
    color: #E0E0E0; /* Soft off-white for text */
    font-family: 'Inter', sans-serif; /* Modern, clean font (or 'Roboto', 'Open Sans') */
    margin: 0;
    padding: 0;
    line-height: 1.7; /* Enhanced readability */
    scroll-behavior: smooth; /* Smooth scrolling for anchors */

    /* --- ADDED FOR TEXT OVERFLOW HANDLING --- */
    overflow-x: hidden; /* Prevents horizontal scrolling from any accidental overflow */
    word-wrap: break-word; /* Old property, widely supported */
    overflow-wrap: break-word; /* Newer, preferred property for long words/strings */
}

a {
    text-decoration: none;
    color: #4CAF50; /* Vibrant green for links */
    transition: color 0.3s ease, transform 0.2s ease; /* Smooth transition with slight hover effect */
}

a:hover {
    color: #8BC34A; /* Lighter green on hover */
    transform: translateY(-1px); /* Slight lift */
}

/* Ensure images and other embedded media don't overflow their containers */
img, video, embed, object, iframe { /* Added video, embed, object, iframe for completeness */
    max-width: 100%;
    height: auto;
    display: block; /* Helps remove extra space below images */
}


/* Container for general content */
.container {
    max-width: 1200px;
    margin: 30px auto; /* More generous margin */
    padding: 25px;
    box-sizing: border-box; /* Include padding in width */
}

/* Header - Sleek and Sticky */
header {
    background: #001200; /* Semi-transparent background for modern feel */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    padding: 18px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* Deeper shadow */
    position: sticky;
    top: 0;
    z-index: 1000; /* High z-index */
    border-bottom: 1px solid rgba(76, 175, 80, 0.3); /* Subtle border for definition */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px; /* More padding for header content */
    max-width: 1300px; /* Slightly wider header container */
    margin: 0 auto;
}

header h1 {
    font-size: 2rem;
    color: #8BC34A; /* Prominent green for title */
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 0 15px rgba(139, 195, 74, 0.3); /* Glowing effect */
}

header nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex; /* Ensures nav items are in a row */
    align-items: center;
    gap: 25px; /* Increased spacing between nav items */
}

header nav ul li a {
    font-size: 1.05rem;
    color: #C0C0C0; /* Slightly muted for subtle navigation */
    padding: 10px 18px;
    border-radius: 8px; /* Softer rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
    position: relative; /* For underline effect */
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

header nav ul li a:hover::after {
    width: calc(100% - 20px); /* Dynamic underline */
}

header nav ul li a:hover {
    background-color: rgba(76, 175, 80, 0.15); /* More pronounced hover background */
    color: #E0E0E0;
    transform: translateY(-2px); /* Lift effect */
}

/* Container for the right-side icons and profile dropdown */
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px; /* Spacing between icons and profile */
}

.header-icons a { /* Styles for chat and notification icons */
    color: #E0E0E0; /* Icon color */
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 8px; /* Give clickable area */
    border-radius: 50%; /* Make it round */
}

.header-icons a:hover {
    color: #8BC34A; /* Lighter green on hover */
    transform: translateY(-1px); /* Slight lift */
    background-color: rgba(76, 175, 80, 0.1); /* Subtle background on hover */
}

/* Profile Picture (Header) */
/* The .pfp class is used in two places: the main profile pic in the header and the default initial fallback */
.pfp {
    width: 40px; /* Slightly larger */
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 3px solid #4CAF50; /* Stronger border */
    object-fit: cover;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5); /* Subtle glow */
}

/* Specific styles for the PFP within the profile dropdown toggle */
.profile-dropdown .pfp {
    width: 35px; /* Adjust size to fit header better */
    height: 35px;
    border-width: 2px; /* Thinner border */
    margin-right: 8px; /* Space between pfp and username */
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5); /* Less intense glow */
}

/* Fallback for default profile pic initial in the dropdown */
.profile-dropdown .pfp.default-pfp {
    border-radius: 50%;
    background-color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: #fff;
    border: 2px solid #4CAF50; /* Ensure border is consistent */
}

/* Profile Dropdown specific styling */
.profile-dropdown {
    position: relative;
    cursor: pointer;
    display: flex; /* Ensures profile pic and name are inline */
    align-items: center;
}

.profile-dropdown > .profile-toggle { /* Target the direct link for profile */
    display: flex;
    align-items: center;
    color: #E0E0E0; /* Username color */
    padding: 8px 15px; /* Padding for the clickable area of the profile */
    border-radius: 8px;
    transition: background-color 0.3s ease;
    text-decoration: none; /* Remove underline from the profile link */
}

.profile-dropdown > .profile-toggle:hover {
    background-color: rgba(76, 175, 80, 0.1); /* Hover for the profile link */
}

.profile-dropdown .username-display {
    font-weight: 500;
    font-size: 1rem;
}

/* Dropdown Content */
header .profile-dropdown .dropdown-content { /* More specific selector to ensure override */
    display: none;
    position: absolute;
    background-color: #2E2E4A; /* Matches card background */
    min-width: 220px; /* Wider dropdown */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 10;
    right: 0; /* Align to the right of the trigger */
    top: calc(100% + 10px); /* Position below the header item */
    padding: 10px 0;
    border-radius: 8px; /* Softer corners */
    border: 1px solid rgba(76, 175, 80, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show dropdown on hover (for larger screens) or 'active' class (for JS toggle) */
header .profile-dropdown:hover .dropdown-content, /* Specific selector for hover */
header .profile-dropdown.active .dropdown-content { /* For JS toggle if implemented */
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* MODIFIED FOR DROPDOWN HEADER FIX (Username and Role Alignment) */
header .profile-dropdown .dropdown-header {
    padding: 10px 25px; /* Consistent padding with links */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator line */
    margin-bottom: 5px; /* Space below the header */
    text-align: left; /* Ensure text alignment */
    line-height: 1.2; /* Adjust line height for stacked text */
    word-wrap: break-word; /* Allow long names to wrap */
    overflow-wrap: break-word; /* Modern equivalent */
}

/* Style for the username (assuming it's in a <span> tag) */
header .profile-dropdown .dropdown-header span {
    display: block; /* Ensures username takes its own line */
    color: #8BC34A; /* Prominent color for the username */
    font-size: 1.1rem; /* Slightly larger font for username */
    font-weight: 600; /* Bolder username */
}

/* Style for the role (the <p> tag inside .dropdown-header) */
header .profile-dropdown .dropdown-header p {
    margin: 5px 0 0 0; /* Space above role, no bottom margin */
    font-size: 0.85rem; /* Smaller font for the role */
    color: #D0D0D0; /* Muted color for the role */
    font-weight: 400; /* Normal weight for role */
    white-space: normal; /* Allow role to wrap if long */
}
/* END MODIFICATION FOR DROPDOWN HEADER FIX */


header .profile-dropdown .dropdown-content a {
    color: #E0E0E0;
    padding: 12px 25px; /* More padding for links */
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1rem;
}

header .profile-dropdown .dropdown-content a:hover {
    background-color: #4CAF50; /* Stronger hover color */
    color: #FFFFFF; /* White text on hover */
    border-radius: 0; /* Remove specific border radius here */
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 0; /* Space around the divider */
}

/* Search button styling */
.search-form {
    margin-left: 10px; /* Space from other icons/profile */
    display: inline-block;
}

.search-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #E0E0E0; /* Icon color */
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.search-button:hover {
    color: #8BC34A; /* Lighter green on hover */
    transform: translateY(-1px); /* Slight lift */
    background: none; /* Ensure no background changes on hover for button */
    box-shadow: none; /* Remove any button shadows */
}

/* Adjust Login/Register buttons when not logged in */
.header-icons button {
    padding: 10px 20px; /* Slightly smaller buttons for header */
    font-size: 0.95rem;
}


/* Profile Card (Main Content) */
.profile-card {
    display: flex;
    background-color: #2E2E4A; /* Distinct background for cards */
    padding: 40px; /* More generous padding */
    border-radius: 12px; /* Softer corners */
    align-items: center;
    width: fit-content;
    margin: 50px auto; /* More vertical margin */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); /* Deeper, softer shadow */
    border: 1px solid rgba(76, 175, 80, 0.2); /* Subtle border */
}

.profile-image img {
    width: 200px; /* Larger image */
    height: 200px;
    border-radius: 15px; /* Slightly more rounded */
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.profile-image {
    flex-shrink: 0;
    margin-right: 40px; /* More space */
}

.profile-text h2 {
    color: #8BC34A;
    margin-bottom: 15px;
    font-size: 2.2rem; /* Larger heading */
    font-weight: 700;
    letter-spacing: 0.5px;
}

.profile-text p {
    margin: 10px 0;
    font-size: 1.15rem; /* Slightly larger text */
    line-height: 1.7;
    color: #D0D0D0; /* Slightly lighter text */
}


/* Footer - Minimalist */
footer {
    background: #000000; /* Matches body background */
    text-align: center;
    padding: 20px;
    color: #B0B0B0; /* Slightly lighter than body text */
    font-size: 0.95rem;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
    margin-top: 50px; /* Separation from content */
    border-top: 1px solid rgba(76, 175, 80, 0.1);
}

footer a {
    color: #4CAF50;
}

footer a:hover {
    color: #8BC34A;
}

/* Text Boxes and Dropdowns - Clean and Functional */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
input[type="number"] {
    background-color: #282842; /* Slightly darker input background */
    color: #E0E0E0;
    border: 1px solid #555577; /* Softer border color */
    padding: 12px 18px; /* More padding */
    margin: 10px 0;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px; /* Softer corners */
    font-size: 1.05rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus,
input[type="number"]:focus {
    border-color: #4CAF50; /* Vibrant focus border */
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4); /* Glowing focus shadow */
    background-color: #35355A; /* Slight background shift on focus */
}

textarea {
    resize: vertical;
    min-height: 180px; /* Taller textarea */
}

select option {
    background-color: #282842;
    color: #E0E0E0;
}

/* Note: direct hover on option is tricky cross-browser. */

input::placeholder,
textarea::placeholder {
    color: #999; /* Lighter placeholder */
    opacity: 0.8;
}

/* Custom autofill styling for modern browsers */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #282842 inset !important;
    -webkit-text-fill-color: #E0E0E0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Buttons - Dynamic and Engaging */
button {
    background: linear-gradient(135deg, #4CAF50, #8BC34A); /* Stronger, more distinct gradient */
    color: #FFFFFF; /* White text on buttons */
    border: none;
    padding: 14px 30px; /* More padding */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.05rem;
    border-radius: 8px; /* Softer corners */
    cursor: pointer;
    transition: background 0.4s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); /* Deeper shadow */
    font-weight: 600;
    letter-spacing: 0.2px;
}

button:hover {
    background: linear-gradient(135deg, #8BC34A, #4CAF50); /* Reversed gradient for active feel */
    transform: translateY(-3px); /* More pronounced lift */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */
}

button:active {
    background: linear-gradient(135deg, #388E3C, #4CAF50); /* Darker active state */
    transform: translateY(0); /* Press down effect */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

button:disabled {
    background: #444455;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Checkboxes - Custom Styled */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px; /* Slightly larger */
    height: 24px;
    border: 2px solid #4CAF50; /* Vibrant border */
    border-radius: 6px; /* Softer corners */
    background-color: #282842; /* Matches input background */
    cursor: pointer;
    position: relative;
    outline: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="checkbox"]:checked {
    background-color: #4CAF50; /* Fills with vibrant green */
    border-color: #4CAF50;
}

input[type="checkbox"]:checked::before {
    content: '\2713'; /* Checkmark icon */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF; /* White checkmark */
    font-size: 1.3rem; /* Larger checkmark */
    font-weight: bold;
}

input[type="checkbox"]:focus {
    border-color: #8BC34A; /* Lighter border on focus */
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

/* Number Inputs with Buttons */
.number-input-container {
    display: flex;
    align-items: stretch; /* Stretch items to fill height */
    border: 1px solid #555577;
    border-radius: 8px;
    overflow: hidden;
    background-color: #282842;
    margin: 10px 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.number-input-container:focus-within {
    border-color: #4CAF50;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
    background-color: #35355A;
}

.number-input-container input[type="number"] {
    border: none;
    padding: 12px 18px;
    margin: 0;
    flex-grow: 1; /* Allow input to take available space */
    box-sizing: border-box;
    font-size: 1.05rem;
    outline: none;
    background-color: transparent;
    color: #E0E0E0;
    text-align: center; /* Center the number */
}

/* Hide default number input arrows for a cleaner look */
.number-input-container input[type="number"]::-webkit-inner-spin-button,
.number-input-container input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.number-input-container input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

.number-input-container button {
    background: #444455; /* Simpler background for buttons */
    color: #E0E0E0;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    font-size: 1.2rem; /* Larger icons/text for buttons */
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: 0; /* Remove internal border-radius */
    box-shadow: none; /* No shadow on these internal buttons */
    flex-shrink: 0; /* Prevent shrinking */
}

.number-input-container button:first-of-type {
    border-right: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.number-input-container button:last-of-type {
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.number-input-container button:hover {
    background: #4CAF50; /* Vibrant hover */
    color: #FFFFFF;
    transform: none; /* No lift */
}

.number-input-container button:active {
    background: #388E3C;
    color: #FFFFFF;
    transform: none;
}

/* --- ADDED FOR TABLE OVERFLOW HANDLING --- */
.table-responsive {
    overflow-x: auto; /* Adds horizontal scrollbar ONLY if table content overflows */
    -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS */
    margin-bottom: 25px; /* Add some space below the table */
    border-radius: 12px;
    background-color: #2E2E4A;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.table-responsive table {
    width: 100%; /* Make sure table tries to fill its container */
    border-collapse: collapse; /* Remove default table spacing */
    min-width: 600px; /* Optional: Set a minimum width for the table to ensure readability before scrolling */
}

.table-responsive th,
.table-responsive td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #D0D0D0;
    /* --- ADDED FOR LONG TEXT IN TABLE CELLS --- */
    word-break: break-all; /* Force breaks on long, unbroken strings */
    /* If you only want to break if the word can't fit: */
    /* overflow-wrap: break-word; */
}

.table-responsive th {
    background-color: #35355A;
    color: #8BC34A;
    font-weight: 600;
    font-size: 1.1em;
}

.table-responsive tr:last-child td {
    border-bottom: none;
}

/* Member Profile - Full Banner Integration */
.member-profile {
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    background-color: #2E2E4A; /* Card background */
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.banner-container {
    width: 100%;
    height: 300px; /* Fixed height for consistent banner */
    overflow: hidden;
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.banner-pic {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: brightness(0.7) blur(2px); /* Slightly darken and blur banner */
    transition: filter 0.3s ease;
}

.banner-pic:hover {
    filter: brightness(0.8) blur(0);
}

.profile-content {
    display: flex;
    position: relative;
    padding: 30px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 0 0 12px 12px;
    margin-top: -100px; /* This will still determine how much the entire content block overlaps */
    align-items: flex-start; /* Align children to the top */
    /* Remove any align-self on profile-picture-container if it was there */
}

.profile-picture-container {
    flex-shrink: 0;
    margin-right: 30px;
    position: relative;
    z-index: 3;
    margin-top: -80px; /* Adjust this value as needed to control vertical overlap with the banner */
    /* If you want it completely at the top of the .profile-content with no overlap, set margin-top: 0; */
}

.profile-pic {
    width: 180px; /* Larger main profile pic */
    height: 180px;
    border-radius: 50%;
    border: 5px solid #000000; /* Border matches body background */
    outline: 3px solid #4CAF50; /* Vibrant outline */
    object-fit: cover;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.7); /* Stronger glow for main pic */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.03); /* Slight zoom on hover */
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.9);
}

.profile-details {
    flex-grow: 1;
    color: #E0E0E0;
    padding-bottom: 20px; /* Space below details */
}

.profile-details h2 {
    font-size: 2.5rem;
    color: #777777;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(119, 119, 119, 0.3);
}

.profile-details p {
    font-size: 1.1rem;
    margin: 5px 0;
    color: #D5D5D5;
}

/* Details and Summary (Accordion/Collapsible) - Modern Accordion */
details {
    background-color: #2E2E4A; /* Matches card background */
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 10px; /* Softer corners */
    margin: 15px 0; /* More margin */
    padding: 0; /* No initial padding */
    color: #E0E0E0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

summary {
    font-weight: 600;
    cursor: pointer;
    padding: 15px 20px; /* More padding */
    list-style: none;
    position: relative;
    color: #8BC34A; /* Prominent summary title */
    font-size: 1.15rem;
    transition: background-color 0.3s ease;
}

summary:hover {
    background-color: rgba(76, 175, 80, 0.1); /* Subtle hover for summary */
    border-radius: 10px 10px 0 0; /* Only top corners rounded on hover */
}

summary::before {
    content: '\25BC'; /* Down arrow */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    font-size: 0.9em;
    color: #4CAF50;
}

details[open] summary::before {
    transform: translateY(-50%) rotate(180deg); /* Rotate arrow when open */
}

details[open] summary {
    border-bottom: 1px solid rgba(76, 175, 80, 0.3); /* Separator when open */
    background-color: #35355A; /* Slightly darker background when open */
    border-radius: 10px 10px 0 0;
}

details p, details div, details ul, details ol {
    padding: 15px 20px; /* More padding for content */
    margin: 0;
    line-height: 1.7;
    color: #D0D0D0;
}

details ul, details ol {
    padding-left: 40px; /* More indentation */
}

details li {
    margin-bottom: 8px; /* More space between list items */
}

details a {
    color: #4CAF50;
}

details a:hover {
    color: #8BC34A;
}

/* Example styling for nested details */
details details {
    margin-left: 20px;
    margin-right: 0;
    border: 1px solid #4A4A6A; /* Darker border for nested */
    background-color: #35355A; /* Darker background for nested */
    box-shadow: none; /* No extra shadow on nested */
}

details details summary {
    padding: 12px 15px;
    font-size: 1.05rem;
    color: #C0C0C0;
}

details details summary:hover {
    background-color: rgba(76, 175, 80, 0.08);
}

details details summary::before {
    right: 15px;
}

details details p, details details div, details details ul, details details ol {
    padding: 12px 15px;
}

/* Styling to remove the default marker from summary element */
summary::-webkit-details-marker {
    display: none;
}
summary::marker { /* For Firefox */
    display: none;
}


.note {
    margin-top: 25px;
    padding: 15px 20px;
    font-style: italic;
    color: #A0A0A0; /* Softer gray */
    background-color: #2E2E4A; /* Matches card background */
    border-left: 5px solid #4CAF50; /* Accent border */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Notifications Specific Styles */
.notifications-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #2E2E4A;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.notification-item {
    background-color: #35355A;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-left: 5px solid #4CAF50; /* Accent line */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notification-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.notification-item-content {
    flex-grow: 1;
}

.notification-item h3 {
    color: #8BC34A;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.notification-item p {
    color: #D0D0D0;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.notification-actions a {
    background-color: #388E3C;
    color: #FFFFFF;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.notification-actions a:hover {
    background-color: #4CAF50;
    transform: none; /* Override general link transform */
}

.no-notifications {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: #A0A0A0;
    background-color: #2E2E4A;
    border-radius: 10px;
    border: 1px dashed rgba(76, 175, 80, 0.3);
}

.alert-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    color: #FFFFFF;
    background-color: #4CAF50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 992px) { /* Adjust breakpoint for larger screens */
    header .container {
        padding: 0 20px;
    }

    header nav ul {
        gap: 15px;
    }

    header nav ul li a {
        padding: 8px 12px;
        font-size: 1rem;
    }

    .profile-card {
        padding: 30px;
        flex-direction: column;
        align-items: center;
        width: auto; /* Allow full width */
        margin: 30px 20px; /* More flexible margin */
    }

    .profile-image {
        margin-right: 0;
        margin-bottom: 30px; /* More space below image */
    }

    .profile-text {
        text-align: center;
    }

    .profile-text h2 {
        font-size: 1.8rem;
    }

    .profile-text p {
        font-size: 1rem;
    }

    .member-profile .profile-content {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        margin-top: -80px; /* Adjust overlap for smaller screens */
    }

    .member-profile .profile-picture-container {
        margin-right: 0;
        margin-bottom: 20px;
        margin-top: -100px; /* Adjust top pull for smaller screens */
    }

    .member-profile .profile-pic {
        width: 150px;
        height: 150px;
        border-width: 4px;
        outline-width: 2px;
    }

    .member-profile .profile-details {
        text-align: center;
        padding-bottom: 0;
    }

    .member-profile .profile-details h2 {
        font-size: 2rem;
    }

    .member-profile .profile-details p {
        font-size: 1rem;
    }

    /* Notifications Responsive */
    .notifications-container {
        padding: 20px;
        margin: 30px 20px;
    }

    .notification-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }

    .notification-actions {
        margin-top: 15px;
        width: 100%;
        text-align: right;
    }

    .notification-actions a {
        display: inline-block;
        width: auto;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }

    header h1 {
        margin-bottom: 15px;
        font-size: 1.6rem;
    }

    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 0;
        width: 100%; /* Take full width */
        gap: 8px; /* Less space between nav items */
    }

    header nav ul li {
        width: 100%;
        text-align: left;
    }

    header nav ul li a {
        padding: 10px 15px;
        width: calc(100% - 30px); /* Adjust for padding */
    }

    /* Adjust header icons and profile for smaller screens */
    .header-icons {
        width: 100%;
        justify-content: flex-start; /* Align icons to the left */
        margin-top: 10px; /* Space from main nav */
    }

    .header-icons .profile-dropdown {
        width: 100%; /* Allow profile dropdown to take full width for stacking */
        display: block; /* Change to block for stacking */
    }

    /* Hide the dropdown content by default on small screens, control with JS if needed */
    header .profile-dropdown .dropdown-content {
        position: static; /* Place dropdown inline */
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: transparent; /* Integrate seamlessly */
        margin-top: 5px;
        opacity: 1; /* Always visible if parent is hovered (or focus) for now */
        transform: none;
        padding: 0;
        display: none; /* Hide by default, will need JS to toggle */
    }
    header .profile-dropdown:hover .dropdown-content,
    header .profile-dropdown.active .dropdown-content { /* For JS toggle if used */
        display: block; /* Show if hovered or active */
    }

    header .profile-dropdown .dropdown-content a {
        padding: 8px 30px; /* Indent dropdown items */
        background-color: rgba(46, 46, 74, 0.8); /* Background for sub-items */
        border-radius: 5px;
        margin-bottom: 5px;
    }

    header .profile-dropdown .dropdown-content a:hover {
        background-color: #4CAF50;
    }

    .container {
        margin: 20px auto;
        padding: 15px;
    }

    /* Adjust main profile picture for smaller screens */
    .profile-card .profile-image img {
        width: 150px;
        height: 150px;
    }
    .profile-card .profile-image {
        margin-bottom: 20px;
    }

    .number-input-container button {
        padding: 12px 10px; /* Smaller button padding */
        font-size: 1rem;
    }

    details summary {
        font-size: 1.05rem;
        padding: 12px 15px;
    }

    details p, details div, details ul, details ol {
        padding: 12px 15px;
    }

    details ul, details ol {
        padding-left: 25px;
    }

    .note {
        margin-top: 20px;
        padding: 12px 15px;
    }

    /* Notifications Responsive */
    .notification-item h3 {
        font-size: 1.2rem;
    }

    .notification-item p {
        font-size: 0.95rem;
    }

    .notification-actions a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }
    header nav ul li a {
        font-size: 0.95rem;
        padding: 8px 10px;
    }

    .pfp {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }

    .profile-card {
        padding: 20px;
        margin: 20px 10px;
    }

    .profile-card .profile-image img {
        width: 120px;
        height: 120px;
    }

    .profile-text h2 {
        font-size: 1.5rem;
    }

    .profile-text p {
        font-size: 0.95rem;
    }

    .member-profile .profile-pic {
        width: 120px;
        height: 120px;
        border-width: 3px;
        outline-width: 1px;
    }

    .member-profile .profile-details h2 {
        font-size: 1.8rem;
    }
    .member-profile .profile-details p {
        font-size: 1rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select,
    input[type="number"] {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    button {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    input[type="checkbox"]:checked::before {
        font-size: 1rem;
    }

    /* Notifications Responsive */
    .notification-item h3 {
        font-size: 1.1rem;
    }

    .notification-item p {
        font-size: 0.9rem;
    }

    .notification-actions a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0; /* remove spacing between nav items */
    }

    .mobile-sitemap {
        order: -1;
        margin-bottom: 0.25rem;
    }

    .profile-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0.25rem;
        margin: 0;
    }

    .profile-container .pfp {
        margin: 0;
    }

    .username {
        white-space: nowrap;
        font-weight: 500;
    }

    .profile-icons {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        margin-left: auto;
    }

    /* Hide original envelope/bell */
    nav ul > li > a > .fas.fa-envelope,
    nav ul > li > a > .fas.fa-bell {
        display: none;
    }
}