
        /* Your existing CSS for header, body, etc. goes here */
        /* It's important that ALL your CSS (including from upload.html) is either here or in a separate .css file linked in <head> */
/*
 DELETE THIS ENTIRE BLOCK 
.animate-typewriter {
  overflow: hidden;
  border-right: .15em solid #0000FF;
  white-space: nowrap;
  margin: 0 auto; 
  letter-spacing: .1em;
  animation: 
    looping-typewriter 5s steps(40, end) infinite,
    blink-caret .75s step-end infinite;
}

 ALSO DELETE THIS BLOCK 
.animate-typewriter {
    display: inline-block; 
    max-width: 100%;
}
*/


/* Add this to your main <style> block in index.html */

/* ================================= */
/* --- NEW Profile Dropdown Styles --- */
/* ================================= */

/* Style for the profile button in the header */
.profile-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    overflow: hidden; /* Ensures the image stays within the circle */
}
.profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main container for the dropdown menu */
.profile-dropdown-menu {
    position: absolute;
    top: 58px; /* Position it just below the header */
    right: 10px; /* Position it on the right side */
    width: 190px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border: 2px solid #0000FF;
    z-index: 2100; /* Make sure it's above other content */
    transition: opacity 0.2s, transform 0.2s;
    transform-origin: top right;
}

/* Utility class to hide the menu */
.profile-dropdown-menu.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.95);
}

/* --- Dropdown Internals --- */
.profile-menu-header {
    padding: 15px;
    border-bottom: 1px solid #e5e5e5;
}
.profile-menu-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}
.profile-menu-user:hover {
    background-color: #f0f2f5;
}
.profile-menu-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.profile-menu-user span {
    font-weight: 600;
    font-size: 16px;
}
.view-profile-link {
    color: #0000FF; /* Your brand color */
    font-size: 14px;
    text-decoration: none;
    padding: 8px 8px 0 56px; /* Aligns with the username */
    display: block;
}

.menu-separator {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 8px 0;
}

.profile-menu-list {
    list-style: none;
    padding: 0 8px 8px 8px; /* Add some padding around the list */
    margin: 0;
}
/* Add the transparent border line */
.profile-menu-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border: 1px solid transparent; /* <-- Add this line */
}
/* Change the rule to look like this */
.profile-menu-list li a:hover {
    background-color: #f0f2f5;
    
}
.profile-menu-list .menu-icon {
    width: 30px;
    height: 30px;
    /* You will need to add background images for your icons */
    color: #0000FF;
}




/* ================================================== */
/* --- FINAL & COMPLETE AUTH MODAL CSS (V3) --- */
/* ================================================== */

/* --- Main Header Login Button --- */
/* ADDED THIS RULE BACK */
.header-action-btn {
    background-color: #0000FF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}
.header-action-btn:hover {
    background-color: #0011cc;
}

/* --- Main Modal & Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
.auth-modal-content {
    background: white;
    width: 90%;
    max-width: 420px; 
    border-radius: 12px;
    padding: 20px 25px;
    position: relative;
    border: 2px solid #0000FF;
    transform: scale(1);
    transition: transform 0.3s ease-in-out;
}
.modal-overlay.hidden .auth-modal-content {
    transform: scale(0.9);
}

/* --- Header, Footer & Close Buttons --- */
.auth-modal-header {
    text-align: center;
    padding: 5px 0 20px 0;
}
.auth-modal-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #111;
}
.auth-modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 15px;
}
.auth-modal-footer a {
    color: #0000FF;
    font-weight: 600;
    text-decoration: none;
}
.close-modal-btn, .back-to-main-login-btn {
    position: absolute;
    top: 10px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
}
.close-modal-btn { right: 15px; }
.back-to-main-login-btn { left: 15px; }
.close-modal-btn:hover, .back-to-main-login-btn:hover { color: #333; }


/* --- Tabs (View Switcher) --- */
.auth-view-switcher {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.auth-view-switcher .switcher-link {
    color: #555;
    text-decoration: none;
    padding-bottom: 10px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    flex-grow: 1;
    text-align: center;
    cursor: pointer;
}
.auth-view-switcher .switcher-link.active {
    color: #0000FF;
    border-bottom-color: #0000FF;
}

/* --- Form Elements (Inputs, Labels, etc.) --- */
.input-group {
    margin-bottom: 15px;
    position: relative;
}
.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}
.input-group input, .phone-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #0000FF;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: #f7f9fc;
}
.input-group input:focus, .phone-group select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.2);
}
.input-group input[type="password"] {
    padding-right: 45px;
}
.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}
.phone-group {
    display: flex;
}
.phone-group select {
    flex: 0 0 100px;
    margin-right: 10px;
}
.phone-group input {
    flex: 1 1 auto;
}
.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}
.form-link {
    color: #0000FF;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.form-link:hover {
    text-decoration: underline;
}

/* --- Primary Action Buttons (Covers ALL forms) --- */
.auth-modal-content button[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background-color: #0000FF;
    color: #fff;
    transition: background-color 0.2s;
}
.auth-modal-content button[type="submit"]:hover {
    background-color: #0011cc;
}

/* --- Social Login & Initial Options --- */
.auth-options { /* ADDED THIS RULE BACK FOR SPACING */
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: #888;
    margin: 18px 0;
}
.separator::before, .separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}
.separator:not(:empty)::before { margin-right: .5em; }
.separator:not(:empty)::after { margin-left: .5em; }

.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border: 1px solid #0000FF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
/* --- Change it to this --- */
.auth-option:hover {
    background-color: #f0f5ff;
    border-color: #0011cc;
    transform: translateY(-3px); /* This line lifts the button up */
    box-shadow: 0 4px 15px rgba(0, 0, 255, 0.1); /* This line adds the blue glow */
}
.auth-option img, .auth-option svg {
    width: 22px;
    height: 22px;
}

/* --- Specific View Styles (e.g., Code Entry) --- */
#code-entry-view .code-entry-text {
    text-align: center; 
    margin: -15px 0 20px; 
    color: #555;
}
#code-entry-view #login-code {
    text-align:center; 
    font-size: 1.2em; 
    letter-spacing: 0.5em;
}




/* Add to style.css */
.auth-terms {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    text-align: center;
    margin: 15px 0;
}
.auth-terms a {
    color: #0000FF;
    font-weight: 600;
    text-decoration: none;
}
.auth-terms a:hover {
    text-decoration: underline;
}



/* Add this to style.css */
.auth-modal-subtitle {
    font-size: 15px;
    color: #555;
    margin-top: 5px;
    font-weight: 400;
}

/* Sidebar Styles */
/* Update the icon positioning */
.icon {
  width: 200px;
  height: 200px;
  margin-left: 0.1px;
  transition: all 0.2s ease;
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  /* Add pointer-events none so clicks go through to menu item */
  pointer-events: none;
  z-index: -1;
}

  /* Normal State */
  .icon-normal {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  /* Hover State */
  .icon-hover {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }

/* Hover Effects - Enhanced */
.menu-item:hover .icon-normal {
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-item:hover .icon-hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 0 8px rgba(0, 0, 255, 0.6));
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Menu Item Hover State */
.menu-item:hover {
  background: rgba(173, 216, 230, 0.3);
  transform: translateX(4px);
}

/* Smoother transitions for icons */
.icon-normal, .icon-hover {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

  /* Menu Item Container */
/* Update the menu item structure */
.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 16px 16px 72px;
  margin-bottom: 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #000;
  position: relative;
  transition: all 0.3s ease;
  min-height: 64px;
  font-size: 18px;
  /* Add these to contain the hover area */
  overflow: hidden;
  z-index: 1;
}
  /* Sidebar Styles */
  .sidebar {
    width: 200px; /* Wider sidebar */
    height: calc(100vh - 60px);
    background: rgba(173, 216, 230, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px 16px;
    position: fixed;
    top: 60px;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
    box-sizing: border-box;
    border-radius: 0 16px 16px 0;
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.08);
    border-right: 3px solid #0000FF; /* <-- CHANGE TO THIS LINE */
  }

  .sidebar.collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
  }
  
  .sidebar {
      transition: transform 0.3s ease, opacity 0.3s ease; /* Added opacity */
  }

  .toggle-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid transparent;
    color: #000;
    font-size: 24px;
    cursor: pointer;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 101;
    padding: 10px;
    transition: all 0.2s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .toggle-button:hover {
    color: #0000FF;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid #0000FF;
    transform: scale(0.95);
  }

  .menu-text {
    font-family: Arial, sans-serif;
    font-size: 18px; /* Larger text */
    font-weight: 500; /* Bolder text */
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
  }

  .menu-item:hover .menu-text {
    transform: translateX(6px); /* More noticeable hover movement */
    color: #0000FF; /* Text turns blue on hover */
  }

  .profile-icon {
    border-radius: 50%;
  }

  @media (max-width: 100px) {
    .sidebar {
      width: 50px; /* Wider mobile version */
      transform: translateX(-100%);
      padding: 12px 8px;
    }
    .sidebar.collapsed {
      transform: translateX(0);
    }
    .menu-text {
      display: none;
    }
    .menu-item {
      justify-content: center;
      padding: 20px 6px; /* More space for icons */
      min-height: 800px; /* Taller menu items on mobile */
    }
    .icon {
      width: 500px; /* Large icons on mobile */
      height: 800px;
      margin-right: 0;
      position: static;
      transform: none;
    }
    .toggle-button {
      font-size: 20px;
      width: 44px;
      height: 44px;
    }
  }
  
  /* Add this to ensure hover only works on the intended item */
.menu-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
}

/* Keep your existing hover effects but add this */
.menu-item:hover {
  background: rgba(173, 216, 230, 0.3);
}

.toggle-button {
  z-index: 1000; /* Higher than everything else */
}

/* Temporary debug styles 
#sidebar {
  border: 3px solid blue !important; /* Verify sidebar is visible 
}

#sidebar.collapsed {
  border: 3px solid blue !important; /* Verify collapsed state applies
  transform: translateX(-100%) !important;
} 

*/

/* --- End of Sidebar Styles --- */

        /* --- Search Component Styles --- */
.search-container {
    display: flex;
    background: var(--white, #fff);
    border-radius: 50px;
    overflow: hidden;
    flex: 1;
    min-width: 250px;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.search-container input {
    flex: 1;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: #333;
}

.search-container button {
    background: #0000FF;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-container button:hover {
    background: #0011cc;
}

/* Search Results Styling */
.search-results {
    padding: 20px;
    display: none; /* Initially hidden */
}

.results-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.results-header h2 {
    color: #333;
    font-size: 22px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    
    /* Add these lines to make it resize correctly */
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.thumbnail {
    height: 160px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 17px;
    margin-bottom: 8px;
    color: #1a1a1a;
    line-height: 1.3;
    height: 44px; /* 2 lines with 1.3 line-height */
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #f0f5ff;
    color: #0000FF;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}






/* --- End of Search Styles --- */
 
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Roboto', Arial, sans-serif;
        }

        body {
            background-color: #f9f9f9;
        }

        header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            height: 56px;
            background-color: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 3px solid #0000FF; /* <-- ADD THIS LINE */
        }

        .header-left {
            display: flex;
            align-items: center;
            height: 100%;
            padding-left: 60px;
        }

        .logo-container {
            display: flex;
            align-items: center;
        }

        .logo-link {
            display: flex;
            align-items: center;
            height: 100%;
            text-decoration: none;
            transition: transform 0.2s ease;
        }

        .logo-link:hover {
            transform: scale(1.03);
        }

        .logo-link:active {
            transform: scale(0.98);
        }


        .header-center {
            flex: 1;
            max-width: 600px;
            margin: 0 20px;
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        main {
            padding: 20px;
            min-width: 0; /* <-- The line you need to add */
        }

        .content-placeholder {
            text-align: center;
            padding: 40px 20px;
            color: #666;
            font-size: 18px;
        }

        .content-area {
            margin-left: 200px;
            /* Match sidebar width */
            padding: 20px;
        }

        @media (max-width: 100px) {
            .content-area {
                margin-left: 0;
            }
        }

        /* Styles from upload.html CSS block go here. Ensure they are present! */
        .hidden-input-trigger {
            position: absolute;
            width: 0.1px;
            height: 0.1px;
            opacity: 0;
            overflow: hidden;
            z-index: -1;
        }

        #upload-trigger-container {
            z-index: 1000;
        }

        .upload-trigger-button {
            background: white;
            border: 2px solid #0000FF;
            border-radius: 8px;
            cursor: pointer;
            padding: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            width: 56px;
            height: 56px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            position: relative; /* NEW: Needed for the animation pseudo-element */
            overflow: hidden;   /* NEW: Needed to contain the animation */
            z-index: 1; /* NEW: Ensure button content is above the animation */
        }

        .upload-trigger-button:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 8px rgba(0, 0, 255, 0.2);
        }

        .upload-trigger-button svg {
            width: 32px;
            height: 32px;
            position: relative; /* NEW: Ensure SVG is above the liquid fill */
            z-index: 2;         /* NEW: Ensure SVG is above the liquid fill */
        }

        /* */
        .upload-trigger-button.uploading::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: var(--progress-percent, 0%); /* Controlled by JS */
            background-color: #0000FF;
            opacity: 0.8;
            transition: height 0.3s ease-in-out;
            z-index: 1;
            /* Creates a subtle wave effect */
            border-top-left-radius: 150% 20px;
            border-top-right-radius: 150% 20px;
            animation: wave 2s infinite linear;
        }
        
        @keyframes wave {
            0% {
                border-top-left-radius: 150% 20px;
                border-top-right-radius: 150% 30px;
            }
            50% {
                border-top-left-radius: 150% 30px;
                border-top-right-radius: 150% 20px;
            }
            100% {
                border-top-left-radius: 150% 20px;
                border-top-right-radius: 150% 30px;
            }
        }
        /* */

        /* Modal Overlay (initial state hidden) */
        .upload-popup-container {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .upload-popup-content {
            background: white;
            border: 2px solid #0000FF;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            width: 100%;
            max-width: 250px;
            padding: 20px;
            animation: popupFadeIn 0.3s ease;
        }

        /* Initial state for these should be hidden by CSS rules */
        .text-editor-container {
            display: none;
            width: 100%;
        }

        .upload-details-form {
            display: none;
            width: 100%;
        }

        #celebration-container {
            display: none;
        }

        #exit-confirm-modal {
            display: none;
        }


        .upload-options-column {
            display: flex;
            flex-direction: column;
            gap: 15px;
            width: 100%;
        }

        .upload-option-button {
            width: 100%;
            padding: 18px 20px;
            border: 2px solid #0000FF;
            border-radius: 8px;
            background: white;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            overflow: hidden;
        }

        .upload-option-button:hover {
            background: #f0f5ff;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 255, 0.1);
        }

        .upload-icon {
            width: 1px;
            height: 1px;
            min-width: 1px;
            margin-right: 12px;
            object-fit: contain;
            image-rendering: -webkit-optimize-contrast;
            image-rendering: crisp-edges;
            transform: scale(250);
            transform-origin: left left;
            position: relative;
            left: 0;
            top: 0;
        }

        .upload-option-label {
            font-size: 17px;
            font-weight: 600;
            color: #333;
            white-space: nowrap;
            margin-left: 20px;
        }

        #post-editor {
            width: 100%;
            height: 200px;
            border: 2px solid #0000FF;
            /* Blue border */
            border-radius: 8px;
            padding: 15px;
            font-family: Arial, sans-serif;
            font-size: 15px;
            resize: vertical;
            margin-bottom: 15px;
        }

        .editor-actions {
            display: flex;
            justify-content: space-between;
            gap: 15px;
        }

        .editor-action-button {
            padding: 10px 18px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            transition: all 0.2s ease;
            border: 2px solid #0000FF;
        }

        .editor-action-button.cancel {
            background: white;
            color: #0000FF;
        }

        .editor-action-button.publish {
            background: #0000FF;
            color: white;
        }

        .editor-action-button:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .upload-details-form h3 {
            text-align: center;
            margin-bottom: 20px;
            color: #333;
            font-size: 18px;
        }

        .upload-details-form input,
        .upload-details-form textarea {
            width: 100%;
            padding: 12px;
            margin-bottom: 15px;
            border: 2px solid #0000FF;
            /* Blue border */
            border-radius: 6px;
            font-size: 15px;
        }

        .upload-details-form textarea {
            min-height: 100px;
        }

        .upload-error {
            color: red;
            font-size: 14px;
            margin-bottom: 15px;
            min-height: 20px;
        }
        
        /* NOTE: The progress bar inside the modal is no longer needed */
        .upload-progress {
           display: none; /* CHANGED: Hide this as we are using the main button now */
        }

        .form-actions {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .form-action-button {
            flex: 1;
            padding: 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .form-action-button.back {
            background: white;
            color: #0000FF;
            border: 2px solid #0000FF;
        }

        .form-action-button.submit {
            background: #0000FF;
            color: white;
            border: 2px solid #0000FF;
        }

        .form-action-button:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        @keyframes popupFadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fall {
            to {
                transform: translateY(100vh) rotate(360deg);
            }
        }

        .confetti-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: #0000FF;
            color: white;
            padding: 18px 32px;
            border-radius: 8px;
            z-index: 1001;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            font-size: 16px;
            font-weight: 500;
        }

        @media (max-width: 600px) {
            .upload-popup-content {
                max-width: 90%;
                padding: 15px;
            }

            .upload-option-button {
                padding: 16px;
            }

            .upload-icon {
                transform: scale(20);
            }

            .upload-option-label {
                font-size: 16px;
                margin-left: 40px;
            }

            #upload-trigger-container {
                right: 20px;
                top: 20px;
            }
        }

        @media (max-width: 400px) {
            .upload-icon {
                transform: scale(18);
            }

            .upload-option-label {
                font-size: 15px;
                margin-left: 36px;
            }

            .editor-action-button,
            .form-action-button {
                padding: 8px 12px;
                font-size: 14px;
            }
        }

        /* NEW: Styles for the Exit Confirmation Modal */
        .confirm-modal-content {
            max-width: 300px;
            /* Adjust width as needed */
            text-align: center;
        }

        .confirm-modal-content h4 {
            margin-bottom: 10px;
            color: #333;
        }

        .confirm-modal-content p {
            font-size: 14px;
            color: #666;
            margin-bottom: 20px;
        }
        
        
        
        /* NEW PROFILE PAGE STYLES */
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f0f2f5; margin: 0; }
        .profile-page { max-width: 950px; 
        
            margin: 0 auto; 
        }
        .profile-header-container { background-color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
        .profile-cover-photo { height: 200px; background-size: cover; background-position: center; position: relative;
            border-radius: 12px; /* Add this line */
        }
        .profile-details-bar { padding: 0 30px; }
        .profile-main-details { display: flex; align-items: center; transform: translateY(-40px); }
        /* Change it to this */
.profile-page-picture { width: 180px; height: 180px; border-radius: 50%; border: 4px solid #fff; background-color: #f0f2f5; overflow: hidden; flex-shrink: 0; }
        .profile-picture { width: 100%; height: 100%; object-fit: cover; }
        .profile-name-and-stats { flex-grow: 1; padding: 0 20px 10px; display: flex; justify-content: space-between; align-items: flex-end; }
        .profile-name h1 { margin: 0; font-size: 28px; }
        .profile-name p { margin: 0; color: #65676b; }
        .profile-stats { display: flex; gap: 25px; }
        .stat { text-align: center; }
        .stat .count { font-weight: bold; font-size: 18px; }
        .stat .label { font-size: 14px; color: #65676b; }
        
        .action-btn { background-color: #0000FF; color: #fff; border: none; padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; }
        .action-btn.secondary { background-color: #e4e6eb; color: #050505; }
        .profile-bio-and-nav { padding: 15px 30px; }
        .profile-bio { margin-bottom: 20px; }
        
        .tab-link { padding: 15px 20px; font-weight: bold; color: #65676b; cursor: pointer; border-bottom: 3px solid transparent; }
        .tab-link.active { color: #0000FF; border-bottom-color: #0000FF; }
        .profile-body { display: flex; gap: 20px; padding: 20px 30px; }
        .profile-left-col { width: 35%; }
        .profile-right-col { width: 65%; }
        .info-box, .content-box { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
        
        
        
        /* This removes the extra space at the top of the profile page */
.profile-page-body main {
    padding-top: 0;
}
        
        /* --- New and Improved Profile Navigation Tabs --- */
.profile-nav-tabs {
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px; /* Adds space between the tab links */
    padding-left: 20px; /* Adds some space from the edge */
}

.profile-tab-link {
    padding: 15px 10px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    border-bottom: 3px solid transparent; /* Hidden border for inactive state */
    text-decoration: none; /* Removes the default link underline */
    transition: all 0.2s ease-in-out;
}

.profile-tab-link:hover {
    background-color: #f0f2f5; /* A subtle background on hover */
}

.profile-tab-link.active {
    color: #0000FF; /* Your blue brand color */
    border-bottom-color: #0000FF; /* The blue underline for the active tab */
}
        
        /* Styles for the new 'More Actions' menu */

/* The one, final style for the action bar */
.profile-action-bar {
    display: flex;
    align-items: center;
    gap: 10px; /* This creates a small space between the buttons */
    padding: 10px 0;
    justify-content: space-between; /* <-- This is the key fix */
}

.action-buttons-left {
    display: flex;
    gap: 10px;
}

/* Container for the menu button and dropdown to position the dropdown correctly */
.action-menu-container {
    position: relative;
}

/* The three-dots button itself */
.action-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #e4e6eb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}
.action-btn-icon svg {
    width: 20px;
    height: 20px;
}

/* The dropdown menu */
.more-actions-menu {
    position: absolute;
    top: 40px; /* Position below the button */
    right: 0;
    width: 300px; /* Set a width for the dropdown */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
    z-index: 2100;
}

.more-actions-menu.hidden {
    display: none;
}





/* Styles for the new profile content area */
.profile-content-area {
    padding-top: 20px; /* Adds some space below the navigation tabs */
}


/* This controls the width of the feed on the profile page */
.profile-content-area {
    max-width: 680px; /* A standard, comfortable width for a social feed */
    margin-left: auto;
    margin-right: auto;
}

.profile-content-grid {
    display: grid;
    /* This creates a responsive grid of cards */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* =========================== */
/* NEW Settings Page Styles    */
/* =========================== */

.settings-page {
    display: flex;
    gap: 30px;
    max-width: 980px;
    margin: 0 auto;
}

/* --- Left Navigation Menu --- */
.settings-nav {
    flex: 0 0 220px; /* Do not grow, do not shrink, base width of 220px */
    border-right: 1px solid #dbdbdb;
    padding-right: 20px;
}

.settings-nav h2 {
    font-size: 24px;
    padding: 10px 15px;
}


/* --- Right Content Area --- */
.settings-content {
    flex-grow: 1; /* This will take up the remaining space */
    padding: 10px;
}

.settings-pane h2 {
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dbdbdb;
}



/* ========================================= */
/* == NEW VERTICAL SETTINGS MENU STYLES   == */
/* ========================================= */

/* This targets the container for the new vertical list */
.settings-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px; /* A small space between menu items */
}

/* This styles each link in the list */
.settings-nav-link {
    display: flex; /* Aligns icon and text side-by-side */
    align-items: center;
    gap: 15px; /* Space between icon and text */
    padding: 12px 15px; /* Comfortable padding */
    text-decoration: none;
    color: #333;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 500;
    border: 2px solid transparent; /* Prepare for a border on active state */
}

/* A simple hover effect */
.settings-nav-link:hover {
    background-color: #f0f2f5;
}

/* Styles for the active menu item */
.settings-nav-link.active {
    color: #0000FF;
    font-weight: 700;
    background-color: #e6f2ff; /* A light blue background */
    border-color: #0000FF; /* A solid blue border */
}

/* Styles for the SVG icons */
.settings-nav-link .nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}



/* =========================== */
/* NEW Form Styles for Settings Page */
/* =========================== */

.settings-form .form-group {
    margin-bottom: 25px;
}

.settings-form .form-group-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.settings-form .form-group-avatar {
    flex-shrink: 0;
}
.settings-form .form-group-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f2f5;
}

.settings-form .form-group-inputs {
    flex-grow: 1;
}

.settings-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.settings-form input[type="text"],
.settings-form input[type="url"],
.settings-form input[type="email"],
.settings-form input[type="number"],
.settings-form input[type="password"],
.settings-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fafafa;
}

.settings-form input[type="file"] {
    font-size: 14px;
}

.settings-form textarea {
    resize: vertical;
    min-height: 80px;
}

.settings-form small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #888;
}

.settings-form .form-separator {
    border: none;
    border-top: 1px solid #dbdbdb;
    margin: 30px 0;
}

.settings-form .form-actions {
    display: flex;
    justify-content: flex-start;
}



/* --- Profile Header Editor Styles --- */

.profile-header-editor {
    position: relative;
    margin-bottom: 80px; /* Provides space below the cover photo for the profile photo */
}

/* Container for the cover photo */
.cover-photo-container {
    position: relative;
    width: 100%;
    height: 220px; /* Adjust height as needed */
    background-color: #e0e0e0; /* Fallback color */
    border-radius: 8px;
    overflow: hidden;
}

.cover-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes the image cover the container without stretching */
}

/* "Change Cover" button styling */
.cover-photo-edit-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.cover-photo-edit-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Container for the profile picture */
.profile-picture-container {
    position: absolute;
    bottom: -60px; /* Pulls the avatar down so it overhangs the cover photo */
    left: 20px; /* Positions it on the left */
    width: 120px; /* Size of the avatar */
    height: 120px;
    cursor: pointer; /* Makes it look clickable */
    border-radius: 50%; /* Makes it a circle */
    border: 4px solid white; /* Creates that nice border effect */
    background-color: #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Styling for the preview image itself */
.profile-picture-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Add a little camera icon overlay on hover */
.profile-picture-container::after {
    content: '📷'; /* You can use a camera emoji or an SVG icon */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-picture-container:hover::after {
    opacity: 1;
}


/* --- Profile Page Layout Fix --- */

/* This is the main container for the picture and the text */
.profile-main-details {
    display: flex; /* This is the key! It arranges children side-by-side. */
    align-items: center; /* This vertically aligns the picture and the text beautifully. */
    gap: 20px;       /* This adds a nice space between the picture and the text. */
}

/* This prevents the profile picture from getting squished on smaller screens */
.profile-picture-container {
    flex-shrink: 0; 
}


/* --- Settings Page Back Button Styles --- */

/* This new container will align the back button and "Settings" title */
.settings-nav-header {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between the button and the title */
    padding: 10px 10px 10px 5px; /* Adjust padding as needed */
}

/* This styles the back button itself */
.back-to-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%; /* Makes it a circle */
    color: #333;
    transition: background-color 0.2s ease;
}

.back-to-profile-btn:hover {
    background-color: #e6e6e6; /* A nice hover effect */
}

.back-to-profile-btn svg {
    width: 30px;
    height: 30px;
}

/* We can remove some padding from the main h2 since it's now in a container */
.settings-nav h2 {
    padding: 0;
}




/* Add these new rules to style.css */

/* This removes the default padding but ONLY on the settings page */
main.settings-main {
    padding: 0;
}

/* This adds back a bit of space around your settings content */
.settings-page {
    padding: 0 15px 80px 15px; /* TOP, RIGHT, BOTTOM, LEFT */
}



/* Add this to style.css */
.settings-pane {
    /* This ensures even empty panes can be swiped */
    min-height: 300px; 
}




/* ========================================= */
/* == SETTINGS PAGE TAB ANIMATION         == */
/* ========================================= */

/* 1. First, define the animation */
@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(15px); /* Start slightly lower */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. Then, find your existing rule for .settings-pane.active */
.settings-pane.active {
    display: block;
    /* Add this line to apply the animation */
    animation: fadeInPane 0.3s ease-out forwards;
}






/* =============================================== */
/* == STYLES FOR "ADD PRODUCT" UI/UX          == */
/* =============================================== */

/* 1. Position the "Add New Product" button to the right */
#add-product-btn {
    margin-left: auto; /* This pushes the button to the far right */
}

/* 2. Create the smooth "unfold" animation for the form */
#add-product-form-container {
    max-height: 0; /* The form is hidden by default */
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}
/* This class will be added by JS to show the form */
#add-product-form-container.visible {
    max-height: 1000px; /* Animate to a large height to reveal it */
    margin-top: 20px; /* Add some space when it's open */
}

/* 3. Style the custom "Choose File" button */
.custom-file-input {
    display: flex;
    align-items: center;
    gap: 15px;
}
/* This is the new button */
.file-input-label {
    background-color: #e4e6eb;
    color: #050505;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s;
}
.file-input-label:hover {
    background-color: #d8dbdf;
}
/* This is the text that shows the filename */
#file-chosen-text {
    font-style: italic;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* This hides the original, ugly file input */
.custom-file-input input[type="file"] {
    display: none;
}

/* 4. Ensure Price and Stock inputs are spaced nicely */
.form-group-row {
    display: flex;
    gap: 20px;
}
.form-group-row .form-group {
    flex: 1; /* Make them take up equal space */
    margin-bottom: 0;
}





.settings-form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fafafa;
    height: 41px; /* Match height of other inputs */
}


/* ========================================= */
/* == RESPONSIVE SETTINGS PAGE STYLES   == */
/* ========================================= */

/* This code only applies to screens 768px or narrower (phones) */
@media (max-width: 768px) {

    /* 1. Stack the main layout vertically */
    .settings-page {
        flex-direction: column;
        gap: 0; /* Remove the gap for a tighter mobile layout */
    }

    /* 2. Style the navigation area */
    .settings-nav {
        flex: none; /* Remove the fixed width */
        width: 100%;
        border-right: none; /* Remove the side border */
        padding-right: 0;
        border-bottom: 1px solid #dbdbdb; /* Add a bottom border instead */
    }
    
    .settings-nav-header {
    padding: 0 15px 5px 15px; /* Top, Right, Bottom, Left */
    }

    /* 5. Adjust the content area */
    .settings-content {
        padding: 15px;
    }
    
    .creator-hub-nav, .analytics-sub-nav {
        padding: 0 15px; /* Add padding to align with the rest of the mobile layout */
    }
}




/* Styles for new settings page elements */
.username-group {
    display: flex;
    align-items: center;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    background-color: #fafafa;
}
.username-handle-prefix {
    padding: 10px 0 10px 12px;
    color: #888;
    font-size: 15px;
}
.username-group input {
    border: none; /* Remove border from input since it's on the group */
    background-color: transparent;
}
.dynamic-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.dynamic-input-group input {
    flex-grow: 1; /* Input takes up available space */
}
.remove-input-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 1px solid #dbdbdb;
    background-color: #f0f2f5;
    color: #888;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.add-more-btn {
    background: none;
    border: 1px dashed #0000FF;
    color: #0000FF;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

/* --- Dynamic Input UX Improvement --- */

/* This CSS magic targets the remove button ONLY when its
   parent is the one and only child in the container. */
.dynamic-input-group:only-child .remove-input-btn {
    display: none;
}



/* --- Settings Pane Visibility Rules --- */
.settings-pane {
    display: none; /* Hide all panes by default */
}

.settings-pane.active {
    display: block; /* ONLY show the one with the 'active' class */
}


/* --- Creator Tools Styles --- */
.settings-subtitle {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background-color: #f7f9fc;
    border: 1px solid #e6e9f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-card .stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #0000FF;
}

.stat-card .stat-label {
    display: block;
    font-size: 14px;
    color: #65676b;
    margin-top: 5px;
}


/* --- New Creator Hub Styles --- */
.creator-hub-nav {
    display: flex;
    border-bottom: 1px solid #dbdbdb;
    margin-bottom: 20px;
}
.hub-nav-link, .sub-nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: #65676b;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px; /* Aligns border with container border */
}
.hub-nav-link.active, .sub-nav-link.active {
    color: #0000FF;
    border-bottom-color: #0000FF;
}
.hub-pane, .analytics-pane {
    display: none;
}
.hub-pane.active, .analytics-pane.active {
    display: block;
}
.analytics-sub-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}
.stat-card .stat-change {
    font-size: 13px;
    font-weight: 500;
}
.stat-change.positive { color: #2a9d8f; }
.stat-change.negative { color: #e76f51; }

.chart-container {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e6e9f0;
    border-radius: 8px;
    background-color: #fff;
}


/* --- Analytics Date Picker Styles --- */
.analytics-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.date-range-picker {
    position: relative;
}
.date-range-button {
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.date-range-button svg {
    width: 20px;
    height: 20px;
}
.date-range-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background-color: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 200px;
    z-index: 10;
    padding: 5px;
}
.date-range-dropdown.hidden {
    display: none;
}
.date-range-option {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}
.date-range-option:hover {
    background-color: #f0f2f5;
}
.date-range-option.active {
    background-color: #e6f2ff;
    color: #0000FF;
    font-weight: 700;
}



.stat-card {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat-card.active {
    border-color: #0000FF;
    box-shadow: 0 0 0 2px rgba(0, 0, 255, 0.3);
    transform: translateY(-3px);
}


/* --- CSS to properly hide the Flatpickr input --- */
.flatpickr-input-hidden {
    /* Take it out of the document flow so it doesn't create space */
    position: absolute;
    
    /* Make it completely invisible */
    opacity: 0; 
    
    /* Make sure it cannot be clicked or focused */
    pointer-events: none; 
    
    /* Remove all dimensions */
    width: 0;
    height: 0;
    border: none;
    padding: 0;
    margin: 0;
}



/* --- Content Analytics Table Styles --- */
.content-table-container {
    border: 1px solid #e6e9f0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}
.analytics-table {
    width: 100%;
    border-collapse: collapse;
}
.analytics-table th,
.analytics-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e6e9f0;
}
.analytics-table th {
    background-color: #f7f9fc;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #65676b;
}
.analytics-table tbody tr:last-child td {
    border-bottom: none;
}
.analytics-table tbody tr:hover {
    background-color: #f7f9fc;
}
.content-table-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.content-table-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #e0e0e0;
}
.content-table-title {
    font-weight: 600;
}


/* --- Profile Page Content Grid Styles --- */
.content-grid-profile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.no-content-placeholder {
    text-align: center;
    padding: 50px;
    color: #65676b;
}
.content-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.content-card-thumbnail {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9; /* For a consistent video thumbnail shape */
    background-color: #f0f0f0;
}
.content-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.content-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes the info section fill the space */
}
.content-card-title {
    margin: 0 0 10px 0;
    font-size: 16px;
}
.content-card-actions {
    margin-top: auto; /* Pushes the actions to the bottom of the card */
    display: flex;
    gap: 15px;
}
/* ========================================= */
/* == STYLED ACTION BUTTONS ================ */
/* ========================================= */

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    
    /* THE FIX: Make all buttons blue by default */
    color: #0000FF; 
    
    font-weight: 600;
    padding: 4px; /* Add some padding for easier clicking */
    border-radius: 4px; /* Add a slight rounding */
    
    /* Add a nice transition for the hover effect */
    transition: background-color 0.2s ease; 
}

/* NEW: Add a subtle background on hover for all action buttons */
.action-button:hover {
    background-color: #f0f5ff; /* A very light blue */
}



/* --- New and Improved Like Button Styles --- */

/* Set the default color and add a nice transition */
button.like-btn {
    color: #0000FF; /* Your blue brand color */
    transition: transform 0.1s ease;
}

/* By default, the heart has no fill, only a blue outline (stroke) */
button.like-btn svg {
    fill: none;
    stroke: currentColor; /* 'currentColor' uses the button's color (#0000FF) */
}

/* When the button has the 'liked' class, we fill it with blue */
button.like-btn.liked svg {
    fill: currentColor; /* Fills the heart with the blue color */
}

/* Add a little "pop" effect when the button is clicked */
button.like-btn:active {
    transform: scale(0.9);
}





/* Hide homepage content area on profile pages */
.profile-page-body #content-display-area {
    display: none !important;
}









/* =============================================== */
/* == STYLES FOR PRODUCT PRICE & ACTION BUTTONS == */
/* =============================================== */

/* 1. Styles for the Currency Symbol in Price Input */
.input-with-symbol {
    position: relative; /* This is the container */
}

.input-with-symbol span {
    position: absolute; /* Position the symbol */
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

/* Add padding to the input to make space for the symbol */
.input-with-symbol input[type="number"] {
    padding-left: 28px !important;
}

/* 2. Styles for the new Edit/Delete buttons in the table */
.table-actions {
    display: flex;
    gap: 8px; /* Space between the buttons */
}

.action-btn-edit, .action-btn-delete {
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: white;
    transition: opacity 0.2s;
}

.action-btn-edit:hover, .action-btn-delete:hover {
    opacity: 0.85;
}

/* Blue color for the Edit button */
.action-btn-edit {
    background-color: #0000FF; /* Your brand blue */
}

/* Red color for the Delete button (a common standard) */
.action-btn-delete {
    background-color: #d93025; /* A standard 'danger' red */
}






/* --- NEW: Main Site Layout Engine --- */

.site-container {
    display: grid;
    /* Create two columns: one for the sidebar, one for the main content */
    grid-template-columns: 240px 1fr; /* This is the width of your open sidebar */
    transition: grid-template-columns 0.3s ease-in-out;
}

.site-container.sidebar-is-collapsed {
    /* When the sidebar is collapsed, its column width becomes 0 */
    grid-template-columns: 0px 1fr;
}

/* This ensures the sidebar itself doesn't take up space when collapsed */
.site-container.sidebar-is-collapsed #sidebar-container {
    /* We will need the CSS for your sidebar component itself to hide it,
       but for now, the layout will work. */
}




/* Adds a blue border to the delete confirmation popup */
#delete-confirm-modal .modal-content {
    border: 2px solid #0000FF;
}




/* Add this to style.css */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
/* This makes the delete button in the modal a bit bigger */
#confirm-delete-btn {
    padding-left: 20px;
    padding-right: 20px;
}



/* =============================================== */
/* --- Homepage Feed Card Styles --- */
/* =============================================== */

/* The main container for each post in the feed 
.feed-card {
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    margin-bottom: 20px; /* Space between cards 
} */
/* The header of the card with the author's info 
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
} */
/*
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f2f5;  Fallback color 
}*/




/* Add to style.css */
.profile-page {
    position: relative;
    z-index: 20;
    background: white;
}









/* ========================================================= */
/* == NEW: HOMEPAGE EMPTY STATE / PLACEHOLDER STYLES ======== */
/* ========================================================= */

/* This targets the content area specifically when it's empty */
#content-display-area:empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px); /* Adjust height as needed */
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef1f5 100%);
    border-radius: 12px;
    text-align: center;
}

/* This adds the "Create. Connect. Inspire." heading */
#content-display-area:empty::before {
    content: 'Create. Connect. Inspire.';
    font-size: 2.8rem;
    font-weight: 800;
    color: #1c1e21;
    margin-bottom: 12px;
}

/* This adds the subtitle */
#content-display-area:empty::after {
    content: 'The platform for writers, artists, and creators to share their work with the world.';
    font-size: 1.1rem;
    color: #65676b;
    max-width: 500px;
}






/* ========================================= */
/* == HOMEPAGE LAYOUT ENGINE ("Toshea" UI) = */
/* ========================================= */

/* The main wrapper for the homepage content *//* CHANGE THE SELECTOR TO THIS */
#homepage .page-content-wrapper {
    display: grid;
    /* On large screens, create a main column and a 320px sidebar */
    grid-template-columns: 1fr 320px;
    gap: 30px; /* Space between the feed and the sidebar */
    max-width: 1100px; /* Limits the total width on very large screens */
    margin: 20px auto; /* Centers the whole layout */
    padding: 0 15px;
}

/* The main feed column where posts appear */
#content-display-area {
    max-width: 680px; /* A standard, comfortable width for a social feed */
    margin: 0 auto; /* Centers the feed within its column */
}

/* The right sidebar for extra modules */
.right-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-module {
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    padding: 15px;
}

.module-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* --- Mobile Responsiveness (The "Toshea" Part for Phones) --- */
@media (max-width: 960px) {
    .page-content-wrapper {
        /* On smaller screens, switch to a single column layout */
        grid-template-columns: 1fr;
    }

    #content-display-area {
        max-width: 100%; /* Allow the feed to take the full width */
    }

    .right-sidebar-column {
        /* We hide the sidebar on mobile to keep the focus on the content.
           We can create a different mobile discovery experience later. */
        display: none;
    }
}


/* ========================================= */
/* MOBILE NAVIGATION FIX (DEFINITIVE VERSION) */
/* ========================================= */

/* 1. Remove any existing mobile-nav styles and replace with: */



/* ================================================= */
/* == DEFINITIVE MOBILE NAVIGATION & FOOTER FIX    == */
/* ================================================= */

/* This is the main container for the footer bar */

.mobile-nav {
    position: fixed; /* Keeps it locked to the bottom*/ 
    bottom: 0;
    left: 0;
    right: 0;       /* Spans the full width*/ 
    height: 60px;
    background-color: #ffffff;
    border-top: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;  /* Ensures it's on top of other content*/ 
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);

    /* This forces the browser to render it more reliably during scrolls*/
    transform: translateZ(0);
}





/*
.mobile-nav {
    position: fixed !important;
    bottom: 0 !important;
    height: 60px;
    left: 0 !important;
    right: 0 !important;
    background-color: #ffffff;
    border-top: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 2000 !important;
    transform: none !important;  Forcefully remove any transform 
}*/



/*
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #ffffff;
    border-top: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);

    z-index: 2000;
}*/

/* This styles the individual links (Home, Explore, etc.) */
.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1; /* Allows links to share space equally */
    min-width: 0; /* Prevents shrinking issues in flexbox */
    text-decoration: none;
    color: #8e8e8e;
    font-size: 10px;
    padding: 4px 0;
    gap: 2px;
}

.mobile-nav-link.active {
    color: #0000FF;
}

/* This styles the icons inside the links */
.mobile-nav-link svg {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
}

/* This styles the round "+" button */
.mobile-upload-btn {
    background-color: #0000FF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 255, 0.3);
    cursor: pointer;
    margin: 0 5px;
    transform: translateY(-10px);
    flex-shrink: 0; /* Prevents the button from being squished */
}

/* This styles the "+" icon inside the button */
.mobile-upload-btn svg {
    width: 28px;
    height: 28px;
}



/* ========================================= */
/* MOBILE NAVIGATION (only shows on mobile) */
/* ========================================= */


/* ========================================= */
/* RESPONSIVE ADJUSTMENTS */
/* ========================================= */

/* Mobile styles (768px and below) */
@media (max-width: 768px) {
    /* Show mobile navigation */
    .mobile-nav {
        display: flex;
    }
    
    /* Adjust main content padding to avoid mobile nav */
    main {
        padding-bottom: 70px;
    }
    
    /* Ensure body scrolls properly */
    body {
        overflow-x: hidden;
        position: relative;
        min-height: 100vh;
    }
    
    /* Hide desktop sidebar */
    #sidebar-container {
        display: none;
    }
    
    /* Switch to single column layout */
    .site-container {
        grid-template-columns: 1fr;
    }
    
    /* Adjust content area for mobile */
    .content-area {
        margin-left: 0;
        padding-bottom: 20px;
    }
    
    /* Adjust header spacing for mobile */
    .header-left {
        padding-left: 10px;
    }
    
    /* Adjust search bar spacing */
    .header-center {
        margin: 0 10px;
    }
    
    /* Tighter header padding */
    header {
        padding: 0 8px;
    }
}

/* Desktop styles (769px and above) */
@media (min-width: 769px) {
    /* Ensure mobile nav is hidden on desktop */
    .mobile-nav {
        display: none;
    }
    
    /* Remove mobile padding-bottom */
    main {
        padding-bottom: 0;
    }
    
    /* Show desktop sidebar */
    #sidebar-container {
        display: block;
    }
}

/* ========================================= */
/* ICON & LOGO SIZING FIX */
/* ========================================= */

/* Mobile Navigation Icon Fix */
.mobile-nav-link svg {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    flex-shrink: 0;
}









/* ========================================= */
/* == ICON & LOGO SIZING FIX ("Toshea" v2) = */
/* ========================================= */

/* --- 1. Header Logo Fix --- */
/* This makes the main logo in the top header larger and more visible. */
header .logo {
    height: 40px;/* Increased from 36px */
    width: auto;
}







/* ========================================= */
/* == RESPONSIVE HEADER BUTTONS CSS ======== */
/* ========================================= */

/* --- 1. General Styling for the new icon button --- */

/* ================================================= */
/* == STYLED NOTIFICATION BUTTON (Final Fix) ======= */
/* ================================================= */

/* This styles the new notification button */
#notification-trigger-btn {
    background: transparent;
    border: 2px solid #0000FF; /* Blue outline */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0000FF; /* Blue icon color */
    transition: all 0.2s ease;
}

/* This handles the hover and active (when clicked) states */
#notification-trigger-btn:hover,
#notification-trigger-btn.active {
    background-color: #0000FF; /* Blue fill */
    color: #ffffff; /* White icon color */
}

/* Ensure the SVG icon inside is sized correctly */
#notification-trigger-btn svg {
    width: 22px;
    height: 22px;
}

/* --- 2. The Responsive Switching Logic --- */

/* On DESKTOP screens (anything wider than 768px)... */
@media (min-width: 769px) {


    /* Make sure the desktop upload button is visible */
    #upload-trigger-container {
        display: block;
    }
}

/* On MOBILE screens (anything 768px or narrower)... */
@media (max-width: 768px) {
    /* Hide the desktop upload button */
    #upload-trigger-container {
        display: none;
    }

    /* Make sure the mobile notification button is visible */
    #notification-trigger-btn {
        display: flex; /* Use flex to ensure the icon inside is centered */
    }
}





/* ========================================= */
/* == NEW: TIPPING JAR MODAL STYLES ======== */
/* ========================================= */

/* The .hidden class is already defined, so it will be hidden by default */

.tip-modal-content {
    max-width: 380px; /* A bit smaller than the auth modal */
    padding: 20px;
}

.tip-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
}

#tip-author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #eee;
}

.tip-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1c1e21;
}

.tip-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-link-button {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #1c1e21;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    text-align: left;
}

.tip-link-button:hover {
    border-color: #0000FF;
    background-color: #f0f5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.tip-link-button img {
    width: 24px;
    height: 24px;
}

.tip-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.tip-modal-footer p {
    font-size: 12px;
    color: #8e8e8e;
    line-height: 1.4;
}



/* ========================================= */
/* == NEW: COMMENT OVERLAY MODAL STYLES ==== */
/* ========================================= */

/* Main overlay - semi-transparent background */
#comment-modal-overlay {
    background-color: rgba(240, 242, 245, 0.8); /* Light, semi-transparent background */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* The main content box for the comments */
.comment-modal-content {
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    height: 70vh; /* Takes up 70% of the screen height */
    display: flex;
    flex-direction: column; /* Organizes content vertically */
    overflow: hidden; /* Important for keeping rounded corners */
}

.comment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #dbdbdb;
    flex-shrink: 0; /* Prevents the header from shrinking */
}

.comment-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

/* The scrollable list for comments */
.comments-list {
    flex-grow: 1; /* Allows this section to grow and fill available space */
    overflow-y: auto; /* Enables vertical scrolling */
    padding: 15px 20px;
}

/* Individual comment item styling */
.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover; /* ADD THIS LINE */
}
.comment-body {
    font-size: 15px;
    line-height: 1.4;
}
.comment-author {
    font-weight: 600;
    margin-right: 5px;
}

/* Form for writing a new comment */
.comment-form-container {
    padding: 15px 20px;
    border-top: 1px solid #dbdbdb;
    background-color: #f9f9f9;
    flex-shrink: 0; /* Prevents the form from shrinking */
}

#comment-form {
    display: flex;
    gap: 10px;
}

#comment-form textarea {
    flex-grow: 1;
    border: 1px solid #dbdbdb;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 15px;
    resize: none;
    height: 38px; /* Starts as a single line */
}

#comment-form button {
    background-color: #0000FF;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    padding: 0 15px;
    cursor: pointer;
}





/* ========================================= */
/* == NEW: SMART REPLY STYLES ============== */
/* ========================================= */

.smart-reply-container {
    padding: 10px 20px;
    border-top: 1px solid #dbdbdb;
    background-color: #f9f9f9;
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Allows horizontal scrolling if many replies */
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.smart-reply-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

.smart-reply-btn {
    background-color: #e4e6eb;
    color: #050505;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0; /* Prevents buttons from shrinking */
    transition: background-color 0.2s ease;
}

.smart-reply-btn:hover {
    background-color: #d8dadf;
}





.login-prompt-btn {
    width: 100%;
    background-color: #0000FF;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-prompt-btn:hover {
    background-color: #0011cc;
}

    




/* ========================================================= */
/* == DEFINITIVE STYLES FOR ALL CARD ACTIONS & MENUS ======= */
/* ========================================================= */


/*Content cards 

/* This is the one, final style for all cards in your feed. */
.feed-card {
    background-color: #ffffff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    
    /* This allows child elements like the dropdown to be positioned correctly */
    position: relative; 
}

/* This class will be added by JS to lift the active card's menu */
.feed-card.is-active-menu {
    z-index: 20;
}

/* --- Card Header --- */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}
.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f0f0;
}
.author-name {
    font-weight: 600;
}


/* --- Card Body --- */
/* The key here is to apply overflow:hidden to the body, NOT the main card */
.card-body {
    overflow: hidden;
    border-radius: 8px; /* This ensures images respect the card's rounded corners */
}
.card-media {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px; /* This sets a limit on how tall an image can be */
    object-fit: cover;   /* This prevents the image from looking stretched */
}

/* --- Card Footer --- */
.card-footer {
    padding: 12px 15px;
}
.content-card-title {
    margin: 0 0 10px 0;
    font-size: 16px;
}
.content-card-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}


/* Fix for animated text containers */
.sam-text-wrapper {
    min-height: 3em; /* Minimum height for 2 lines of text */
    overflow: hidden;
    position: relative;
}

.animate-typewriter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    white-space: pre-wrap;
}

/* Typewriter animation */
@keyframes typewriter {
    from { width: 0 }
    to { width: 100% }
}

.animate-typewriter {
    animation: typewriter 3s steps(40) forwards;
    border-right: 2px solid #000; /* Optional cursor effect */
    animation: 
    looping-typewriter 5s steps(40, end) infinite,
    blink-caret .75s step-end infinite;
}

/* --- 4. Custom Content Card Styles --- */

/* Base card for all content types */

/* Special "Sam" Card */

/* ========================================= */
/* == DEFINITIVE FIX FOR CARDS & MOBILE NAV == */
/* ========================================= */

/* 1. The Sam Card Container Fix */
.sam-card .sam-content {
    padding: 40px;
    background: linear-gradient(45deg, #0000FF, #0052d4);
    text-align: center;
    border-radius: 8px;
    
    /* These properties stabilize the container's size */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px; 
}

/* 2. The Sam Card Text Fix */
.sam-card .sam-text {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-width: 100%;
}

.sam-content {
    overflow: hidden;
    display: flex; /* Helps center the inline-block text */
    justify-content: center;
}

/* This new rule styles our animation container */
.sam-text-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* This is the magic: it hides the animation's resizing */
}




/* In style.css */
.mobile-nav {
    /* Change the z-index to a higher value */
    z-index: 2000;
}

/* Special "Audio" Card */
.audio-card .audio-player {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
}
.audio-artwork {
    width: 60px;
    height: 60px;
    background-color: #f0f2f5;
    border-radius: 6px;
    flex-shrink: 0;
}
.audio-info {
    flex-grow: 1;
}
.audio-title {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}
.audio-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #0000FF;
    background-color: transparent;
    color: #0000FF;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}
.audio-play-btn:hover {
    background-color: #0000FF;
    color: #fff;
}
.audio-play-btn svg {
    width: 20px;
    height: 20px;
}


/* --- 5. Responsive Adjustments --- */
@media (max-width: 900px) {
    .main-content-layout {
        grid-template-columns: 1fr; /* Stack the sidebar below the feed */
    }
    .right-sidebar-column {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
}


/* --- Main Action Bar in Footer --- */
.content-card-actions {
    display: flex;
    align-items: center;
    gap: 8px; /* A balanced space between buttons */
}

/* --- General Style for ALL Action Buttons (Like, Tip, etc.) --- */
.action-button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #0000FF;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.action-button:hover {
    background-color: #f0f2f5; /* Light grey hover for all buttons */
}
.action-button svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
}

/* --- General Style for ALL More Options Menus --- */

/* This container holds the button and its dropdown */
.card-more-options-container {
    position: relative;
}

/* The three-dots button itself */
.more-options-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: #555;
    transition: background-color 0.2s ease;
}
.more-options-btn:hover {
    background-color: #f0f2f5;
}
.more-options-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Push the footer menu button to the far right */
.footer-more-options {
    margin-left: auto;
}

/* The dropdown panel */
.more-options-dropdown {
    position: absolute;
    width: 240px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    z-index: 10;
    padding: 8px;
    transition: opacity 0.2s, transform 0.2s;
}
.more-options-dropdown.hidden {
    display: none;
}

/* Position the header dropdown to open DOWN */
.card-header .more-options-dropdown {
    top: 100%;
    right: 0;
    margin-top: 4px;
    transform-origin: top right;
}

/* Position the footer dropdown to open UP */
.footer-more-options .more-options-dropdown {
    bottom: 100%;
    right: 0;
    margin-bottom: 4px;
    transform-origin: bottom right;
}

/* The links inside the dropdown */
.dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #0000FF;
    font-weight: 500;
    font-size: 15px;
}
.dropdown-option:hover {
    background-color: #f0f2f5;
}
.dropdown-option .dropdown-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Style for active options like 'Reposted' */
.dropdown-option.active {
    background-color: #e6f2ff;
    color: #0000FF;
    font-weight: 600;
}







  /* ========================================= */
/* == STYLES FOR ALL MODALS (Playlist, etc) == */
/* ========================================= */

/* The full-screen, semi-transparent background */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Make sure it's on top of everything */
    padding: 20px;
}

/* The class that hides the modal */
.modal-overlay.hidden {
    display: none;
}

/* The white box that holds the modal's content */
.modal-content {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 500px; /* Adjust as needed */
    position: relative;
    animation: slide-down 0.3s ease-out;
}

/* A little animation for the modal appearing */
@keyframes slide-down {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Styles for the header inside the modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

/* Styles for the main body/content area of the modal */
.modal-body {
    /* You can add specific styles here if needed */
}
/* Add this CSS to your main stylesheet or in a <style> tag in your header */
.playlist-list-container {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
}
.playlist-list-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.playlist-list-item:last-child {
    border-bottom: none;
}
.playlist-list-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
}
.create-playlist-form {
    display: flex;
    gap: 10px;
}
.create-playlist-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.create-playlist-form button {
    padding: 10px 15px;
    background-color: #0000FF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}





/* Styles for the new modal footer */
.modal-footer {
    display: flex;
    justify-content: flex-start; /* Aligns button to the left */
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.done-btn {
    background-color: #0000FF; /* Your site's blue color */
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 20px; /* Makes it a pill shape */
    padding: 10px 24px;
    cursor: pointer;
    font-size: 1rem;
}

.done-btn:hover {
    opacity: 0.9;
}






/* Styles for the playlist cards on you.php */
.history-item-card .playlist-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 20px 10px 10px 10px;
    text-align: left;
    transition: opacity 0.3s ease;
}

.playlist-card-overlay h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
}

.playlist-card-overlay span {
    font-size: 0.8rem;
    opacity: 0.8;
}




/* ========================================= */
/* == FINAL PROFILE HEADER RESPONSIVE FIX == */
/* ========================================= */

/* This targets the container for the name and stats */
.profile-name-and-stats {
    flex-wrap: wrap; /* Allows items to wrap onto the next line if needed */
    gap: 10px;       /* Adds a small gap for when they wrap */
}

/* This targets the container for just the stats (Posts, Followers, etc.) */
.profile-stats {
    flex-shrink: 0; /* Prevents the stats from being squished too much */
}

/* This is the magic for mobile screens */
@media (max-width: 600px) {
    .profile-name-and-stats {
        /* On small screens, stack the name and stats vertically */
        flex-direction: column;
        
        /* Align them to the start (left) instead of the bottom */
        align-items: flex-start;
        
        /* Add some space between the stacked name and stats block */
        gap: 15px;
    }

    /* This makes your stats (Posts, Followers) justify to the left on mobile */
    .profile-stats {
       justify-content: flex-start; 
       width: 100%;
    }
}







/* ========================================= */
/* == SEARCH RESULTS PAGE STYLES          == */
/* ========================================= */

.search-page-main {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px;
}

.search-results-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.results-section {
    margin-bottom: 40px;
}

.results-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.product-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.business-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Product Card Style */
.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}
.product-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #f0f0f0;
}
.product-card-info {
    padding: 15px;
}
.product-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}
.product-card-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #0000FF;
    margin: 0 0 5px 0;
}
.product-card-seller {
    font-size: 0.9rem;
    color: #555;
}

/* Business Card Style */
.business-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}
.business-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}







/* ========================================= */
/* == HOMEPAGE FILTER BAR STYLES          == */
/* ========================================= */

.filter-bar-container {
    margin-top: 20px; 
    display: flex;
    gap: 10px;
    padding: 10px 0;
    overflow-x: auto; /* This makes the bar horizontally scrollable/swipeable */
    /* Hide the scrollbar itself for a cleaner look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.filter-bar-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.filter-chip {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background-color: #f0f2f5;
    color: #050505;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap; /* Prevents text from wrapping */
    transition: background-color 0.2s, color 0.2s;
}

/* Style for the currently selected filter */
.filter-chip.active {
    background-color: #0000FF; /* Your brand blue */
    color: #ffffff;
}


/* ========================================= */
/* == SEARCH PAGE SPACING FIX (Corrected) == */
/* ========================================= */

/* 1. This removes the default padding from the top of the search page's main container. */
main.search-page-main {
    padding-top: 0;
}







/* ========================================= */
/* == PRIVACY SETTINGS STYLES             == */
/* ========================================= */

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.setting-info {
    flex: 1;
    padding-right: 20px;
}
.setting-info label {
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}
.setting-control {
    flex-shrink: 0;
}

/* Custom Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 23px;
    width: 23px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #0000FF; /* Your brand blue */
}
input:checked + .slider:before {
    transform: translateX(20px);
}






/* ========================================= */
/* == ACCOUNT DELETION STYLES             == */
/* ========================================= */

.deletion-section-wrapper {
    padding: 20px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
}

/* Add a red border to the permanent delete section to warn users */
.deletion-section-wrapper.danger-zone {
    border-color: #d93025;
    background-color: #fbeae9;
}
.danger-zone .settings-subtitle {
    color: #d93025;
}






/* ========================================= */
/* == FOLLOW BUTTON STYLES                  == */
/* ========================================= */

/* This targets the container for the username and button to align them nicely */
.author-name-link {
    vertical-align: middle; /* Aligns the username text with the button */
}

/* This is the base style for the button in both states */
.follow-btn {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 12px; /* Makes it look like a contained button */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    vertical-align: middle; /* Aligns the button with the username text */
}

/* This styles the button in its primary "Follow" state */
.follow-btn {
    background-color: #0000FF; /* Your brand blue */
    color: #ffffff;
}
.follow-btn:hover {
    opacity: 0.85; /* A simple hover effect */
}

/* This styles the button AFTER you have followed the user */
.follow-btn.following {
    background-color: #f0f2f5; /* A subtle light grey */
    color: #555; /* A dark grey text color */
    border-color: #ddd; /* A light border */
}
.follow-btn.following:hover {
    background-color: #e4e6eb; /* Makes the hover slightly darker */
}



.author-meta {
    display: flex;         /* This is the key: it aligns items horizontally */
    align-items: center;   /* This vertically centers the text and the button */
    gap: 8px;              /* This creates a perfect space between the items */
}




/* ========================================= */
/* == USERNAME LINK STYLE (with border)   == */
/* ========================================= */

.author-name-link {
    color: #0000FF; /* Your brand blue */
    font-weight: 600;
    text-decoration: none; /* We'll control the underline ourselves */
    
    /* THE NEW BORDER: A 1px dashed line in your brand blue */
    border-bottom: 1px dashed #0000FF;
    
    /* Adds a little space between the text and the new border */
    padding-bottom: 2px; 
    
    transition: all 0.2s ease;
}

/* On hover, we'll swap the dashed line for a solid one */
.author-name-link:hover {
    border-bottom-color: transparent; /* Hide the dashed border */
    text-decoration: underline; /* Show the solid underline instead */
}





/* ========================================= */
/* == COMMENT SECTION STYLES (Final)      == */
/* ========================================= */

/* This styles the author's name in a comment */
.comment-author,
.comment-author:link {
    font-weight: 600;
    color: #0000FF;         /* Your brand blue */
    text-decoration: none;
    margin-right: 6px;
}

/* THE FIX: This new rule keeps the link blue even after it's been clicked */
.comment-author:visited {
    color: #0000FF;
}

/* This adds the underline back only when you hover over the name */
.comment-author:hover {
    text-decoration: underline;
}

/* This style for the comment text is still good */
.comment-text {
    color: #333;
    line-height: 1.4;
}





/* ========================================= */
/* == NEW MOBILE UPLOAD SHEET STYLES      == */
/* ========================================= */

/* In style.css (replace the old sheet styles) */

#mobile-upload-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#mobile-upload-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
}

.sheet-content {
    background-color: #ffffff;
    width: 100%;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

#mobile-upload-sheet.is-open .sheet-content {
    transform: translateY(0);
}
/* Header of the slide-up panel */
.sheet-header {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}
.sheet-drag-handle {
    width: 40px;
    height: 5px;
    background-color: #cccccc;
    border-radius: 3px;
    margin: 0 auto;
}
#close-sheet-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 28px;
    background: none;
    border: none;
    color: #888;
}

/* Tabs for switching between upload types */
.sheet-upload-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
}
.sheet-option-tab {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: #f0f2f5;
    border: none;
    font-weight: 600;
}
.sheet-option-tab.active {
    background-color: #0000FF;
    color: #ffffff;
}

/* The main content area for the forms */
.sheet-views-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}
.sheet-view {
    display: none;
    text-align: center;
}
.sheet-view.active {
    display: block;
}
.sheet-file-select-btn {
    display: inline-block;
    background-color: #0000FF;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 600;
}
.sheet-sam-editor {
    width: 100%;
    height: 30vh;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
}
.sheet-publish-btn {
     width: 100%;
     margin-top: 15px;
     padding: 12px;
     background-color: #0000FF;
     color: white;
     border: none;
     border-radius: 8px;
     font-size: 16px;
     font-weight: 600;
}


/* ========================================= */
/* == RESPONSIVE TOGGLING (IMPORTANT!)    == */
/* ========================================= */

/* On desktop screens (wider than 768px)... */
@media (min-width: 769px) {
    /* Hide the new mobile sheet completely */
    #mobile-upload-sheet {
        display: none;
    }
}

/* On mobile screens (768px or narrower)... */
@media (max-width: 768px) {
    /* Hide the old desktop popup completely */
    .upload-popup-container {
        display: none !important;
    }
}





/* ========================================= */
/* == NEW RICH TEXT SAM EDITOR STYLES     == */
/* ========================================= */

.sam-editor-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/*
.sam-editor-header {
    display: flex;
    gap: 5px;
    padding: 8px;
    background-color: #f7f9fc;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;  Makes animation buttons scrollable 
}*/






.animation-btn:hover {
    border-color: #0000FF;
    background-color: #f5f8ff;
}


/* Add animation icons */
.animation-btn::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
}

.animation-btn[data-animation="fade-in"]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230000FF"><circle cx="12" cy="12" r="10" opacity="0.4"/><circle cx="12" cy="12" r="6"/></svg>');
}

.animation-btn[data-animation="typewriter"]::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230000FF"><rect x="4" y="4" width="16" height="4"/><rect x="6" y="10" width="12" height="2"/><rect x="8" y="14" width="8" height="2"/><rect x="10" y="18" width="4" height="2"/></svg>');
}

.animation-btn.active::before {
    filter: brightness(0) invert(1);
}






/* Replace existing sam-editor-input styles */

.sam-editor-input:focus {
    background-color: #fafbff;
}

.sam-editor-input:empty::before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

/* Character counter */







/* ========================================= */
/* == TEXT ANIMATION STYLES (Looping)     == */
/* ========================================= */

/* --- Pulse Fade Animation --- */
@keyframes pulseFade {
  0%, 100% { opacity: 0.4; } /* Start and end dim */
  50% { opacity: 1; }         /* Brightest in the middle */
}
.animate-fade-in {
  /* It will now gently fade in and out forever */
  animation: pulseFade 3s ease-in-out infinite;
}


/* --- Looping Typewriter Animation --- */
@keyframes looping-typewriter {
  0%, 10%   { width: 0; }         /* Start empty, pause */
  45%, 55%  { width: 100%; }      /* Type out, pause */
  90%, 100% { width: 0; }         /* Erase, pause */
}
@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #0000FF; }
}



/* --- Continuous Bounce Animation --- */
@keyframes continuousBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); } /* Bounce up */
  60% { transform: translateY(-7px); }
}
.animate-bounce {
  /* It will now have a continuous, subtle bounce effect */
  animation: continuousBounce 2.5s infinite;
}


/* --- Slide Up and Down Animation --- */
@keyframes slideInUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.animate-slide-up {
  /* It will now slide up, then slide back down, repeating */
  animation: slideInUp 2s ease-in-out infinite alternate;
}


/* In style.css */




/* Media attachment section */
.sam-media-attachment-section {
    margin-top: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background-color: #f7f9fc;
}

.sam-media-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.sam-media-edit-btn {
    background-color: transparent;
    border: 1px solid #0000FF;
    color: #0000FF;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sam-media-edit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sam-media-edit-btn svg {
    width: 16px;
    height: 16px;
}

.preview-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}




/* ========================================= */
/* == SAM EDITOR MEDIA STYLES (Grid View) == */
/* ========================================= */

.sam-tool-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    margin-left: auto;
}
.sam-tool-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    color: #555;
}




/* ========================================= */
/* == PHOTO LAYOUT SELECTOR STYLES        == */
/* ========================================= */

.layout-selector {
    display: none; /* Hidden by default, shown by JS when photos are selected */
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.layout-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background-color: #f0f2f5;
    cursor: pointer;
    padding: 4px;
    display: flex;
    gap: 2px;
}

.layout-btn.active {
    border-color: #0000FF;
    background-color: #e6f2ff;
}

/* Icons for the layout buttons */
.layout-btn .icon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 100%; height: 100%;}
.layout-btn .icon-grid > div { background-color: #aaa; }
.layout-btn.active .icon-grid > div { background-color: #0000FF; }

.layout-btn .icon-trio-left { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; width: 100%; height: 100%; grid-template-areas: "main side1" "main side2"; }
.layout-btn .icon-trio-left > div:nth-child(1) { grid-area: main; }
.layout-btn .icon-trio-left > div { background-color: #aaa; }
.layout-btn.active .icon-trio-left > div { background-color: #0000FF; }

.layout-btn .icon-duo-vertical { display: flex; flex-direction: column; gap: 2px; width: 100%; height: 100%; }
.layout-btn .icon-duo-vertical > div { background-color: #aaa; flex-grow: 1; }
.layout-btn.active .icon-duo-vertical > div { background-color: #0000FF; }


/* ========================================= */
/* == CSS GRID LAYOUTS FOR PREVIEWS       == */
/* ========================================= */

/* Default Grid Layout */
.sam-media-preview.grid-default {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}
.sam-media-preview.grid-default .preview-item {
    padding-top: 100%; /* Square aspect ratio */
}

/* Trio with Main Image on Left */
.sam-media-preview.trio-left {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas: "main side1" "main side2";
    max-height: 300px;
}
.sam-media-preview.trio-left .preview-item:nth-child(1) { grid-area: main; padding-top: 0; }
.sam-media-preview.trio-left .preview-item:nth-child(2) { grid-area: side1; padding-top: 100%; }
.sam-media-preview.trio-left .preview-item:nth-child(3) { grid-area: side2; padding-top: 100%; }

/* Duo Vertical Split */
.sam-media-preview.duo-vertical {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    max-height: 400px;
}
.sam-media-preview.duo-vertical .preview-item {
    padding-top: 50%; /* 2:1 aspect ratio */
}




/* ========================================= */
/* == NEW: AUDIO UPLOAD EDITOR STYLES     == */
/* ========================================= */

#audio-upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.audio-artwork-uploader {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f2f5;
    flex-shrink: 0;
}

#audio-artwork-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artwork-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid white;
}

.audio-form-fields input,
.audio-form-fields textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 10px;
}

.audio-form-fields textarea {
    min-height: 80px;
    resize: vertical;
}

#audio-file-selector-container {
    text-align: center;
}

#audio-filename-display {
    font-style: italic;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.sheet-publish-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}






.audio-play-btn .pause-icon { display: none; }
.audio-play-btn .play-icon { display: block; }
.audio-play-btn.playing .pause-icon { display: block; }
.audio-play-btn.playing .play-icon { display: none; }
.audio-description {
    font-size: 14px;
    color: #555;
    margin-top: 4px;
}









/* ========================================= */
/* == NEW: PHOTO GRID & DESCRIPTION STYLES == */
/* ========================================= */

.photo-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Default to 2 columns */
    gap: 2px;
}

.photo-grid-item {
    position: relative;
    padding-top: 100%; /* Square aspect ratio */
}

.photo-grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-description {
    font-size: 15px;
    color: #333;
    margin-top: -5px;
    margin-bottom: 10px;
    line-height: 1.4;
}




/* ========================================= */
/* == NEW: SCROLLS UPLOADER STYLES        == */
/* ========================================= */

#sheet-view-scrolls h3 {
    text-align: center;
    font-size: 18px;
    color: #333;
}

.scroll-options-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.scroll-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f7f9fc;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #0000FF;
    transition: all 0.2s ease;
}

.scroll-type-btn:hover {
    border-color: #0000FF;
    background-color: #e6f2ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.scroll-type-btn svg {
    width: 32px;
    height: 32px;
}

#sheet-view-scroll-editor {
    text-align: left;
}

#scroll-editor-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.scroll-form-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#scroll-title-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

#scroll-content-editor {
    width: 100%;
    min-height: 40vh; /* Provides a large area for writing */
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    font-size: 16px;
    line-height: 1.5;
    resize: vertical;
}



/* ========================================= */
/* == NEW: SCROLL CARD STYLES             == */
/* ========================================= */

.scroll-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensures the link fills the area */
}

.scroll-paper {
    background-color: #ffffff;
    padding: 20px;
    max-height: 400px; /* Limits how much text is shown in the preview */
    overflow: hidden;  /* Hides the rest of the text */
    position: relative;/* This is essential for the fade effect */
}

.scroll-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.scroll-type-badge {
    display: inline-block;
    background-color: #f0f2f5;
    color: #555;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.scroll-title {
    font-size: 22px;
    margin: 0;
    line-height: 1.2;
}

.scroll-content {
    font-family: 'Georgia', serif; /* A classic, readable font for stories */
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* This creates the fade-out effect at the bottom of the paper */
.scroll-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px; /* The height/intensity of the fade */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none; /* This makes sure the fade doesn't block clicks */
}




/* =============================================== */
/* == STYLES FOR LIVE SAM MEDIA LAYOUTS         == */
/* =============================================== */

/* This is the base container for the images in a live post */
.sam-media-display {
    display: grid;
    gap: 2px; /* A small gap between images */
    overflow: hidden;
    border-radius: 8px; /* Optional: rounds the corners of the whole grid */
}

/* This styles each image container within the grid */
.sam-media-display .preview-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 100%; /* Default to square images */
}

/* This styles the actual image tag to fill its container */
.sam-media-display .preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* Add this to style.css */
.preview-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes the video fill the square without stretching */
    background-color: #000; /* Adds a black background for videos */
}
/* --- The Specific Layout Rules --- */

/* For the 2x2 Grid */
.sam-media-display.grid-default {
    grid-template-columns: 1fr 1fr;
}

/* For the Trio with a main image on the left */
.sam-media-display.trio-left {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "main side1"
        "main side2";
    max-height: 400px; /* Limit the height of this layout */
}
.sam-media-display.trio-left .preview-item { padding-top: 0; height: 100%; }
.sam-media-display.trio-left .preview-item:nth-child(1) { grid-area: main; }
.sam-media-display.trio-left .preview-item:nth-child(2) { grid-area: side1; }
.sam-media-display.trio-left .preview-item:nth-child(3) { grid-area: side2; }

/* For the two images stacked vertically */
.sam-media-display.duo-vertical {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    max-height: 500px;
}
.sam-media-display.duo-vertical .preview-item {
    padding-top: 50%; /* Creates a 2:1 aspect ratio for each image */
}





/* In style.css */

/* ========================================= */
/* == ICONS FOR NEW LAYOUT BUTTONS        == */
/* ========================================= */

/* Icon for the "Main Top" button */
.layout-btn .icon-main-top { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; gap: 2px; width: 100%; height: 100%; grid-template-areas: "main main" "side1 side2"; }
.layout-btn .icon-main-top > div:nth-child(1) { grid-area: main; }
.layout-btn .icon-main-top > div { background-color: #aaa; }
.layout-btn.active .icon-main-top > div { background-color: #0000FF; }

/* Icon for the "Overlap Stack" button */
.layout-btn .icon-overlap-stack { position: relative; width: 100%; height: 100%; }
.layout-btn .icon-overlap-stack > div { background-color: #aaa; position: absolute; width: 60%; height: 60%; border-radius: 2px; }
.layout-btn .icon-overlap-stack > div:nth-child(1) { top: 10%; left: 10%; transform: rotate(-5deg); }
.layout-btn .icon-overlap-stack > div:nth-child(2) { top: 20%; left: 25%; transform: rotate(5deg); }
.layout-btn .icon-overlap-stack > div:nth-child(3) { top: 30%; left: 15%; transform: rotate(-2deg); }
.layout-btn.active .icon-overlap-stack > div { background-color: #0000FF; }




/* In style.css */

/* =============================================== */
/* == STYLES FOR NEW LIVE SAM MEDIA LAYOUTS     == */
/* =============================================== */

/* --- Layout 1: Main Top --- */
.sam-media-display.main-top {
    grid-template-columns: repeat(3, 1fr); /* 3 columns for the bottom row */
    grid-template-areas: "main main main" "side1 side2 side3";
}
.sam-media-display.main-top .preview-item { padding-top: 0; height: 100%; }
.sam-media-display.main-top .preview-item:nth-child(1) { grid-area: main; padding-top: 56.25%; /* 16:9 aspect ratio */ }
.sam-media-display.main-top .preview-item:nth-child(2) { grid-area: side1; padding-top: 100%; }
.sam-media-display.main-top .preview-item:nth-child(3) { grid-area: side2; padding-top: 100%; }
.sam-media-display.main-top .preview-item:nth-child(4) { grid-area: side3; padding-top: 100%; }

/* --- Layout 2: Overlap Stack --- */
.sam-media-display.overlap-stack {
    display: block; /* We override grid here */
    position: relative;
    aspect-ratio: 4 / 3; /* Give the container a nice shape */
}
.sam-media-display.overlap-stack .preview-item {
    position: absolute;
    width: 70%;
    height: 70%;
    padding-top: 0;
    border-radius: 8px;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.sam-media-display.overlap-stack .preview-item:hover {
    z-index: 10;
    transform: scale(1.05) !important;
}
.sam-media-display.overlap-stack .preview-item:nth-child(1) { top: 0; left: 5%; transform: rotate(-8deg); z-index: 1; }
.sam-media-display.overlap-stack .preview-item:nth-child(2) { top: 15%; left: 25%; transform: rotate(6deg); z-index: 2; }
.sam-media-display.overlap-stack .preview-item:nth-child(3) { top: 30%; left: 15%; transform: rotate(-2deg); z-index: 3; }





/* ========================================= */
/* == VIDEO SIZING & ASPECT RATIO FIX     == */
/* ========================================= */

/* This targets the video in a single-video "Media" post */
.video-container {
    background-color: #000;
    position: relative;
    width: 100%;
    /* This forces a 16:9 aspect ratio, preventing vertical stretching */
    aspect-ratio: 16 / 9;
}

.card-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Use 'contain' to prevent cropping the video */
}

/* This targets videos inside any of the Sam post layouts */
.sam-media-display .preview-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Use 'cover' for grid layouts */
    background-color: #000;
}



/* In style.css, add all of these new rules */

/* --- Horizontal Media Preview Row --- */
#sam-media-preview-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 10px;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#sam-media-preview-container::-webkit-scrollbar {
    display: none;
}

/* This overrides the old grid style */
.sam-media-preview {
    display: flex !important;
}

/* --- Individual Preview Item in the Row --- */
#sam-media-preview-container .preview-item {
    flex-shrink: 0; /* Prevents items from squishing */
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f2f5;
}

/* --- Overlay Buttons on Previews (Remove & Edit) --- */
.preview-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.preview-item:hover .preview-item-overlay {
    opacity: 1;
}
.preview-action-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}
.preview-action-btn svg {
    width: 18px;
    height: 18px;
}

/* --- Individual Media Editor Sheet --- */
.media-editor-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2010; /* Higher than the main upload sheet */
    display: none; /* Hidden by default */
}
.media-editor-sheet.is-open {
    display: flex;
}
#media-editor-preview-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}
#media-editor-preview-container img,
#media-editor-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.media-editor-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    margin-bottom: 20px;
}
.media-editor-fields label {
    font-weight: 600;
    font-size: 14px;
}





/* In style.css, add these new rules for the media editor */

.media-editor-sheet .sheet-content {
    height: 100vh; /* Make editor take the full screen */
    border-radius: 0;
}
.editor-cropper-container {
    flex-grow: 1;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#media-editor-image-target {
    display: block;
    max-width: 100%;
}
.editor-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background-color: #f0f2f5;
    flex-shrink: 0;
}
.editor-toolbar button {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-toolbar button svg {
    width: 24px;
    height: 24px;
}
.editor-footer {
    padding: 15px;
    flex-shrink: 0;
    border-top: 1px solid #e0e0e0;
}








/* ========================================= */
/* == SAM EDITOR MEDIA PREVIEW STYLES     == */
/* ========================================= */

/* --- NEW: The Container Override --- */
/* This is the crucial fix. It forces the preview container to be a 
   horizontal row, ignoring the conflicting 'grid' style. */
#sam-media-preview-container {
    display: flex !important; /* Use flexbox for a horizontal row */
    overflow-x: auto !important; /* Allow horizontal scrolling */
    gap: 10px !important; /* Space between items */
    padding: 10px 0 !important;
    margin-top: 10px !important;
    grid-template-columns: none !important; /* Disable the old grid layout */

    /* Hides the scrollbar for a cleaner look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#sam-media-preview-container::-webkit-scrollbar {
    display: none;
}

/* --- Individual Preview Thumbnail Item (No changes here) --- */
#sam-media-preview-container .preview-item {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f2f5;
}

/* --- Image and Video Styling (No changes here) --- */
#sam-media-preview-container .preview-item img,
#sam-media-preview-container .preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}

/* --- The 'Remove' Button (No changes here) --- */
#sam-media-preview-container .remove-media-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    z-index: 10;
}



/* ========================================= */
/* == STYLES FOR STICKERS IN THE FEED     == */
/* ========================================= */

.sam-text .sam-sticker {
  height: 1.2em; /* Makes the sticker about the same height as the text */
  width: auto;
  vertical-align: middle; /* Aligns the sticker nicely with the text line */
  margin: 0 0.1em; /* Adds a tiny bit of space around the sticker */
}





/* ==================================================== */
/* == FINAL SAM EDITOR HEADER V4 (Corrected Layout)  == */
/* ==================================================== */

/* Main header container */
.sam-editor-header {
    display: flex; /* Arranges animation section and toolbar side-by-side */
    align-items: flex-end; /* Aligns them to the bottom edge */
    gap: 15px;
    padding: 12px;
    background-color: #f7f9fc;
    border-bottom: 1px solid #e0e0e0;
}

/* The left section (title + buttons) that will grow */
.animation-section {
    flex-grow: 1; /* Takes up all available space */
    min-width: 0; /* A key property to allow scrolling within a flex item */
}

/* The "Choose an Animation" title */
.editor-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    text-align: left;
}

/* The container for ONLY the animation buttons that scrolls */
.animation-selector-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.animation-selector-scroll::-webkit-scrollbar {
    display: none;
}

/* Smaller animation buttons */
.animation-btn {
    flex: 0 0 auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.animation-btn.active {
    border-color: #0000FF;
    background-color: #f0f5ff;
}
.animation-preview {
    width: 100%;
    height: 35px;
    margin-bottom: 6px;
    border-radius: 6px;
    background-color: #f8f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.animation-preview-text {
    font-weight: 500;
    font-size: 14px;
    color: #0000FF;
}

/* The toolbar on the right (Sticker/Media) */
.sam-toolbar {
    display: flex;
    gap: 15px;
    flex-shrink: 0; /* Prevents the toolbar from shrinking */
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tool-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}





