    :root {
        --bs-body-font-family: 'Verdana', Roboto, sans-serif;
    }
    body { 
        font-family: 'Verdana', Roboto, sans-serif;
        font-size: 12px;
        background-color: #212529;
        }
    .btn:focus,
    .btn:active,
    .form-control:focus,
    input:focus {
        outline: none !important;
        box-shadow: none !important;
    }
    select:focus {
        outline: none !important;
        box-shadow: none !important;
    }
    footer {
        min-height: 55px;
        text-align: center;
        font-size: 12px;
        border-top: 1px solid #ccc;
        padding: 10px;
    }
    /*.container {
        margin-top: 50%;
        margin-right: 50%;
    }*/
    /* Base styles for all screen sizes */
.container {
  width: 100%;
  padding-right: var(--bs-gutter-x, 0.75rem);
  padding-left: var(--bs-gutter-x, 0.75rem);
  margin-right: auto;
  margin-left: auto;
}

/* Responsive Breakpoints */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

    .hidden-links {
        display: none;
    }
    .dropdown {
        position: relative;
        display: inline-block;
        float: right;
    }
    .icon-button {
        background-color: transparent;
        padding: 5px 5px;
        border: none;
        color: #FFF;
        cursor: pointer;
    }
    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #003747;
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        z-index: 9999;
        /*right: 0;*/
    }
    .dropdown-content a {
        color: #FFF;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
    }
    .dropdown-content a:hover {
        background-color: #065465;
        display: block;
        color: #FFF;
    }
    .dropdown:hover .dropdown-content {
        display: block;
    }
    .album_select {
        padding: 10px;
        width: 100%;
        border-bottom: 1px solid #495057;
    }
    .form-control {
        font-size: 12px;
    }
/* --- Floating Sidebar (Online Users) --- */
#chat-sidebar {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 280px;
    z-index: 9999; /* Ensure it's above everything else */
    max-height: 450px;
    display: flex;
    flex-direction: column;
}

#sidebar-content {
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
}

/* --- Chat Windows Container (Stacks to the Left) --- */
#chat-windows-container {
    position: fixed;
    bottom: 0;
    right: 310px; /* Offset by sidebar width + gap */
    z-index: 9998;
    display: flex;
    align-items: flex-end;
    pointer-events: none; /* Allows clicks to pass through empty space */
}

.chat-window {
    width: 320px;
    margin-right: 15px;
    pointer-events: auto; /* Re-enables clicks for the window itself */
    display: flex;
    flex-direction: column;
    border-bottom: 0 !important; /* Flush with bottom of screen */
}

/* --- Chat Message Bubbles --- */
.chat-body {
    height: 300px;
    overflow-y: auto;
    background-color: #000;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.msg-sent {
    background-color: #0d6efd; /* Bootstrap Primary Blue */
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg-received {
    background-color: #2c2c2e; /* Dark Gray for received */
    color: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

/* --- Utilities --- */
.x-small { font-size: 0.75rem; }
.cursor-pointer { cursor: pointer; }
.online-indicator {
    width: 10px;
    height: 10px;
    background-color: #28a745;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
}

/* Scrollbar Styling for Dark Theme */
.chat-body::-webkit-scrollbar { width: 5px; }
.chat-body::-webkit-scrollbar-track { background: #000; }
.chat-body::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; 
}

.chat-window .card-header { user-select: none; }
#chat-windows-container { pointer-events: none; }
.chat-window { pointer-events: auto; }


.profile-container {
    position: relative;
    display: inline-block; /* Keeps container same size as image */
    width: 200px;
    height: 200px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50px; /* Matching your original style */
    display: block;
}

.username-badge {
    position: absolute;
    bottom: 10px;    /* Adjust for vertical overlap amount */
    right: -10px;    /* Pulls it slightly off the edge to overlap */
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background for readability */
    color: white;
    padding: 4px 12px;
    border: 2px solid white; /* 2px white border */
    border-radius: 999px;    /* Creates the "pill" shape */
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;     /* Prevents name from wrapping */
}

.album-card { 
            transition: transform 0.2s ease, box-shadow 0.2s ease; 
            background-color: #1a1d20;
        }
        .album-card:hover { 
            transform: translateY(-5px); 
            box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important;
        }
        .thumb-container { 
            height: 180px; 
            overflow: hidden; 
            background: #2b3035; 
        }
        .thumb-container img { object-fit: cover; height: 100%; width: 100%; }
        .thumb-placeholder { 
            font-size: 2.5rem; 
            color: #495057; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            height: 100%; 
        }
        .search-container {
            background: linear-gradient(180deg, #1a1d20 0%, #0b0c0d 100%);
            padding: 60px 0;
            margin-bottom: 30px;
            border-bottom: 1px solid #2d3238;
        }
        .media-previews img {
    border-radius: 8px !important;
    transition: transform 0.2s;
    cursor: pointer;
}
.media-previews img:hover {
    transform: scale(1.05);
}
/* Comment Card Base Styling */
.card.bg-body-tertiary {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(4px); /* Glassmorphism effect */
}

/* Modern Hover Elevation */
.card.bg-body-tertiary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
}

/* Media Preview Styling */
.media-previews img, 
.media-previews .position-relative {
    border-radius: 12px;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.media-previews img:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
    border-color: var(--bs-primary);
}

/* Animations for Submission and Deletion */
.fade-in {
    animation: commentAppear 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes commentAppear {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}
        .hero-section {
            background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
            padding: 100px 0;
            border-bottom: 1px solid #333;
        }
        .feature-card {
            transition: transform 0.3s ease;
            background: #1e1e1e;
            border: 1px solid #333;
        }
        .feature-card:hover {
            transform: translateY(-10px);
            border-color: #0d6efd;
        }
         body { 
            background-color: #0d0d0d; 
            }
        .auth-card { 
            max-width: 450px; border: 1px solid #333; background: #1a1a1a; 
            }
        .form-control:focus { 
            box-shadow: none; 
            border-color: #0d6efd; 
            }
        .blur-content {
            filter: blur(15px) grayscale(50%); /* Intense blur to obscure content */
            transform: scale(1.1); /* Prevents white edges from the blur */
            pointer-events: none; /* Prevents dragging/saving image */
            user-select: none;
        }
        /* Intense Gaussian Blur + Grayscale to hide content details */
.blur-protected {
    filter: blur(25px) grayscale(100%) !important;
    transform: scale(1.2); /* Zoom in slightly to hide clean edges */
    opacity: 0.4; /* Fade out further */
    pointer-events: none;
}

/* Ensure the container hides the scaled-up blurred edges */
.locked-container {
    overflow: hidden;
    background-color: #000;
}

/* Sleek Dark Placeholder */
.album-placeholder {
    background: linear-gradient(145deg, #1a1d20, #212529);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: #495057; /* Muted grey */
    border: 1px dashed #343a40;
    transition: all 0.3s ease;
}

.album-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.album-placeholder span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Interaction effect */
.hover-zoom:hover .album-placeholder {
    background: #1d2124;
    color: #0d6efd; /* Turns primary blue on hover */
    border-color: #0d6efd;
}
    .blur-intense { filter: blur(30px) brightness(0.3); transform: scale(1.1); pointer-events: none; }
    .album-placeholder { background: #1a1d20; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #495057; border: 1px dashed #343a40; }
    .animate-pulse { animation: pulse 2s infinite; }
    @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }
    
    /* Sidebar Folder Styling */
.list-group-item-action.active.border-info {
    background-color: rgba(13, 202, 240, 0.2) !important; /* Muted teal for custom folders */
    border-left: 4px solid #0dcaf0 !important;
    color: #fff !important;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
    transform: scale(1.1);
    transition: 0.2s;
}

/* Ensure borders don't double up between items */
.list-group-item + .list-group-item {
    border-top-width: 0;
}

@keyframes chat-pulse {
    0% { background-color: #0d6efd; } /* Original Blue */
    50% { background-color: #dc3545; } /* Alert Red */
    100% { background-color: #0d6efd; }
}

.chat-blink {
    animation: chat-pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

/* Sidebar and Chat Window - BASE (Minimized) */
#chat-sidebar, .chat-window {
    position: fixed;
    bottom: 0;
    width: 280px;
    z-index: 9990;
    height: auto !important; /* Allow it to shrink to just the header height */
    display: flex;
    flex-direction: column;
}

#chat-sidebar {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 280px;
    z-index: 9999 !important;
    background: #212529; /* Dark Bootstrap color */
    height: auto !important; /* Allow it to be small when minimized */
}

/* Hardcoded height for maximized state */
#chat-sidebar.chat-maximized {
    height: 400px !important;
}

#sidebar-content {
    flex-direction: column !important;
    background: #1a1a1a;
    overflow-y: auto;
    /* Display is handled by JS toggle */
}


/* Chat Windows Container */
#chat-windows-container {
    position: fixed;
    bottom: 0;
    right: 310px;
    z-index: 9995;
    display: flex;
    flex-direction: row-reverse; /* Newest closest to sidebar */
    align-items: flex-end;
    pointer-events: none;
}

.chat-window {
    width: 300px;
    margin-right: 10px;
    pointer-events: auto;
}

/* THE FIX: Maximized State */
.chat-maximized {
    height: 400px !important; /* Force a hard limit */
    max-height: 400px !important;
}

/* Chat Body */
.chat-body {
    flex-grow: 1;
    background: #000;
    overflow-y: auto;
}

/* Hide content when not maximized */
.chat-window:not(.chat-maximized) .card-body,
.chat-window:not(.chat-maximized) .card-footer,
#chat-sidebar:not(.chat-maximized) #sidebar-content {
    display: none !important;
}

/* Prevent the dropdown from being clipped or causing scrollbars */
.chat-window .card-header {
    overflow: visible !important;
}

.chat-window .dropdown-menu {
    position: absolute !important;
    z-index: 10005 !important; /* Ensure it stays above the chat body */
    background: #212529; /* Dark Bootstrap theme */
    border: 1px solid #444;
}

.badge-group {
    background-color: #6610f2; /* Purple for groups */
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* System Message Style */
.system-msg {
    align-self: center;
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    font-size: 0.75rem;
    padding: 4px 15px;
    border-radius: 20px;
    margin: 10px 0;
    font-style: italic;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.uppercase-tracking {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.65rem;
}

.storage-container {
    transition: all 0.3s ease;
}

/* Make it pulse if they are near the limit */
.bg-danger.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite, pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.lazy-load {
        opacity: 0;
        transition: opacity 0.8s ease-in-out;
        background-color: #111; /* Shows a dark box while loading */
        min-height: 200px; /* Crucial so they aren't 0px tall! */
        display: block;
    }
    /* When this class is added by JS, the image fades in */
    .lazy-loaded {
        opacity: 1 !important;
    }
    
    /* Specific height for List View thumbnails */
.view-list .lazy-load {
    width: 60px;
    height: 60px;
    min-height: 60px; /* Crucial for Lazy Load! */
    object-fit: cover;
    border-radius: 4px;
}

   /* Specific height for search grid thumbnails */
    .view-grid .lazy-load { 
        min-height: 120px !important; /* Matches the roughly 1/6th column width */
    }
    
    /* Ensure the search clear button doesn't have a blue focus ring */
    #clearSearch:focus, #searchInput:focus {
        box-shadow: none !important;
        outline: none !important;
    }

/* Specific Fix for List View Thumbnails */
.file-item .hover-list img {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important; /* Prevents flexbox from shrinking it */
    min-height: 60px !important; /* Prevents lazy-load collapse */
    object-fit: cover !important; /* Crops it into a perfect square */
    flex-shrink: 0; /* Ensures the image doesn't crush if text is long */
}

/* Ensure the list item row has enough height for the thumb */
.file-item .hover-list {
    min-height: 76px; /* 60px thumb + 16px padding (p-2) */
    align-items: center;
    display: flex;
    margin-bottom: 0.5rem;
}

/* Prevent the thumbnail from collapsing or overlapping */
.file-item .hover-list .lazy-load {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    flex-shrink: 0; /* Prevents text from squishing the image */
    object-fit: cover;
}

/* Fix for the List View row */
.search-list-item {
    display: flex !important;
    align-items: center !important; /* Prevents vertical stretching */
    min-height: 60px;
    max-height: 80px; /* Caps the row height */
    overflow: hidden;
}

/* Fix for the thumbnail specifically */
.search-list-item .lazy-load {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    flex-shrink: 0; /* Keeps it a square */
    object-fit: cover !important;
    margin-right: 15px;
}
