/* Basic styling for chat interface */
:root {
    --primary-color: #36393f;
    --secondary-color: #5865f2;
    --accent-color: #43b581;
    --text-color: #dcddde;
    --background-color: #2f3136;
    --channel-hover: #42464d;
    --message-hover: #32353b;
    --sidebar-color: #202225;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--primary-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.top-header {
    background-color: var(--sidebar-color);
    position: fixed;
    color: #fff;
    text-align: center;
    padding: 0.8rem;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.app-container {
    display: flex;
    height: calc(100vh - 50px); /* Subtract header height */
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-color);
    width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures space between channels and user-profile */
    height: 100%;
    overflow: hidden; /* Prevents scrolling within sidebar */
}

.channels {
    flex: 1; /* Takes up available space, pushing user-profile to the bottom */
    padding: 1rem;
    overflow-y: auto; /* Allows scrolling if channels exceed viewport height */
}

.channels h3 {
    font-size: 0.9rem;
    color: #8e9297;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #292b2f;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

.channels-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.channel-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.8rem;
    color: #8e9297;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    transition: background 0.3s;
}

.channel-btn:hover, .channel-btn.active-channel {
    background-color: var(--channel-hover);
    color: var(--text-color);
}

.leave-channel-btn {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--background-color);
    color: #8e9297;
    border: none;
    border-radius: 4px;
    margin-top: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
    text-align: left;
}

.leave-channel-btn:hover {
    background-color: #c0392b; /* Red hover background */
    color: #fff; /* White text on hover */
}


.add-channel-btn, .join-channel-btn {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--background-color);
    color: #8e9297;
    border: none;
    border-radius: 4px;
    margin-top: 0.8rem;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
    text-align: left;
}

.add-channel-btn:hover, .join-channel-btn:hover {
    background-color: var(--channel-hover);
    color: var(--text-color);
}

/* User Profile Section */
.user-profile {
    padding: 1rem;
    background-color: #292b2f;
    display: flex;
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Avatar Styling */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    object-fit: cover; /* Ensures the image covers the entire area */
    cursor: pointer; /* Indicates interactivity, e.g., clicking for profile */
}

/* Username Styling */
.username {
    flex: 1; /* Allows the username to take up remaining space */
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-color);
    margin-left: 0.5rem; /* Adds spacing between avatar and username */
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden; /* Hides overflowed text */
    text-overflow: ellipsis; /* Adds ellipsis (...) for overflowed text */
    cursor: pointer; /* Indicates interactivity, e.g., clicking for profile */
}

/* Settings Button Styling */
.settings-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    transition: color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1); /* Slightly enlarges the button on hover */
}

/* Optional: Icon for Settings Button */
.settings-btn::before {
    content: '⚙️'; /* Unicode gear icon */
    margin-right: 0.3rem;
}

/* Main Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: transparent;
    min-width: 0; /* Allow shrinking */
    position: relative;
    z-index: 1;
}

#vanta-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.chat-header {
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #202225;
    background-color: var(--primary-color);
    color: var(--text-color);
    font-weight: bold;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem;
    background-color: var(--primary-color);
    margin-bottom: 10px;
}

.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background-color: var(--message-hover);
    border-radius: 5px;
}

.sender {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.2rem;
}

.message-content {
    font-size: 0.85rem;
    word-break: break-word;
    margin-left: 20px;
}

.message-timestamp {
    color: #999;
    font-size: 0.85em;
    margin-left: auto;
}

.sender-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.moving-color {
    background: linear-gradient(90deg, #ff6ec4, #7873f5, #ff6ec4);
    background-size: 200% 200%;
    animation: movingGradient 4s linear infinite;
    color: white; /* Adjust text color for readability */
    padding: 10px;
    border-radius: 5px;
}

@keyframes movingGradient {
    0% {
      background-position: 0% 50%;
    }
    100% {
      background-position: 200% 50%;
    }
}

.message-input {
    display: flex;
    padding: 0.2rem; /* Reduced padding for a less noticeable appearance */
    border-top: 0.5px solid #202225;
    background: linear-gradient(135deg, #f7dc6f, #007bff, #00ff00);
    background-size: 200% 200%;
    animation: movingGradient 4s linear infinite;
}

textarea {
    flex: 1;
    padding: 0.6rem;
    background-color: var(--background-color);
    border: none;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    resize: none;
    min-height: 40px;
    max-height: 120px;
}

.send-btn {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.6rem 0.8rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.send-btn:hover {
    background-color: #4a5de2;
}

.copy-join-code-btn {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.9rem;
}

.copy-join-code-btn:hover {
    background-color: #4a5de2;
}



/* Close Button */
.close-button {
    position: absolute; /* Position it absolutely within the modal content */
    top: 10px; /* Adjust top position */
    right: 20px; /* Adjust right position */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001; /* Ensure it's above the modal background */
}

.close-button:hover {
    color: var(--accent-color);
}

/* Modal Title */
.modal-content h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

/* Modal Sections */
.modal-section {
    margin-bottom: 1.5rem; /* Increase bottom margin for spacing */
    display: flex;
    flex-direction: column;
}

/* Labels */
.modal-label {
    color: var(--text-color);
    margin-bottom: 0.5rem; /* Ensure there's space below the label */
    font-weight: bold;
}

/* Input Fields */
.modal-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal-input::placeholder {
    color: #999;
}

.modal-input:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* Action Buttons */
.action-btn {
    padding: 10px; /* Padding for buttons */
    background-color: var(--secondary-color); /* Default background color for buttons */
    color: #ffffff; /* White text for contrast */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    width: 100%; /* Full width for buttons */
    margin-top: 10px; /* Space above buttons */
}

/* Specific hover effect for Update Bio button */
.update-bio-btn:hover {
    background-color: #e74c3c !important; /* Change to red on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.logout-btn {
    background-color: #e74c3c;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.4s;
}

.toggle-switch .slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s;
}

.toggle-switch input:checked + .slider {
    background-color: var(--secondary-color);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(26px);
}

/* Badge Styles */
.badges-container, #profile-modal-badges {
    display: flex;
    align-items: center;
    gap: 5px; /* Increased space between badges */
    margin-top: 5px;
}

.admin-badge {
    margin-right: 5px; /* Adjust the space between badges */
    width: 20px; /* Set a fixed width for badges */
    height: 20px; /* Set a fixed height for badges */
    vertical-align: middle; /* Align badges vertically with text */
}

/* Optional - Animation for 'moving-color' badges */
.moving-color {
    animation: colorPulse 2s infinite;
}

@keyframes colorPulse {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Profile Modal Styling */
#profile-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Darker background for better contrast */
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    background-color: #2f3136; /* Background color for modal */
    color: #fff; /* Text color */
    padding: 20px; /* Padding inside the modal */
    border-radius: 8px; /* Rounded corners */
    width: 90%; /* Responsive width */
    max-width: 400px; /* Maximum width to fit better on smaller screens */
    text-align: center; /* Center-align text */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Soft shadow */
}

#profile-modal-image {
    width: 80px; /* Set a fixed width for the avatar */
    height: 80px; /* Set a fixed height for the avatar */
    border-radius: 50%; /* Make it circular */
    border: 2px solid var(--secondary-color); /* Optional: Add a border */
    object-fit: cover; /* Ensures the image covers the entire area */
    margin-bottom: 1rem; /* Space below the image */
}

#profile-modal-name {
    font-size: 1.5rem; /* Larger font size */
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--accent-color); /* Use accent color for the name */
}

#profile-modal-badges {
    display: flex;
    justify-content: center; /* Center badges horizontally */
    align-items: center; /* Center badges vertically */
    margin-bottom: 10px; /* Space below badges */
}

#profile-modal-bio {
    font-size: 1rem; /* Adjust font size as needed */
    color: #ccc; /* Lighter color for the bio text */
    margin-bottom: 10px; /* Space below the bio */
    padding: 10px; /* Add padding for better spacing */
    border-radius: 8px; /* Rounded corners for bio */
    background-color: rgba(255, 255, 255, 0.1); /* Light background for contrast */
}

.suggestions-container {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Optional: Add shadow for better visibility */
    display: none; /* Initially hidden */
    border-radius: 4px; /* Optional: Rounded corners */
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

/* Style for tagged usernames */
.tagged-user {
    color: var(--secondary-color); /* Use your secondary color for tagged users */
    font-weight: bold; /* Make the tagged username bold */
    background-color: rgba(54, 198, 255, 0.2); /* Light background for visibility */
    border-radius: 4px; /* Rounded corners */
    padding: 2px 4px; /* Padding for better spacing */
    cursor: pointer; /* Indicate that it's clickable */
    transition: background-color 0.3s; /* Smooth transition for hover effect */
}

/* Optional: Style for hover effect on tagged usernames */
.tagged-user:hover {
    background-color: rgba(54, 198, 255, 0.4); /* Darker background on hover */
}

/* Mobile Menu Styles */
.sidebar {
    position: fixed; /* Fixed position for overlay effect */
    top: 0;
    left: -250px; /* Start hidden off-screen */
    width: 250px; /* Width of the sidebar */
    height: 100%; /* Full height */
    background-color: var(--sidebar-color);
    transition: left 0.3s ease; /* Smooth transition */
    z-index: 100; /* Ensure it overlays other content */
    padding: 1rem; /* Padding for content */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5); /* Shadow for depth */
}

/* Show the sidebar when active */
.sidebar.active {
    left: 0; /* Slide in */
}

/* Close button for the menu */
.close-menu {
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    margin-bottom: 1rem; /* Space below the close button */
}

/* Menu Toggle Button */
.menu-toggle {
    display: block; /* Show on mobile */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem; /* Larger size for visibility */
    cursor: pointer;
    position: fixed; /* Fixed position */
    top: 10px; /* Position from the top */
    left: 10px; /* Position from the left */
    z-index: 200; /* Above the sidebar */
}

/* Channel Button Styles */
.channel-btn {
    display: block; /* Full width */
    padding: 1rem; /* Padding for touch targets */
    color: #8e9297;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.channel-btn:hover {
    background-color: var(--channel-hover); /* Highlight on hover */
    color: var(--text-color);
}

/* Responsive Adjustments for Mobile */
@media (max-width: 768px) {
    body {
        font-size: 14px; /* Adjust base font size for better readability */
    }

    .top-header {
        padding: 0.5rem; /* Adjust padding for mobile */
        font-size: 1.1rem; /* Slightly smaller font size */
    }

    .app-container {
        flex-direction: column; /* Stack elements vertically */
        height: calc(100vh - 50px); /* Adjust height to fit the viewport */
    }

    .sidebar {
        display: none; /* Hide sidebar by default */
        width: 100%; /* Full width on mobile */
        position: absolute; /* Position it absolutely */
        top: 0; /* Align to the top */
        left: 0; /* Align to the left */
        background-color: var(--sidebar-color); /* Background color */
        z-index: 10; /* Ensure it appears above other content */
    }

    .sidebar.active {
        display: flex; /* Show sidebar when active */
        flex-direction: column; /* Stack items vertically */
    }

    .menu-toggle {
        display: block; /* Ensure toggle button is visible */
        font-size: 2rem; /* Larger size for visibility */
        z-index: 20; /* Ensure it appears above other content */
    }

    .channels {
        flex: 0 0 auto; /* Prevent channels from growing */
        padding: 1rem;
        overflow-y: auto; /* Allow scrolling if channels exceed viewport height */
    }

    .messages {
        flex: 1; /* Allow messages area to take remaining space */
        height: calc(100vh - 150px); /* Adjust height for header and input area */
        padding: 0.6rem;
        overflow-y: auto; /* Allow scrolling for messages */
    }

    .message-input {
        padding: 0.6rem; /* Adjust padding for input area */
        position: relative; /* Change to relative for better positioning */
        background-color: var(--primary-color); /* Ensure background color matches */
    }

    .send-btn {
        padding: 0.5rem; /* Increase padding */
        min-width: 70px; /* Ensure minimum width for buttons */
    }

    .modal-content {
        width: 90%; /* Full width for modals */
        max-width: 400px; /* Limit max width */
        margin: 0 auto; /* Center modal */
    }

    .close-button {
        font-size: 1.5rem; /* Adjust close button size */
    }

    .toggle-switch {
        width: 60px; /* Adjust toggle switch width */
    }

    .toggle-switch .slider {
        height: 26px; /* Adjust height for better touch target */
    }

    .toggle-switch .slider::before {
        width: 20px; /* Adjust width for better touch target */
        height: 20px; /* Adjust height for better touch target */
    }
}

/* Desktop Styles (Ensure they remain unchanged) */
@media (min-width: 769px) {
    .sidebar {
        position: static; /* Static position for desktop */
        width: 250px; /* Fixed width */
        height: auto; /* Auto height */
        left: 0; /* Always visible */
        box-shadow: none; /* No shadow on desktop */
    }

    .menu-toggle {
        display: none; /* Hide toggle on desktop */
    }
}

/* Settings Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark, semi-transparent background */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Make sure it’s on top of other elements */
}

.modal-content {
    background-color: #2f3136; /* Background color for modal */
    color: #fff; /* Text color */
    padding: 20px; /* Padding inside the modal */
    border-radius: 8px; /* Rounded corners */
    width: 90%; /* Responsive width */
    max-width: 400px; /* Maximum width to fit better on smaller screens */
    text-align: left; /* Left-align text */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Soft shadow */
    animation: fadeIn 0.3s ease; /* Smooth fade-in effect */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
    max-height: 80vh; /* Limit height to fit within the viewport */
    position: relative; /* Set position to relative for absolute positioning of close button */
    padding-top: 40px; /* Add padding to the top to prevent content from hiding behind the close button */
}

/* Close Button */
.close-button {
    position: absolute; /* Position it absolutely within the modal content */
    top: 10px; /* Adjust top position */
    right: 20px; /* Adjust right position */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001; /* Ensure it's above the modal background */
}

.close-button:hover {
    color: var(--accent-color);
}

/* Modal Title */
.modal-content h2 {
    color: var(--text-color);
    margin-bottom: 1rem; /* Space below the title */
    font-size: 1.5rem; /* Adjusted font size for title */
    text-align: center; /* Center title */
}

/* Modal Sections */
.modal-section {
    margin-bottom: 15px; /* Space between sections */
    padding: 10px; /* Padding inside each section */
    background-color: #36393f; /* Background color for each section */
    border-radius: 8px; /* Rounded corners for sections */
}

/* Labels */
.modal-label {
    color: var(--text-color);
    margin-bottom: 0.5rem; /* Ensure there's space below the label */
    font-weight: bold; /* Bold text for labels */
}

/* Input Fields */
.modal-input {
    padding: 10px; /* Padding for input fields */
    border: 1px solid #444; /* Border color */
    border-radius: 5px; /* Rounded corners */
    background-color: var(--background-color); /* Background color */
    color: var(--text-color); /* Text color */
    font-size: 1rem; /* Font size */
    width: 100%; /* Full width */
    margin-bottom: 10px; /* Space below input fields */
}

/* Action Buttons */
.action-btn {
    padding: 10px; /* Padding for buttons */
    background-color: var(--secondary-color); /* Background color for buttons */
    color: #ffffff; /* White text for contrast */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    width: 100%; /* Full width for buttons */
    margin-top: 10px; /* Space above buttons */
}

/* Hover Effects for Buttons */
.action-btn:hover {
    background-color: #4a5de2; /* Darker shade on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Toggle Switch Styles */
.toggle-switch {
    display: flex; /* Flexbox for alignment */
    align-items: center; /* Center items vertically */
    cursor: pointer; /* Pointer cursor on hover */
}

/* Toggle Switch Slider */
.toggle-switch .slider {
    position: relative;
    width: 50px; /* Width of the toggle switch */
    height: 24px; /* Height of the toggle switch */
    background-color: #ccc; /* Background color */
    border-radius: 24px; /* Rounded corners */
    transition: background-color 0.4s; /* Smooth transition */
    margin-left: 10px; /* Space between label and toggle */
}

/* Active State for Toggle Switch */
.toggle-switch input:checked + .slider {
    background-color: var(--secondary-color); /* Change background when checked */
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: 90vh; /* Allow more height on smaller screens */
    }
}

/* General styles for the mobile message */
#mobile-message {
    display: none; /* Hidden by default, shown via JavaScript */
    background-color: #ffcccb;
    color: #000;
    padding: 10px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-size: 14px;
    font-weight: bold;
}

/* Close button for the mobile message */
#close-mobile-message {
    margin-left: 10px;
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

#close-mobile-message:hover {
    background-color: #d32f2f;
}

/* Button Styles for Profile Modal */
#send-friend-request, #close-profile-modal {
    padding: 0.6rem 1rem; /* Padding for better touch targets */
    background-color: var(--secondary-color); /* Use secondary color */
    color: #fff; /* White text for contrast */
    border: none; /* Remove default border */
    border-radius: 8px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    font-size: 1rem; /* Font size */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    margin-top: 10px; /* Space above buttons */
    width: 100%; /* Full width for buttons */
}

/* Hover Effects */
#send-friend-request:hover, #close-profile-modal:hover {
    background-color: #4a5de2; /* Darker shade on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

/* Close Button Specific Styles */
#close-profile-modal {
    background-color: #e74c3c; /* Red background for close button */
}

#close-profile-modal:hover {
    background-color: #c0392b; /* Darker red on hover */
}

.favorite-btn {
    background: none; /* No background */
    border: none; /* No border */
    color: var(--accent-color); /* Color for the star */
    font-size: 1.5rem; /* Size of the star */
    cursor: pointer; /* Pointer cursor on hover */
    transition: transform 0.2s ease; /* Smooth transition for hover effect */
    margin-left: 10px; /* Space between channel button and favorite button */
}

.favorite-btn:hover {
    transform: scale(1.2); /* Slightly enlarge on hover */
}

.channel-container {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center items vertically */
}

.channel-btn {
    flex: 1; /* Allow the channel button to take available space */
    text-align: left; /* Align text to the left */
}

.suggestions-section {
    margin-top: 5px; /* Reduced from 10px */
    padding: 4px; /* Reduced from 8px */
    background-color: var(--primary-color);
    border-radius: 4px; /* Reduced from 8px */
    color: var(--text-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Reduced shadow */
}

.suggestions-section h3 {
    margin: 0;
    font-size: 0.8rem; /* Reduced from 1rem */
    font-weight: bold;
}

.suggestions-section p {
    margin: 2px 0; /* Reduced from 3px */
    font-size: 0.7rem; /* Reduced from 0.8rem */
}

.suggestions-link {
    display: inline-block;
    margin-top: 4px; /* Reduced from 8px */
    padding: 4px 8px; /* Reduced from 8px 12px */
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 3px; /* Reduced from 5px */
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    box-shadow: none;
    font-size: 0.7rem; /* Added smaller font */
}

.suggestions-link:hover {
    background-color: #4a5de2;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2f3136;
    color: #fff;
    padding: 10px; /* Reduced from 20px */
    border-radius: 4px; /* Reduced from 8px */
    width: 80%; /* Reduced from 90% */
    max-width: 400px; /* Reduced from 600px */
    position: relative;
    font-size: 0.8rem; /* Added smaller font */
}

.close-button {
    position: absolute;
    top: 8px; /* Reduced from 15px */
    right: 10px; /* Reduced from 20px */
    background: none;
    border: none;
    font-size: 1.2rem; /* Reduced from 1.5rem */
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--accent-color);
}

/* Adjust image size in the suggestions section */
.suggestion-item img {
    width: 3px; /* Reduced from 5px */
    height: 3px; /* Reduced from 5px */
    border-radius: 50%;
    margin-right: 4px; /* Reduced from 8px */
}

/* Friends List Styles */
.friends-section {
    padding: 5px; /* Reduced padding around the friends section */
    background-color: var(--primary-color); /* Background color to match the app */
    border-radius: 8px; /* Rounded corners */
    margin-top: 10px; /* Space above the friends section */
}

.friends-section h3 {
    font-size: 1rem; /* Reduced font size for the section title */
    color: var(--text-color); /* Text color for the title */
    margin-bottom: 8px; /* Reduced space below the title */
    text-align: center; /* Center the text */
}

.friends-list {
    list-style: none; /* Remove default list styling */
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margin */
}

.friends-list li {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Center items vertically */
    padding: 5px; /* Reduced padding for each friend item */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Light border for separation */
    transition: background-color 0.3s; /* Smooth transition for hover effect */
}

.friends-list li:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Light background on hover */
}

.friend-avatar {
    width: 30px; /* Reduced width for friend avatar */
    height: 30px; /* Reduced height for friend avatar */
    border-radius: 50%; /* Make the avatar circular */
    margin-right: 8px; /* Reduced space between avatar and name */
}

.friend-name {
    font-size: 0.9rem; /* Reduced font size for friend name */
    color: var(--text-color); /* Text color for friend name */
    font-weight: bold; /* Make the name bold */
}

.modal-content {
    background-color: #2f3136; /* Dark background for the modal */
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-section {
    margin-bottom: 15px; /* Space between sections */
}

.modal-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #000;
}

.action-btn {
    background-color: #43b581; /* Green button color */
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background-color: #3ca374; /* Darker green on hover */
}

.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    display: none; /* Hide the default checkbox */
}

.slider {
    position: relative;
    width: 34px;
    height: 20px;
    background-color: #ccc;
    border-radius: 34px;
    transition: background-color 0.2s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

input:checked + .slider {
    background-color: #43b581; /* Green when checked */
}

input:checked + .slider:before {
    transform: translateX(14px); /* Move the slider */
}

.logout-btn {
    background-color: #f44336; /* Red for logout */
}

.logout-btn:hover {
    background-color: #d32f2f; /* Darker red on hover */
}

.upgrade-btn {
    background-color: #ffcc00; /* Bright yellow for the upgrade button */
    color: #000; /* Black text for contrast */
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upgrade-btn:hover {
    background-color: #e6b800; /* Darker yellow on hover */
}

.premium-info {
    font-size: 0.9rem;
    margin-top: 5px;
}

.modal-input:disabled {
    background-color: #d3d3d3; /* Light gray background for disabled input */
    color: #a9a9a9; /* Dark gray text for disabled input */
    cursor: not-allowed; /* Change cursor to indicate it's not clickable */
}

.action-btn:disabled {
    background-color: #d3d3d3; /* Light gray background for disabled button */
    color: #a9a9a9; /* Dark gray text for disabled button */
    cursor: not-allowed; /* Change cursor to indicate it's not clickable */
    border: 1px solid #a9a9a9; /* Dark gray border for disabled button */
}

/* Tooltip Container */
.tooltip-container {
    position: relative; /* Position relative for absolute positioning of tooltip */
    display: inline-block; /* Inline block to wrap the button */
}

/* Tooltip Styles */
.tooltip {
    visibility: hidden; /* Hidden by default */
    width: 120px; /* Width of the tooltip */
    background-color: rgba(0, 0, 0, 0.8); /* Dark background */
    color: #fff; /* White text */
    text-align: center; /* Center text */
    border-radius: 5px; /* Rounded corners */
    padding: 5px; /* Padding inside the tooltip */
    position: absolute; /* Position absolutely */
    z-index: 1; /* Ensure it appears above other elements */
    bottom: 125%; /* Position above the button */
    left: 50%; /* Center horizontally */
    margin-left: -60px; /* Adjust to center */
    opacity: 0; /* Start invisible */
    transition: opacity 0.3s; /* Smooth transition */
}

/* Show the tooltip on hover */
.tooltip-container:hover .tooltip {
    visibility: visible; /* Show tooltip */
    opacity: 1; /* Fade in */
}

/* Ensure the modal has a fixed height and allows scrolling */
.modal {
    overflow: hidden; /* Prevent scrolling of the modal itself */
}

/* Modal Content */
.modal-content {
    background-color: #2f3136; /* Background color for modal */
    color: #fff; /* Text color */
    padding: 20px; /* Padding inside the modal */
    border-radius: 8px; /* Rounded corners */
    width: 90%; /* Responsive width */
    max-width: 400px; /* Maximum width to fit better on smaller screens */
    text-align: left; /* Left-align text */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Soft shadow */
    animation: fadeIn 0.3s ease; /* Smooth fade-in effect */
    overflow-y: auto; /* Allow scrolling if content exceeds height */
    max-height: 80vh; /* Limit height to fit within the viewport */
    position: relative; /* Set position to relative for absolute positioning of close button */
}

/* Modal Sections */
.modal-section {
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack items vertically */
    justify-content: center; /* Center items vertically */
    align-items: stretch; /* Stretch items to full width */
    margin-bottom: 20px; /* Space between sections */
    padding: 15px; /* Padding inside each section */
    background-color: #36393f; /* Background color for each section */
    border-radius: 8px; /* Rounded corners for sections */
    width: 100%; /* Full width */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

/* Close Button */
.close-button {
    position: absolute; /* Position it absolutely within the modal content */
    top: 10px; /* Adjust top position */
    right: 20px; /* Adjust right position */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001; /* Ensure it's above the modal background */
}

/* Ensure the modal has a fixed height and allows scrolling */
.modal {
    overflow: hidden; /* Prevent scrolling of the modal itself */
}

/* Tooltip Styles */
.tooltip {
    visibility: hidden; /* Hidden by default */
    width: 120px; /* Width of the tooltip */
    background-color: rgba(0, 0, 0, 0.8); /* Dark background */
    color: #fff; /* White text */
    text-align: center; /* Center text */
    border-radius: 5px; /* Rounded corners */
    padding: 5px; /* Padding inside the tooltip */
    position: absolute; /* Position absolutely */
    z-index: 1; /* Ensure it appears above other elements */
    bottom: 125%; /* Position above the button */
    left: 50%; /* Center horizontally */
    margin-left: -60px; /* Adjust to center */
    opacity: 0; /* Start invisible */
    transition: opacity 0.3s; /* Smooth transition */
}

/* Show the tooltip on hover */
.tooltip-container:hover .tooltip {
    visibility: visible; /* Show tooltip */
    opacity: 1; /* Fade in */
}

/* Fixed Height for Uniformity */
.modal-section.fixed-height {
    height: 100px; /* Fixed height for uniformity */
}

/* Action Buttons */
.action-btn {
    padding: 10px; /* Padding for buttons */
    background-color: var(--secondary-color); /* Background color for buttons */
    color: #ffffff; /* White text for contrast */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
    width: 100%; /* Full width for buttons */
    margin-top: 10px; /* Space above buttons */
}

/* Tooltip Styles */
.tooltip {
    visibility: hidden; /* Hidden by default */
    width: 120px; /* Width of the tooltip */
    background-color: rgba(0, 0, 0, 0.8); /* Dark background */
    color: #fff; /* White text */
    text-align: center; /* Center text */
    border-radius: 5px; /* Rounded corners */
    padding: 5px; /* Padding inside the tooltip */
    position: absolute; /* Position absolutely */
    z-index: 1; /* Ensure it appears above other elements */
    bottom: 125%; /* Position above the button */
    left: 50%; /* Center horizontally */
    margin-left: -60px; /* Adjust to center */
    opacity: 0; /* Start invisible */
    transition: opacity 0.3s; /* Smooth transition */
}

/* Show the tooltip on hover */
.tooltip-container:hover .tooltip {
    visibility: visible; /* Show tooltip */
    opacity: 1; /* Fade in */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: 90vh; /* Allow more height on smaller screens */
    }
}

/* Badge Image Styling */
.badge-image {
    width: 40px; /* Set a fixed width */
    height: 40px; /* Set a fixed height */
    border-radius: 4px; /* Optional: Add some rounding to the corners */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    margin: 0.2rem; /* Add some spacing around the badges */
}

pre {
    background-color: #f5f5f5; /* Light background for code */
    border: 1px solid #ccc; /* Border around code block */
    border-radius: 4px; /* Rounded corners */
    padding: 10px; /* Padding inside the code block */
    overflow-x: auto; /* Allow horizontal scrolling if needed */
}

code {
    font-family: monospace; /* Use a monospace font for code */
    white-space: pre-wrap; /* Preserve whitespace */
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: var(--background-color);
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close-button {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
}

.message img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 5px;
}

.message-content {
    margin-top: 5px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timestamp {
    color: #666;
    font-size: 0.8em;
}

/* Modal Background */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.7); /* Dark background with opacity */
}

/* Modal Content */
.modal-content {
    background-color: #2c2f33; /* Darker background for the modal */
    margin: auto; /* Center the modal */
    padding: 30px; /* Increased padding inside the modal */
    border: 1px solid #888; /* Gray border */
    border-radius: 8px; /* Rounded corners */
    width: 90%; /* Full width with some margin */
    max-width: 600px; /* Maximum width */
    min-height: 400px; /* Minimum height for the modal */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); /* Shadow effect */
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    justify-content: space-between; /* Space out children */
}

/* Modal Header */
.modal-content h2 {
    margin: 0 0 15px; /* Margin below the heading */
    font-size: 1.5rem; /* Font size for the heading */
    color: #ffffff; /* White text color */
}

/* Modal Buttons */
.action-btn {
    background-color: #5865f2; /* Primary button color */
    color: white; /* Text color */
    border: none; /* No border */
    padding: 10px 15px; /* Padding */
    text-align: center; /* Centered text */
    text-decoration: none; /* No underline */
    display: inline-block; /* Inline-block for button */
    font-size: 1rem; /* Font size */
    margin: 5px 2px; /* Margin around buttons */
    cursor: pointer; /* Pointer cursor on hover */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s; /* Transition effect */
}

/* Button Hover Effect */
.action-btn:hover {
    background-color: #4752c4; /* Darker shade on hover */
}

/* Modal Section */
.modal-section {
    margin-bottom: 20px; /* Space between sections */
}

/* Modal Labels */
.modal-label {
    display: block; /* Block display for labels */
    margin-bottom: 5px; /* Space below labels */
    font-weight: bold; /* Bold text */
    color: #ffffff; /* White text color */
}

/* Input Fields */
.modal-input {
    width: 100%; /* Full width */
    padding: 10px; /* Padding */
    border: 1px solid #ccc; /* Light gray border */
    border-radius: 4px; /* Rounded corners */
    box-sizing: border-box; /* Include padding in width */
    background-color: #40444b; /* Dark input background */
    color: #ffffff; /* White text color */
}

/* Toggle Switch */
.toggle-switch {
    display: flex; /* Flexbox for toggle */
    align-items: center; /* Center items */
}

/* Slider for Toggle */
.slider {
    position: relative;
    width: 34px; /* Width of the slider */
    height: 20px; /* Height of the slider */
    background-color: #ccc; /* Background color */
    border-radius: 34px; /* Rounded corners */
    transition: background-color 0.4s; /* Transition effect */
}

/* Slider Circle */
.slider:before {
    position: absolute;
    content: "";
    height: 16px; /* Height of the circle */
    width: 16px; /* Width of the circle */
    left: 2px; /* Position from the left */
    bottom: 2px; /* Position from the bottom */
    background-color: white; /* Circle color */
    border-radius: 50%; /* Circle shape */
    transition: transform 0.4s; /* Transition effect */
}

/* Checked State */
input:checked + .slider {
    background-color: #5865f2; /* Color when checked */
}

input:checked + .slider:before {
    transform: translateX(14px); /* Move circle to the right */
}

/* Close Button */
.close-button {
    background: none; /* No background */
    border: none; /* No border */
    color: #ffffff; /* White text color */
    font-size: 1.5rem; /* Font size */
    cursor: pointer; /* Pointer cursor */
    position: absolute; /* Positioning */
    top: 10px; /* Position from the top */
    right: 15px; /* Position from the right */
}