/* Variables de tema */
:root {
    /* Light Theme */
    --primary-color: #007bff;
    /* Color principal de botones/acentos */
    --blue-color: #007bff;
    --blue-hover-color: #0056b3;
    --red-color: #ff4d4f;
    /* Rojo para acciones peligrosas */
    --red-hover-color: #c0392b;
    --bg-primary: #f0f2f5;
    /* Fondo principal claro */
    --bg-secondary: #ffffff;
    /* Fondo de elementos/modales claro */
    --bg-element: #e4e6eb;
    /* Fondo de elementos más sutil */
    --text-color: #1c1e21;
    /* Color de texto oscuro */
    --text-light: #65676b;
    /* Color de texto más claro */
    --border-color: #ddd;
    /* Color de borde claro */
    --input-bg: #f5f6f7;
    /* Fondo de input claro */
    --input-border: #ccc;
    /* Borde de input claro */
    --hover-color: #e0e0e0;
    /* Color de hover claro */
    --disabled-color: #a0a0a0;
    /* Color de elementos deshabilitados */
    --icon-color: #65676b;
    /* Color de iconos */
    --shadow-color: rgba(0, 0, 0, 0.1);
    /* Sombra ligera */
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary-color: #2e89ff;
    /* Azul más vibrante para dark mode */
    --blue-color: #2e89ff;
    --blue-hover-color: #1a6fd0;
    --red-color: #e74c3c;
    /* Rojo para dark mode */
    --red-hover-color: #c0392b;
    --bg-primary: #18191a;
    /* Fondo principal oscuro */
    --bg-secondary: #242526;
    /* Fondo de elementos/modales oscuro */
    --bg-element: #3a3b3c;
    /* Fondo de elementos más sutil */
    --text-color: #e4e6eb;
    /* Color de texto claro */
    --text-light: #b0b3b8;
    /* Color de texto más claro */
    --border-color: #3a3b3c;
    /* Color de borde oscuro */
    --input-bg: #2d2f31;
    /* Fondo de input oscuro */
    --input-border: #555;
    /* Borde de input oscuro */
    --hover-color: #4e4f50;
    /* Color de hover oscuro */
    --disabled-color: #555;
    --icon-color: #b0b3b8;
    --shadow-color: rgba(0, 0, 0, 0.5);
    /* Sombra más oscura */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 56px;
    /* Adjust based on header height */
    background-color: var(--bg-primary);
    color: var(--text-color);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Darker shadow */
    position: fixed;
    width: 100%;
    height: 56px;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

header .logo {
    height: 40px;
    border-radius: 50%;
}

.logo-login-register {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

header .upload-plus-btn {
    background: var(--bg-primary);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    cursor: pointer;
    margin: 0 10px 0 10px;
    display: none;
    font-size: 1.2em;
    /* Hidden by default, shown on desktop */
}
.fas.fa-plus {
    display: flex;
    justify-content: center;
}
header .search-bar {

    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    /* Darker search bar background */
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid var(--bg-primary);
    max-width: 600px;
}

header .search-bar input {
    border: none;
    outline: none;
    background: var(--bg-primary);
    flex-grow: 1;
    padding: 5px 0;
    font-size: 1em;
    border-radius: 50px;
    color: var(--text-color);
    /* Input text color */
}

header .search-bar input::placeholder {
    color: #b0b3b8;
    /* Placeholder color */
}

header .search-bar .search-icon {
    color: #b0b3b8;
    /* Lighter icon color */
    margin-left: 10px;
    cursor: pointer;
}

header .hamburger-btn {
    background: var(--bg-primary);
    border: none;
    font-size: 0.1em;
    cursor: pointer;
    display: none;
    /* Hidden by default, shown on mobile */
    color: var(--text-color);
    border-radius: 50%;
    height: 40px;
    width: 40px;
}

header .mobile-search-icon {
    background: var(--bg-primary);
    border: none;
    font-size: 1em;
    cursor: pointer;
    display: none;
    /* Hidden by default, shown on mobile */
    color: var(--text-color);
    margin-left: auto;
    /* Push to the right */
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

header .mobile-plus-btn {
    background: var(--bg-primary);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    flex-shrink: 0;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -250px;
    /* Hidden initially */
    width: 250px;
    height: 100%;
    background-color: var(--header-bg);
    padding-top: 60px;
    transition: right 0.3s ease;
    z-index: 999;
}

.hamburger-menu.show {
    right: 0;
}

.hamburger-menu a {
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    display: block;
}

.hamburger-menu a:hover {
    background-color: #3a3b3c;
    /* Slightly lighter on hover */
}

.hamburger-menu .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1em;
    color: var(--text-color);
    cursor: pointer;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: #18191a;
    border: none;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-actions .user-info {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);

    background: #6b6b6b35;
    border-radius: 50px;
    padding: 0 10px 0 0;
}

.user-actions .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.user-actions .user-name {
    font-weight: bold;
}

.user-actions .admin-button {
    background: linear-gradient(150deg, #00eeff 0%, #0080ff 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 12px;
    font-size: 0.9em;
    cursor: pointer;
    margin-right: auto;
    text-decoration: none;
    white-space: nowrap;
}

.user-actions button {
    background-color: var(--bg-primary);
    /* Darker button for desktop actions */
    color: var(--text-color);
    border: none;
    border-radius: 50px;
    padding: 10px 15px;
    font-size: 0.9em;
    cursor: pointer;
    margin-left: 10px;
    white-space: nowrap;
}

.user-actions button:hover {
    background-color: #8a8a8a44;
    color: var(--text-color);
}

.profile-dropdown-item.logout-link {
    background: #dc3545;
    color: white;
}

.profile-dropdown-item.logout-link:hover {
    background: #dd4b59;
    color: var(--text-color);
}

.profile-dropdown-item.profile-dropdown-create-page-button {
    background-color: var(--bg-element);
    margin: auto;
    border-radius: 10px;
    padding: 15px 15px;
}

.profile-dropdown-item.profile-dropdown-create-page-button:hover {
    background-color: #0080ff;
    color: var(--text-color);
}

.close-modal-fd-mod {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-radius: 50%;
    float: right;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-bg);
    justify-content: center;
    align-items: center;
}

/* Estilos de los modales base (si no estaban ya en un CSS global) */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6);
    /* Black w/ opacity */
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
}

.modal-content {
    background-color: var(--bg-secondary);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
    position: relative;
    max-width: 500px;
    width: 90%;
    color: var(--text-color);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.modal-content h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color) !important;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--input-border);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1em;
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s;
}

.modal-content button[type="submit"]:hover {
    background-color: var(--blue-hover-color);
}

.modal-content .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: var(--bg-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-content .close-modal:hover,
.modal-content .close-modal:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-content .log-register-modal,
.modal-content .reg-sesion-modal {
    background: none;
    color: var(--blue-color);
    border: none;
    cursor: pointer;
    font-size: 1em;
    padding: 5px;
    text-decoration: underline;
    transition: color 0.2s;
}

.modal-content .log-register-modal:hover,
.modal-content .reg-sesion-modal:hover {
    color: var(--blue-hover-color);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close-modal:hover,
.close-modal:focus {
    color: #ddd;
    /* Lighter on hover */
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    margin-top: 0;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.modal form {
    display: flex;
    flex-direction: column;
}

.modal input[type="text"],
.modal input[type="email"],
.modal input[type="password"],
.modal textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1em;
    background-color: var(--bg-primary);
    /* Input background */
    color: var(--text-color);
    font-family: sans-serif;
}

.modal input[type="text"]::placeholder,
.modal input[type="email"]::placeholder,
.modal input[type="password"]::placeholder,
.modal textarea::placeholder {
    color: #b0b3b8;
}


.modal button[type="submit"] {
    background: #0080ff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
}

.modal button[type="submit"]:hover {
    background-color: #0056b3;
}

.modal .confirm-btn {
    background-color: var(--danger-color);
}

.modal .cancel-btn-sesion {
    background-color: #ff2020;
    margin-top: 10px;
    border: none;
    color: white;
    width: 100%;
    padding: 10px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
}

.modal .cancel-btn-sesion:hover {
    background-color: #ff4040ff;
}

#loginMsg,
#registerMsg,
#logoutMsg,
#uploadMsg {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
}

.reg-sesion-modal {
    background-color: #2d2d2d;
    font-size: 18px;
    margin: 12px 0 0;
    width: 100%;
    padding: 8px;
    border-radius: 4px;
}

.log-register-modal {
    background-color: #2d2d2d;
    font-size: 18px;
    margin: 12px 0 0;
    width: 100%;
    padding: 8px;
    border-radius: 4px;
}

/* Upload Modal Specific */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    color: #b0b3b8;
}

.upload-box:hover {
    border-color: var(--primary-color);
}

.upload-box svg {
    margin-bottom: 5px;
    stroke: #b0b3b8;
    /* SVG icon color */
}

.media-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    cursor: grab;
}

.media-item.dragging {
    opacity: 0.5;
}

.media-item .media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .delete-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    cursor: pointer;
    z-index: 10;
}

.media-item .media-order-number {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    z-index: 10;
}

#progressContainer {
    width: 100%;
    background-color: var(--bg-primary);
    border-radius: 5px;
    margin-top: 15px;
    display: none;
}

#progressBar {
    width: 0%;
    height: 10px;
    background: linear-gradient(150deg, #00eeff 0%, #0080ff 100%);
    border-radius: 5px;
    text-align: center;
    color: white;
    line-height: 20px;
    font-size: 0.8em;
}

#progressText {
    display: block;
    text-align: center;
    margin-top: 5px;
    font-size: 0.9em;
    color: var(--text-color);
}

/* Desktop styles (default) */
@media (min-width: 769px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    header .upload-plus-btn {
        display: block;
        /* Show on desktop */
    }

    header .search-bar {
        margin: 0 auto;
        /* Center the search bar */
    }

    header .mobile-search-icon,
    header .mobile-plus-btn,
    header .hamburger-btn {
        display: none;
    }

    .hamburger-menu {
        display: none !important;
        /* Ensure it's hidden on desktop */
    }
}

/* Tablet and Mobile styles */
@media (max-width: 768px) {
    header {
        padding: 10px 20px;
        flex-wrap: nowrap;
    }

    header .logo {
        flex-shrink: 0;
        margin-right: 0;
    }

    header .search-bar {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        background-color: var(--bg-secondary);
        border-radius: 0;
        padding: 5px 15px;
        box-sizing: border-box;
        z-index: 1001;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        animation: fadeIn 0.3s ease-out;
        border: none;
    }

    header .search-bar.active {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    header .search-bar.active input {
        padding: 10px;
        font-size: 1.1em;
        width: calc(100% - 50px);
        /* Adjust for close button */
    }

    header .search-bar.active .search-icon {
        display: none;
    }

    header .mobile-search-icon {
        display: block;
        /* Show on mobile */
        order: 2;
        /* Position after plus button */
        margin-left: 15px;
    }

    header .mobile-plus-btn {
        display: flex;
        /* Show on mobile */
        order: 1;
        /* Position after logo */
        margin-left: 10px;
    }

    header .hamburger-btn {
        display: block;
        /* Show on mobile */
        order: 3;
        /* Position after search icon */
        margin-left: 15px;
    }

    header .upload-plus-btn,
    header .user-actions {
        display: none;
        /* Hide desktop elements */
    }

    .hamburger-menu {
        display: flex;
        /* Ensure it's display flex for transitions */
        right: -250px;
        /* Hidden initially */
    }

    .hamburger-menu.show {
        right: 0;
    }

    .theme-switch-wrapper {
        width: 100%;
        max-width: 300px;
        border-radius: 50px !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Estilos para el nuevo menú de perfil */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-dropdown-content {
    display: none;
    position: absolute;
    background-color: #242526;
    min-width: 270px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 100;
    right: 0;
    top: 60px;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
}

.profile-dropdown-content.show-dropdown {
    display: block;
}

.profile-dropdown-item {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.profile-dropdown-item:hover {
    background-color: #18191a;
    border-radius: 10px;
}

.profile-dropdown-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.profile-dropdown-active {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
}

.profile-dropdown-active:hover {
    background-color: var(--primary-color);
}

.profile-dropdown-item .logout-link {
    color: #ff4d4f;
}

.profile-dropdown-item .logout-link:hover {
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        padding: 10px 15px;
    }

    .search-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 10px 15px;
        background-color: var(--bg-secondary);
        z-index: 998;
        box-shadow: 0 2px 4px var(--shadow-color);
        display: none;
        /* Hidden by default */
        flex-direction: row;
    }

    .search-bar.active {
        display: flex;
    }

    .search-bar input {
        padding: 10px 40px 10px 15px;
    }

    .mobile-search-icon {
        background: none;
        border: none;
        font-size: 1.5em;
        color: var(--icon-color);
        cursor: pointer;
        display: block;
        /* Shown on mobile */
        margin-left: auto;
    }

    .user-actions {
        display: none;
        /* Hide default desktop buttons */
    }
}

.auth-modal-form-container {
    width: 100%;
}

/* Mobile landscape and larger tablets */
@media (min-width: 480px) and (max-width: 768px) {
    .modal-content.auth-modal {
        max-width: 90%;
        max-height: 90vh;
        width: auto;
        height: auto;
        padding: 20px;
        border-radius: 10px;
    }
}

/* Small mobile devices */
@media (max-width: 479px) {
    .modal-content.auth-modal {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        border-radius: 0;
        padding: 15px;
    }
}

/* Estilos para el nuevo menú de perfil */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-secondary);
    /* Usa variable de CSS */
    min-width: 270px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 100;
    right: 0;
    top: 60px;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    /* Estilos para scroll solo en desktop */
    max-height: calc(100vh - 120px);
    /* Altura máxima adaptable a la ventana */
    overflow-y: hidden;
    /* Por defecto oculto, se activa con media query */
    flex-direction: column;
}

.profile-dropdown-content.show-dropdown {
    display: flex;
    /* Usar flex para que el scroll funcione correctamente */
}

@media (min-width: 769px) {

    /* Solo aplicar scroll en escritorio */
    .profile-dropdown-content {
        overflow-y: auto;
        /* Permite scroll vertical */
        padding-right: 10px;
        /* Pequeño padding para que no se pegue al scrollbar */
    }
}

.profile-dropdown-pages-section {
    flex-grow: 1;
    /* Permite que esta sección ocupe todo el espacio disponible */
    overflow-y: auto;
    /* Permite scroll solo en la lista de páginas */
    -webkit-overflow-scrolling: touch;
    /* Para un scroll más suave en iOS */
    margin-bottom: 0px;
    /* Espacio antes de las opciones fijas */
    padding-right: 0px;
    /* Para que el scrollbar no se superponga */
    background: var(--bg-primary);
    border-radius: 10px;
}

.profile-dropdown-item {
    color: var(--text-color);
    /* Usa variable de CSS */
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px !important;
    /* Pequeño redondeo */
    cursor: pointer;
}

.profile-dropdown-item:hover {
    background-color: var(--hover-color);
    /* Usa variable de CSS */
}

.profile-dropdown-active {
    background-color: var(--primary-color);
    color: white;
}

.profile-dropdown-active:hover {
    background-color: var(--primary-color);
}

.profile-dropdown-item .logout-link {
    color: var(--red-color);
    /* Usa variable de CSS */
}

.profile-dropdown-item .logout-link:hover {
    color: #fff;
}

.profile-dropdown-item img {
    /* Estilo para avatares de las páginas en el dropdown */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-dropdown-item .page-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
    /* Ocupa el espacio restante */
    fill: currentColor;
}

.profile-dropdown-item .page-name {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: medium;
}

.profile-dropdown-item .page-username {
    font-size: smaller;
    color: var(--text-light);
}

.profile-dropdown-item .verified-icon {
    color: currentColor;
    /* Green for verified */
    font-size: 0.8em;
}

/* Estilos para las opciones fijas en la parte inferior del dropdown */
.profile-dropdown-fixed-options {
    flex-shrink: 0;
    /* Asegura que estas opciones no se encojan */
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.profile-dropdown-fixed-options .profile-dropdown-item {
    margin-bottom: 5px;
    /* Espacio entre los elementos fijos */
}

.profile-dropdown-fixed-options .profile-dropdown-item:last-child {
    margin-bottom: 0;
}

.profile-dropdown-create-page-button {
    background-color: var(--blue-color);
    color: white;
    text-align: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 10px;
}

.profile-dropdown-create-page-button:hover {
    background-color: var(--blue-hover-color);
}


/* Estilos para el Menú de Hamburguesa a pantalla completa */
.hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ocupa toda la altura de la ventana */
    background-color: var(--bg-primary);
    /* Fondo oscuro que ocupa toda la pantalla */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    /* Apila elementos verticalmente */
    transform: translateX(100%);
    /* Oculto por defecto */
    transition: transform 0.3s ease-in-out;
    padding: 0;
    /* Se elimina el padding para que los elementos hijos lo manejen */
    box-sizing: border-box;
}

.hamburger-menu.show {
    transform: translateX(0);
    /* Visible */
}

.hamburger-menu .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: var(--text-color);
    /* Usa variable de CSS */
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    /* Asegura que la X esté siempre encima */
}

.hamburger-header {
    padding: 20px;
    background-color: var(--bg-primary);
    /* Fondo consistente */
    border-bottom: 1px solid var(--border-color);
    z-index: 1001;
    /* Asegura que esté por encima del contenido que puede hacer scroll */
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    /* Asegura que el header no se encoja */
}

.hamburger-header .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.hamburger-header .user-name {
    font-size: 1.5em;
    color: var(--text-color);
    /* Usa variable de CSS */
    flex-grow: 1;
    /* Permite que el nombre ocupe espacio */
}

.hamburger-scrollable-content {
    flex-grow: 1;
    /* Ocupa todo el espacio disponible */
    overflow-y: auto;
    /* Permite scroll solo en esta sección */
    -webkit-overflow-scrolling: touch;
    /* Para un scroll más suave en iOS */
    padding: 20px;
    /* Padding para el contenido principal */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* Apila los elementos internos */
    align-items: center;
    /* Centra los elementos */
    flex-shrink: 1;
    /* Permite que se encoja si es necesario */
    min-height: 1px;
    /* Solución para asegurar que flex-shrink funcione bien con overflow */
}

.hamburger-menu a,
.hamburger-menu button {
    background: var(--bg-secondary);
    /* Usa variable de CSS */
    color: var(--text-color);
    /* Usa variable de CSS */
    text-decoration: none;
    font-size: 1.2em;
    /* Tamaño de fuente más grande */
    padding: 15px 20px;
    width: 100%;
    /* Ocupa el 100% del ancho del contenedor */
    max-width: 300px;
    /* Ancho máximo para consistencia */
    text-align: center;
    margin: 10px 0;
    border: none;
    border-radius: 50px;
    transition: background-color 0.3s ease;
    display: flex;
    /* Para alinear íconos y texto */
    align-items: center;
    justify-content: flex-start;
    /* Alinear a la izquierda */
    gap: 15px;
    /* Espacio entre ícono y texto */
}

.hamburger-menu a:hover,
.hamburger-menu button:hover {
    background-color: var(--hover-color);
    /* Usa variable de CSS */
}

.hamburger-menu .logout-link {
    color: var(--red-color);
    /* Usa variable de CSS */
}

.hamburger-menu .logout-link:hover {
    color: #fff;
    background-color: var(--red-hover-color);
    /* Usa variable de CSS */
}

.hamburger-menu .page-list-section,
.hamburger-menu .create-page-section {
    margin-top: 20px;
    width: 100%;
    /* Ocupa el 100% del ancho del scrollable content */
    max-width: 300px;
    text-align: center;
}

.hamburger-menu .page-list-section h4 {
    color: var(--text-light);
    /* Usa variable de CSS */
    margin-bottom: 10px;
    font-size: 1.2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    text-align: left;
}

.hamburger-menu .view-my-pages-button {
    background-color: var(--bg-element);
    /* Un color distinto para este botón */
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hamburger-menu .view-my-pages-button:hover {
    background-color: var(--hover-color);
}

.hamburger-menu .create-page-button {
    background-color: var(--blue-color);
    /* Usa variable de CSS */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hamburger-menu .create-page-button:hover {
    background-color: var(--blue-hover-color);
}

.hamburger-footer {
    padding: 20px;
    background-color: var(--bg-primary);
    /* Fondo consistente */
    border-top: 1px solid var(--border-color);
    z-index: 1001;
    /* Por encima del contenido que puede hacer scroll */
    text-align: center;
    width: 100%;
    /* Ocupa todo el ancho */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    /* Centrar el botón de logout */
    flex-shrink: 0;
    /* Asegura que el footer no se encoja */
}


/* Estilos para el nuevo modal "Mis Páginas" (este sigue siendo para el listado de páginas de "Ver Mis Páginas") */
.my-pages-modal .modal-content {
    max-width: 90%;
    width: 400px;
    max-height: 80vh;
    /* Controla la altura del modal para permitir scroll */
    overflow-y: auto;
    /* Permite scroll en el contenido principal del modal de páginas */
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

.my-pages-modal h2 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    flex-shrink: 0;
    /* Asegura que el título no se encoja */
}

.my-pages-list-content {
    flex-grow: 1;
    overflow-y: auto;
    /* ESTE es el elemento que hará scroll si las páginas son muchas */
    margin-top: 15px;
    padding-right: 10px;
    /* Para evitar que la barra de scroll se superponga al contenido */
    flex-shrink: 1;
    /* Permite que el contenido se encoja para dejar espacio al título */
    min-height: 1px;
    /* Para asegurar el correcto comportamiento del scroll con flexbox */
    box-sizing: border-box;
}

.my-pages-list-content p {
    text-align: center;
    color: var(--text-light);
}

.my-pages-list-content .page-list-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    background-color: var(--bg-element);
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.my-pages-list-content .page-list-item:hover {
    background-color: var(--hover-color);
}

.my-pages-list-content .page-list-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.my-pages-list-content .page-list-item .page-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.my-pages-list-content .page-list-item .page-name {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.my-pages-list-content .page-list-item .page-username {
    font-size: 0.9em;
    color: var(--text-light);
}

.my-pages-list-content .page-list-item .verified-icon {
    color: var(--green-color);
    /* Green for verified */
    font-size: 0.8em;
}


/* Estilos para el modal de Configuración (full-screen) */
.settings-modal .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    /* Ignora el max-width de .modal-content general */
    max-height: none;
    /* Ignora el max-height de .modal-content general */
    border-radius: 0;
    /* Sin bordes redondeados para full screen */
    padding: 0;
    /* El padding lo manejan los elementos internos */
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    /* Fondo oscuro */
    color: var(--text-color);
}

.settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.settings-modal .modal-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.8em;
}

.settings-modal .modal-header .close-modal {
    font-size: 2.5em;
    color: var(--text-color);
    cursor: pointer;
    padding: 0 10px;
}

.settings-modal-body {
    flex-grow: 1;
    overflow-y: auto;
    /* Permite scroll en el cuerpo del modal de configuración */
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
    color: var(--text-color);
}

.settings-section {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.settings-section h3 {
    color: var(--primary-color);
    /* Usar el color primario de tu tema */
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 1.5em;
}

.settings-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.settings-section button {
    background-color: var(--red-color);
    /* Rojo para acciones peligrosas */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.settings-section button.safe-action {
    background-color: var(--blue-color);
    /* Azul para acciones menos destructivas o de confirmación */
}

.settings-section button:hover:not(.disabled) {
    background-color: var(--red-hover-color);
    /* Rojo más oscuro al pasar el ratón */
}

.settings-section button.safe-action:hover:not(.disabled) {
    background-color: var(--blue-hover-color);
    /* Azul más oscuro al pasar el ratón */
}

.settings-section button:disabled {
    background-color: var(--disabled-color);
    cursor: not-allowed;
}

.delete-page-list {
    margin-top: 20px;
    max-height: 300px;
    /* Altura máxima para la lista de páginas con scroll */
    overflow-y: auto;
    /* Habilita el scroll */
    padding-right: 10px;
    /* Espacio para la barra de scroll */
}

.delete-page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-element);
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.delete-page-item:hover {
    background-color: var(--hover-color);
}

.delete-page-item:last-child {
    margin-bottom: 0;
}

.delete-page-item .page-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.delete-page-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.delete-page-item span {
    color: var(--text-color);
    font-weight: bold;
}

.delete-page-item small {
    color: var(--text-light);
    display: block;
    font-size: 0.9em;
}

.delete-page-item button {
    width: auto;
    margin: 0;
    padding: 8px 15px;
    font-size: 0.9em;
    background-color: var(--red-color);
    flex-shrink: 0;
    /* Asegura que el botón no se encoja */
}

.delete-page-item button:hover {
    background-color: var(--red-hover-color);
}

.settings-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.settings-message.success {
    background-color: var(--green-color);
    color: white;
}

.settings-message.error {
    background-color: var(--red-color);
    color: white;
}

/* Estilos para el botón de subir en móvil (reincorporado) */
.mobile-plus-btn {
    display: none;
    /* Por defecto oculto en desktop */
    background: var(--blue-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background-color 0.3s ease;
    order: 3;
    /* Ordena este botón visualmente */
    margin-left: auto;
    /* Empuja el botón a la derecha del search icon */
}

.mobile-plus-btn:hover {
    background-color: var(--blue-hover-color);
}

/* Estilos para el botón de hamburguesa (ahora con imagen de perfil o SVG) */
.hamburger-btn {
    display: none;
    /* Por defecto oculto en desktop */
    background: none;
    /* Eliminar fondo para mostrar la imagen */
    border: none;
    padding: 0;
    /* Eliminar padding para que la imagen ocupe todo el espacio */
    border-radius: 50%;
    /* Hacerlo redondo */
    width: 40px;
    /* Tamaño del botón */
    height: 40px;
    /* Tamaño del botón */
    overflow: hidden;
    /* Ocultar lo que se salga del círculo */
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 10px;
    /* Espacio después del botón de subir/search icon */
    order: 4;
    /* Ordena este botón visualmente */
}

.hamburger-btn .hamburger-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Asegura que el avatar sea redondo dentro del botón */
    display: block;
    /* Asegura que la imagen no tenga espacio extra */
}

.hamburger-btn .hamburger-svg {
    width: 100%;
    height: 100%;
    padding: 10px;
    /* Pequeño padding para el SVG */
    box-sizing: border-box;
    display: block;
    fill: var(--text-color);
    /* Color del SVG de hamburguesa */
}

/* Ocultar elementos en móviles por defecto si no están en el menú de hamburguesa */
@media (max-width: 768px) {

    .user-actions .profile-dropdown,
    .user-actions .admin-button,
    .upload-plus-btn,
    /* Ocultar el botón grande de subir en desktop */
    .header-icon-button {
        /* Ocultar el botón de notificaciones en móvil por defecto */
        display: none;
    }

    .mobile-plus-btn {
        /* Mostrar el botón de subir móvil */
        display: flex;
    }

    .search-bar:not(.active) {
        /* Ocultar la barra de búsqueda si no está activa en móvil */
        display: none;
    }

    .mobile-search-icon {
        /* Mostrar el icono de búsqueda móvil */
        display: block;
        order: 2;
        /* Ordena el icono de búsqueda */
        margin-left: auto;
        /* Empuja el icono de búsqueda a la derecha del logo */
    }

    .hamburger-btn {
        /* Mostrar el botón de hamburguesa */
        display: block;
    }

    header {
        /* Ajustar el header para que los elementos se posicionen correctamente */
        display: flex;
        justify-content: space-between;
        /* Alinea elementos al inicio */
        align-items: center;
        padding: 10px 15px;
        /* Reducir el padding horizontal para móvil */
    }

    header .logo {
        flex-shrink: 0;
        order: 1;
        /* Ordena el logo */
    }
}

/* Ajustes para desktop (min-width: 769px) */
@media (min-width: 769px) {

    .mobile-plus-btn,
    .mobile-search-icon,
    .hamburger-btn,
    .hamburger-menu-notification-item {
        /* Ocultar el nuevo elemento de notificación en el menú de hamburguesa en desktop */
        display: none !important;
        /* Asegura que estén ocultos en desktop */
    }

    .upload-plus-btn,
    .header-icon-button {
        /* Mostrar el botón de notificaciones en desktop */
        display: block;
    }

    .user-actions .profile-dropdown,
    .user-actions .admin-button {
        display: inline-block;
        /* Mostrar elementos de usuario en desktop */
    }

    .search-bar {
        display: flex;
        /* Mostrar barra de búsqueda completa en desktop */
    }

    header {
        justify-content: space-between;
        /* Restablece la justificación para desktop */
    }
}

/* Nuevos estilos para los modales de Login/Register */
.modal.auth-modal-full {
    align-items: center;
    justify-content: center;
}

.modal-content.auth-modal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    padding: 20px;
    border-radius: 0;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    /* Fondo oscuro por defecto para móvil */
    color: var(--text-color);
}

@media (min-width: 769px) {
    .modal-content.auth-modal {
        flex-direction: row;
        /* Diseño de dos columnas en escritorio */
        max-width: 800px;
        /* Ancho máximo del modal completo en escritorio */
        height: 500px;
        /* Altura fija en escritorio para la imagen */
        max-height: 90vh;
        /* Altura máxima para evitar desbordamiento */
        border-radius: 10px;
        overflow: hidden;
        /* Oculta el overflow para el diseño de dos columnas */
        padding: 20px;
        /* Sin padding global, cada sección lo maneja */
    }

    .auth-modal-image-container {
        flex: 1;
        /* Ocupa la mitad del espacio */
        background-image: url('../../img/bg-image.jpg');
        /* Imagen de fondo */
        background-size: cover;
        background-position: center;
        border-radius: 10px 0 0 10px;
        /* Solo la esquina izquierda redondeada */
        display: flex;
        /* Para centrar contenido si lo hubiera */
        align-items: center;
        justify-content: center;
        min-width: 300px;
        /* Asegura un ancho mínimo para la imagen */
    }

    .auth-modal-form-container {
        flex: 1;
        /* Ocupa la otra mitad del espacio */
        padding: 30px;
        /* Padding interno para el formulario */
        display: flex;
        flex-direction: column;
        justify-content: center;
        background-color: var(--bg-secondary);
        /* Fondo para el formulario */
        border-radius: 0 10px 10px 0;
        /* Solo la esquina derecha redondeada */
        overflow-y: auto;
        /* Scroll para el formulario si es necesario */
    }
}

/* Estilos del toggle switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Alinea texto a izquierda y switch a derecha */
    padding: 10px 15px;
    background-color: var(--bg-element);
    border-radius: 10px;
    margin: 10px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.theme-switch-wrapper:hover {
    background-color: var(--hover-color);
}

.theme-switch-wrapper span {
    color: var(--text-color);
    font-weight: bold;
    flex-grow: 1;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    /* Ancho del switch */
    height: 25px;
    /* Alto del switch */
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    /* Fondo del slider (desactivado) */
    transition: .4s;
    border-radius: 25px;
    /* Redondear el slider */
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    /* Tamaño del círculo */
    width: 19px;
    /* Tamaño del círculo */
    left: 3px;
    /* Posición inicial del círculo */
    bottom: 3px;
    background-color: white;
    /* Color del círculo */
    transition: .4s;
    border-radius: 50%;
    /* Hacer el círculo */
}

input:checked+.slider {
    background-color: var(--primary-color);
    /* Color del slider (activado) */
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
    /* Mover el círculo a la derecha */
}

/* Estilos para el botón de chat */
.chat-btn {
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    margin-right: 10px;
    color: currentColor;
    cursor: pointer;
    flex-shrink: 0;
    /* Evita que el botón se encoja */
}

.chat-btn svg {
    fill: var(--text-color);
}

.chat-btn:hover {
    background-color: var(--hover-color);
}

/* Estilos para el botón de notificaciones */
#notificationsBtn {
    background: var(--bg-primary);
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    /* Asegurar que no hay padding extra */
    width: 40px;
    /* Tamaño del botón */
    height: 40px;
    /* Tamaño del botón */
    display: flex;
    /* Para centrar el icono */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Redondear el botón */
    transition: background-color 0.2s ease;
    margin-right: 10px;
    /* Espacio entre el botón de chat y el de notificaciones */
    color: var(--text-color);
    /* Color del icono */
}

#notificationsBtn:hover {
    background-color: var(--hover-color);
}

#notificationsBtn .fas {
    font-size: 1.2em;
    /* Tamaño del icono */
}

#notificationCount {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--red-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: bold;
    padding: 2px;
    box-sizing: border-box;
    border: 1px solid var(--bg-primary);
    /* Borde para contrastar */
}

/* Estilos para el modal de notificaciones */
#notificationsModal {
    display: none;
    /* Oculto por defecto, JS lo cambiará a flex */
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

#notificationsModalContent {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    width: 90%;
    /* Ajuste para móviles */
    max-width: 500px;
    /* Ancho máximo para escritorio */
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease-out;
}

#notificationsModalContent.scale-100 {
    transform: scale(1);
    opacity: 1;
}

/* Estilos de utilidad (Tailwind-like) reutilizados para el modal de notificaciones */
#notificationsModal .flex {
    display: flex;
}

#notificationsModal .justify-between {
    justify-content: space-between;
}

#notificationsModal .items-center {
    align-items: center;
}

#notificationsModal .p-4 {
    padding: 1rem;
}

#notificationsModal .border-b {
    border-bottom-width: 1px;
}

#notificationsModal .border-gray-200 {
    border-color: var(--border-color);
}

#notificationsModal .text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

#notificationsModal .font-semibold {
    font-weight: 600;
}

#notificationsModal .text-gray-900 {
    color: var(--text-color);
}

#notificationsModal .relative {
    position: absolute;
    display: flex;
    right: 60px;
}

#notificationsModal .p-2 {
    padding: 0.5rem;
    cursor: pointer;
    border: none;
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    color: var(--text-color);
}

#notificationsModal .rounded-full {
    border-radius: 9999px;
}

#notificationsModal .hover\\:bg-gray-200:hover {
    background-color: var(--hover-color);
}

#notificationsModal .focus\\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

#notificationsModal .fa-ellipsis-v {
    color: var(--text-light);
}

#notificationsOptionsMenu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    width: 12rem;
    /* 48 = 192px */
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none;
}

#notificationsOptionsMenu.show {
    display: block;
}

#notificationsOptionsMenu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
}

#notificationsOptionsMenu button:hover {
    background-color: var(--hover-color);
}

#notificationsOptionsMenu button .fas {
    margin-right: 0.5rem;
}

#notificationsModal .flex-grow {
    flex-grow: 1;
}

#notificationsModal .overflow-y-auto {
    overflow-y: auto;
}

#notificationsModal .space-y-2> :not([hidden])~ :not([hidden]) {
    margin-top: 0.5rem;
}

#notificationsModal .text-center {
    text-align: center;
}

#notificationsModal .text-gray-500 {
    color: var(--text-light);
}

#notificationsModal .border-t {
    border-top-width: 1px;
}

#notificationsModal .text-right {
    text-align: right;
}

#notificationsModal .text-blue-500 {
    color: var(--blue-color);
}

#notificationsModal .hover\\:text-blue-600:hover {
    color: var(--blue-hover-color);
}

#notificationsModal .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
    cursor: pointer;
    width: 100%;
    border: none;
    border-radius: 50px;
    padding: 5px;
    background: var(--bg-primary);
}

#notificationsList {
    padding: 1rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.notification-item img {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    object-fit: cover;
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    /* Para alinear con el icono */
}

.notification-item .flex-grow {
    flex-grow: 1;
}

.notification-item p {
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin: 0;
    display: flex;
    align-items: flex-start;
}

.notification-item p strong {
    font-weight: 700;
    margin-right: 0.25rem;
}

.notification-item p .fas {
    font-size: 1.1em;
    margin-right: 0.5rem;
    margin-top: 2px;
    /* Ajuste fino */
    flex-shrink: 0;
}

.notification-item .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.notification-item.read {
    background-color: var(--bg-element);
    color: var(--text-light);
}

.notification-item:not(.read):hover {
    background-color: var(--hover-color);
}

/* Dark mode adjustments for notifications */
html[data-theme="dark"] #notificationsModal .text-gray-900 {
    color: var(--text-color);
}

html[data-theme="dark"] #notificationsModal .border-gray-200 {
    border-color: var(--border-color);
}

html[data-theme="dark"] #notificationsModal .hover\\:bg-gray-200:hover {
    background-color: var(--hover-color);
}

html[data-theme="dark"] #notificationsOptionsMenu {
    background-color: var(--bg-secondary);
}

html[data-theme="dark"] #notificationsOptionsMenu button {
    color: var(--text-color);
}

html[data-theme="dark"] #notificationsOptionsMenu button:hover {
    background-color: var(--hover-color);
}

html[data-theme="dark"] .notification-item.read {
    background-color: var(--bg-element);
    color: var(--text-light);
}

html[data-theme="dark"] .notification-item:not(.read) {
    background-color: var(--primary-color);
    /* Fondo para notificaciones no leídas en dark mode */
    color: var(--text-color);
}

html[data-theme="dark"] .notification-item:not(.read):hover {
    background-color: var(--primary-hover-color);
}


@media (max-width: 768px) {
    #notificationsModalContent {
        width: 95% !important;
        margin: 0 auto;
    }

    /* Estilos específicos para el elemento de notificación en el menú de hamburguesa */
    .hamburger-menu-notification-item {
        display: flex !important;
        /* Asegurar que se muestre en móviles */
        /* Hereda estilos de .hamburger-menu a */
        justify-content: flex-start;
        /* Alineación a la izquierda */
        align-items: center;
        gap: 15px;
        /* Espacio entre icono y texto */
        position: relative;
        /* Para posicionar el contador */
    }

    .hamburger-menu-notification-item .notification-count-mobile {
        position: absolute;
        right: 20px;
        /* Alineado a la derecha del botón */
        background-color: var(--red-color);
        color: white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7em;
        font-weight: bold;
        padding: 2px;
        box-sizing: border-box;
        border: 1px solid var(--bg-secondary);
        /* Borde para contrastar */
    }
}

/*Scrollbar*/
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-thumb {
    border-radius: 50px;
    background: var(--text-light);
    /* Usando una variable para el scrollbar */
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(150deg, var(--primary-color) 0%, var(--blue-hover-color) 100%);
    /* Usando variables de tema */
}

/* Repetido, se puede eliminar si se aplica globalmente */
@media (min-width: 770px) {
    ::-webkit-scrollbar {
        width: 7px;
        height: 7px;
    }

    ::-webkit-scrollbar-thumb {
        border-radius: 50px;
        background: var(--text-light);
        /* Usando una variable para el scrollbar */
    }

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(150deg, var(--primary-color) 0%, var(--blue-hover-color) 100%);
        /* Usando variables de tema */
    }
}

/* Repetido, se puede eliminar si se aplica globalmente */
@media (min-width: 570px) {
    ::-webkit-scrollbar {
        width: 7px;
        height: 7px;
    }

    ::-webkit-scrollbar-thumb {
        border-radius: 50px;
        background: var(--text-light);
        /* Usando una variable para el scrollbar */
    }

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(150deg, var(--primary-color) 0%, var(--blue-hover-color) 100%);
        /* Usando variables de tema */
    }
}