/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Montserrat:wght@400;500;600&display=swap');

/* BASIC RESET & THEME */
:root {
    --primary-green: #556b2f;
    --dark-green: #2e4034;
    --background-dark: #1a2a26;
    --text-light: #f2f2f2;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.15);
    --module-bg: rgba(255, 255, 255, 0.05);
    --module-bg-hover: rgba(255, 255, 255, 0.1);
    --danger-red: #c0392b;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    margin: 0;
    /* THIS IS THE FIX: Match global fixed header spacing so content doesn't sit under the header */
    padding-top: 120px;
}

/* BACKGROUND CYCLER & OVERLAY */
#background-cycler {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
}
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 42, 38, 0.9), rgba(26, 42, 38, 0.7));
    z-index: -1;
}

/* 
   IMPORTANT: Header/Nav/Bell styles have been removed from this file to avoid conflicts.
   The page now fully inherits the global header styles from /static/css/style.css.
*/

/* MAIN LAYOUT */
.page-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* PAGE HEADER */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.page-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 3rem;
    margin: 0;
}
.action-btn {
    background-color: var(--primary-green);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* MODULES */
.friends-module {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.friends-module h2 {
    margin-top: 0;
    font-family: 'Merriweather', serif;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.loading-text {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

/* PENDING REQUESTS */
.requests-list {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-green) var(--background-dark);
}
.requests-list::-webkit-scrollbar { height: 8px; }
.requests-list::-webkit-scrollbar-track { background: var(--background-dark); }
.requests-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-green);
    border-radius: 10px;
    border: 2px solid var(--background-dark);
}

.request-card {
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    flex-shrink: 0;
    width: 150px;
    transition: transform 0.2s ease-in-out;
}
.request-card:hover { transform: translateY(-5px); }
.request-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    object-fit: cover;
}
.request-card h4 { margin: 0 0 1rem 0; font-weight: 500; }
.request-actions { display: flex; justify-content: space-around; }
.request-actions button {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 45%;
    transition: opacity 0.2s;
}
.request-actions button:hover { opacity: 0.8; }
.accept-btn { background-color: var(--primary-green); color: white; }
.decline-btn { background-color: #555; color: white; }

/* FRIENDS LIST */
.friend-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.friend-list-header input[type="search"] {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.2);
    color: var(--text-light);
    width: 250px;
    transition: width 0.3s ease-in-out;
}
.friend-list-header input[type="search"]:focus {
    width: 300px;
    outline: none;
    border-color: var(--primary-green);
}

.friend-category { margin-top: 2rem; }
#acquaintances-module {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}
.friend-category h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    color: var(--text-light);
    margin: 0 0 1rem 0;
}

.friend-row {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.2s, opacity 0.3s;
    border-bottom: 1px solid var(--border-color);
}
.friend-row:last-child { border-bottom: none; }
.friend-row:hover { background-color: var(--module-bg-hover); }
.friend-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    color: inherit;
    text-decoration: none;
}
.friend-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.friend-info h4 { margin: 0; font-weight: 500; }

.friend-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.privacy-dropdown select {
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
}

.management-menu { position: relative; }
.dots-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 5px; border-radius: 50%; line-height: 1; }
.dots-btn:hover { background-color: var(--module-bg-hover); }
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #3a3b3c;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    overflow: hidden;
    z-index: 10;
    min-width: 150px;
}
.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}
.dropdown-menu a:hover { background-color: var(--module-bg-hover); }
.dropdown-menu .danger { color: var(--danger-red); }
.dropdown-menu .danger:hover { color: var(--text-light); background-color: var(--danger-red); }

/* --- THIS IS THE FIX: Style for muted friends --- */
.friend-row.muted .friend-info {
    opacity: 0.6;
}
.friend-row.muted .friend-info h4 {
    font-style: italic;
}

/* --- THIS IS THE FIX: New styles for Blocked Users section --- */
#blocked-users-module {
    border-top: 1px solid var(--danger-red);
}

#blocked-users-module h2 {
    color: var(--danger-red);
}

.blocked-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 5px;
    border-bottom: 1px solid var(--border-color);
}
.blocked-user-row:last-child {
    border-bottom: none;
}

.blocked-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blocked-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
}

.blocked-user-info h4 {
    margin: 0;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: line-through;
}

.unblock-btn {
    background-color: #555;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.unblock-btn:hover {
    background-color: var(--primary-green);
}