/* assets/css/usuario.css */
/* --- Estilos Generales --- */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-image: url('/Images/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #333;
    font-size: 16px;
    color: #FFFFFF;
}

.page-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.25rem;
    box-sizing: border-box;
}

/* --- Columnas de Publicidad --- */
.ad-column {
    display: none;
    justify-content: center;
    align-items: flex-start;
    background-color: transparent;
    border-radius: 0.5rem;
    flex: 0.33 1 0px;
    max-width: 12.5rem;
    padding: 1rem;
    box-sizing: border-box;
}

.ad-column p {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 0.9rem;
}

/* --- Columna Central: Perfil y Publicaciones --- */
.profile-column {
    width: 100%;
    max-width: 70rem;
    flex-shrink: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.5rem;
    padding: 0.625rem;
    box-sizing: border-box;
}

/* Encabezado del perfil */
.profile-header {
    background-color: #FFD700;
    color: #333;
    height: 8.75rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    box-sizing: border-box;
    justify-content: space-between;
}

.profile-info-left {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
}

.profile-avatar {
    width: 5.625rem;
    height: 5.625rem;
    border-radius: 50%;
    background-color: #FF8C00;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-username {
    font-size: 2.25rem;
    font-weight: bold;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.header-nav a {
    color: #333;
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.header-nav a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* --- Navegación del Perfil ---*/
.profile-nav {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.profile-nav a {
    color: #FFFFFF;
    font-size: 1.1rem;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.profile-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- ESTILOS PARA EL BOTÓN DE FAVORITOS ---*/
.profile-actions {
    /* Contenedor para el botón de favoritos */
}

.favorite-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.favorite-btn.following {
    background-color: #5bc0de;
    /* Azul para "Quitar" */
    color: white;
}

.favorite-btn.not-following {
    background-color: #5cb85c;
    /* Verde para "Añadir" */
    color: white;
}

.favorite-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

/* --- Contenedor de Publicaciones --- */
.publications-carousel-vertical {
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 0 0.625rem;
}

.publications-carousel-vertical::-webkit-scrollbar {
    display: none;
}

/* --- ESTILOS PARA LAS TARJETAS DE PUBLICACIÓN --- */
.post-card {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    color: #FFFFFF;
    text-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.6);
    padding: 1rem;
    box-sizing: border-box;
}

.post-card:last-child {
    margin-bottom: 0;
}

.post-card-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.75rem;
    min-height: 28px;
}

.post-card-header>span {
    display: none;
}

.header-right-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-card-content video,
.post-card-content iframe {
    max-width: 60%;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    display: block;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.3);
}

.post-card-content video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.post-card-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.3);
}

.post-card-description {
    margin-top: 0.9375rem;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0 0.625rem;
}

.post-card-rating-area {
    padding: 0.625rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-scoring-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-input {
    width: 4.375rem;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    background-color: rgba(0, 0, 0, 0.2);
    color: #FFFFFF;
    text-align: center;
}

.score-submit-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background-color: #FFD700;
    color: #333;
    border-radius: 0.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.score-submit-btn:hover {
    background-color: #e6c200;
}

.score-submit-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.global-score-display {
    font-size: 1.125rem;
    font-weight: bold;
    color: #FFFFFF;
}

.post-card-comments-section {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

.post-card-comments-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #FFD700;
}

/* --- ESTILOS PARA EL FORMULARIO DE CREAR PUBLICACIÓN --- */
.create-post-container {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.create-post-container textarea {
    width: 100%;
    min-height: 80px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: #FFFFFF;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    resize: vertical;
    box-sizing: border-box;
}

.create-post-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.actions-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    cursor: pointer;
    color: #FFFFFF;
    border: none;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.file-upload-label:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.file-upload-label svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: #FFFFFF;
}

.create-post-actions button {
    padding: 0.6rem 1.5rem;
    border: none;
    background-color: #FFD700;
    color: #333;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}

.create-post-actions button:hover {
    opacity: 0.9;
}

#file-preview-container {
    margin-top: 1rem;
}

#file-preview-container img,
#file-preview-container video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.5rem;
}

.post-options {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tags-input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    color: #FFFFFF;
    padding: 0.6rem;
    font-size: 0.9rem;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.tags-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.adult-content-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFFFFF;
    font-size: 0.9rem;
    cursor: pointer;
}

.adult-flag {
    background-color: #d9534f;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

.post-actions {
    display: flex;
    align-items: center;
}

.post-actions button {
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
}

.edit-btn {
    background-color: #5bc0de;
    color: white;
}

.delete-btn {
    background-color: #d9534f;
    color: white;
}

/* --- ESTILOS PARA COMENTARIOS ANIDADOS Y PUNTUACIONES --- */
.comment-thread {
    margin-top: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
}

.comment-item {
    padding-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

.comment-body {
    flex-grow: 1;
}

.comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.comment-rating-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.comment-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background-color: #FF8C00;
}

.comment-content {
    margin-bottom: 0.5rem;
}

.comment-username {
    font-weight: bold;
    color: #FFD700;
    text-decoration: none;
    margin-right: 0.5rem;
}

.comment-username:hover {
    text-decoration: underline;
}

.comment-text {
    margin: 0;
    line-height: 1.4;
    color: #fff;
    font-size: 0.9rem;
}

.toggle-replies-btn {
    background: none;
    border: none;
    color: #FFD700;
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    font-weight: bold;
}

.toggle-replies-btn:hover {
    text-decoration: underline;
}

.replies-container {
    display: none;
    margin-top: 0.5rem;
}

.comment-form,
.reply-form {
    margin-top: 1rem;
}

.comment-form textarea,
.reply-form textarea {
    width: 100%;
    min-height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 0.25rem;
    padding: 0.5rem;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.comment-form button,
.reply-form button {
    display: block;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: none;
    background-color: #FFD700;
    color: #333;
    border-radius: 0.25rem;
    font-weight: bold;
    cursor: pointer;
}

.video-container {
    position: relative;
}

/* --- ESTILOS PARA MODAL DE TEMAS Y EDICIÓN --- */
.themes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.themes-modal-content {
    background-color: #2c2c2c;
    color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    position: relative;
}

.themes-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.themes-modal-content h2 {
    color: #FFD700;
    text-align: center;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #444;
}

.themes-modal-body {
    overflow-y: auto;
    padding: 20px;
    flex-grow: 1;
    min-height: 0;
}

.theme-category {
    margin-bottom: 20px;
}

.theme-category h3 {
    color: #FFD700;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.theme-label {
    display: flex;
    align-items: center;
    background-color: #444;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.theme-label:hover {
    background-color: #555;
}

.theme-label input[type="checkbox"] {
    margin-right: 10px;
}

.themes-modal-footer {
    padding: 15px;
    text-align: right;
    border-top: 1px solid #444;
}

.btn-submit {
    padding: 10px 25px;
    border: none;
    background-color: #FFD700;
    color: #333;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
}
.btn-submit:hover {
    opacity: 0.9;
}

/* Estilos para el formulario de edición */
#edit-post-form .form-group {
    margin-bottom: 15px;
}

#edit-post-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #ccc;
}
#edit-post-form .form-control {
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* --- Media Query para pantallas anchas --- */
@media (min-width: 1400px) {
    .ad-column {
        display: flex;
        flex: 0.33 1 0px;
    }
}

/* CORRECCIÓN DEFINITIVA PARA SCROLL EN MODAL DE EDICIÓN */
#edit-post-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

/* Bloquear scroll del fondo cuando el modal está abierto */
body.modal-open {
    overflow: hidden;
}
