/* Estilos mejorados para sistema de comentarios */
.comentarios-enhanced {
    margin: 36px auto;
    background: #23232b;
    border-radius: 18px;
    box-shadow: 0 4px 32px #00aaff22, 0 1.5px 0 #00aaff44;
    padding: 32px 28px;
    border: 2px solid #00aaff33;
    max-width: 1186px;
}

.comentarios-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #00aaff22;
}

.comentarios-title {
    font-size: 1.5em;
    color: #00aaff;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comentarios-title i {
    font-size: 1.2em;
}

.comentarios-stats {
    color: #aaa;
    font-size: 0.9em;
    background: #181920;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #00aaff22;
}

/* Editor de comentarios */
.comentario-editor {
    background: #181920;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 2px solid #00aaff22;
    transition: border 0.3s ease;
}

.comentario-editor:focus-within {
    border-color: #00aaff;
    box-shadow: 0 0 12px #00aaff33;
}

.editor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.editor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00aaff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 2px 8px #00aaff33;
    flex-shrink: 0;
    overflow: hidden;
}

.editor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.editor-user-info {
    flex: 1;
}

.editor-username {
    color: #00aaff;
    font-weight: bold;
    font-size: 1em;
}

.editor-status {
    color: #aaa;
    font-size: 0.85em;
    margin-top: 2px;
}

/* Barra de herramientas del editor */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.toolbar-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-btn:hover {
    background: #00aaff22;
    border-color: #00aaff;
    color: #00aaff;
}

.toolbar-btn.active {
    background: #00aaff;
    border-color: #00aaff;
    color: #fff;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: #444;
    margin: 0 4px;
}

/* Área de texto del editor */
.editor-textarea {
    width: 98%;
    min-height: 80px;
    background: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border 0.2s ease;
}

.editor-textarea:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 8px #00aaff33;
}

/* Subida de imágenes */
.image-upload-area {
    margin-top: 12px;
    padding: 16px;
    border: 2px dashed #00aaff44;
    border-radius: 8px;
    text-align: center;
    background: #1a1a1a;
    transition: all 0.3s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: #00aaff;
    background: #00aaff11;
}

.image-upload-area.dragover {
    border-color: #00aaff;
    background: #00aaff22;
}

.upload-icon {
    font-size: 2em;
    color: #00aaff;
    margin-bottom: 8px;
}

.upload-text {
    color: #aaa;
    font-size: 0.9em;
    margin-bottom: 8px;
}

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

.image-preview {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #00aaff33;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Botones del editor */
.editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.editor-left {
    display: flex;
    gap: 8px;
}

.editor-right {
    display: flex;
    gap: 8px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #666;
    color: #aaa;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #666;
    color: #fff;
}

.btn-send {
    background: #00aaff;
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-send:hover {
    background: #0090cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px #00aaff44;
}

.btn-send:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Lista de comentarios */
.comentarios-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comentario-item {
    background: #181920;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #00aaff22;
    transition: all 0.3s ease;
    position: relative;
}

.comentario-item:hover {
    border-color: #00aaff44;
    box-shadow: 0 2px 12px #00aaff22;
}

.comentario-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.comentario-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comentario-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #00aaff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 2px 8px #00aaff33;
    overflow: hidden;
}

.comentario-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.comentario-info {
    display: flex;
    flex-direction: column;
}

.comentario-autor {
    color: #00aaff;
    font-weight: bold;
    font-size: 1em;
}

.comentario-fecha {
    color: #aaa;
    font-size: 0.85em;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comentario-editado {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffaa00;
    font-size: 0.7em;
    font-style: italic;
    opacity: 0.8;
}

.comentario-editado i {
    font-size: 0.8em;
}

/* Editor inline para comentarios */
.inline-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: #1a1a1a;
    border: 2px solid #00aaff;
    border-radius: 8px;
    margin: 8px 0;
}

.inline-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 6px;
    border: 1px solid #444;
}

.inline-textarea-container {
    position: relative;
    min-height: 80px;
}

.inline-textarea-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 12px;
    color: #fff;
    font-size: 0.95em;
    line-height: 1.4;
    font-family: inherit;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.inline-textarea-preview strong {
    color: #00aaff;
    font-weight: bold;
}

.inline-textarea-preview em {
    color: #ffbb00;
    font-style: italic;
}

.inline-textarea-preview code {
    background: #333;
    color: #00aaff;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.inline-textarea {
    position: relative;
    width: 100%;
    min-height: 80px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 12px;
    color: transparent;
    font-size: 0.95em;
    line-height: 1.4;
    resize: vertical;
    font-family: inherit;
    z-index: 2;
    caret-color: #00aaff;
}

.inline-textarea:focus {
    outline: none;
    border-color: #00aaff;
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.2);
}

.inline-textarea:focus + .inline-textarea-preview {
    border-color: #00aaff;
}

.inline-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-save-inline,
.btn-cancel-inline {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-save-inline {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: #fff;
}

.btn-save-inline:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    transform: translateY(-1px);
}

.btn-cancel-inline {
    background: linear-gradient(135deg, #666, #444);
    color: #fff;
}

.btn-cancel-inline:hover {
    background: linear-gradient(135deg, #555, #333);
    transform: translateY(-1px);
}

.comentario-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.comentario-item:hover .comentario-actions {
    opacity: 1;
}

.action-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #00aaff22;
    border-color: #00aaff;
    color: #00aaff;
}

.action-btn.delete:hover {
    background: #ff444422;
    border-color: #ff4444;
    color: #ff4444;
}

/* Contenido del comentario */
.comentario-content {
    margin-bottom: 12px;
}

.comentario-texto {
    color: #fff;
    font-size: 1em;
    line-height: 1.5;
    word-wrap: break-word;
}

.comentario-texto p {
    margin: 0 0 8px 0;
}

.comentario-texto p:last-child {
    margin-bottom: 0;
}

.comentario-texto strong {
    color: #00aaff;
    font-weight: bold;
}

.comentario-texto em {
    color: #ffbb00;
    font-style: italic;
}

.comentario-texto code {
    background: #333;
    color: #00aaff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Imágenes en comentarios */
.comentario-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.comentario-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 2px solid #00aaff22;
}

.comentario-image:hover {
    transform: scale(1.08);
    border-color: #00aaff;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
}

/* Modal para ver imágenes */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    cursor: pointer;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    display: block;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.4em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    z-index: 10001;
}

.image-modal-close:hover {
    background: #ff6666;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 68, 68, 0.4);
}

/* Modal de confirmación */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.confirm-modal.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.confirm-modal-content {
    position: relative;
    background: #1a1d24;
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid #00aaff;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10003;
    margin-left: 35%;
    margin-top: 8%;
}

.confirm-modal.active .confirm-modal-content {
    transform: scale(1);
}

.confirm-modal-icon {
    text-align: center;
    margin-bottom: 20px;
}

.confirm-modal-icon i {
    font-size: 3.5em;
    color: #ffbb00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.confirm-modal-title {
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-align: center;
}

.confirm-modal-message {
    color: #aaa;
    font-size: 1em;
    text-align: center;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.confirm-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-btn-cancel,
.confirm-btn-ok {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.confirm-btn-cancel {
    background: #333;
    color: #fff;
    border: 2px solid #555;
}

.confirm-btn-cancel:hover {
    background: #444;
    border-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.confirm-btn-ok {
    background: #ff4444;
    color: #fff;
    border: 2px solid #ff6666;
}

.confirm-btn-ok:hover {
    background: #ff6666;
    border-color: #ff8888;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

/* Estados de carga */
.loading-comments {
    text-align: center;
    padding: 40px;
    color: #00aaff;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: #aaa;
    font-style: italic;
}

.ver-mas-comentarios {
    text-align: center;
    padding: 20px;
    margin-top: 10px;
}

.btn-ver-mas {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-ver-mas:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 170, 255, 0.4);
}

.btn-ver-mas:active {
    transform: translateY(0);
}

.btn-ver-mas i {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.btn-ver-mas:hover i {
    transform: translateY(2px);
}

.comentarios-restantes {
    font-size: 0.85em;
    opacity: 0.8;
    font-weight: normal;
}

/* Estilos para paginación de respuestas */
.ver-mas-respuestas {
    text-align: center;
    padding: 15px 0;
    margin-top: 8px;
}

.btn-ver-mas-respuestas,
.btn-ver-menos-respuestas {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 170, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-ver-mas-respuestas:hover,
.btn-ver-menos-respuestas:hover {
    background: linear-gradient(135deg, #0088cc, #006699);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.4);
}

.btn-ver-mas-respuestas:active,
.btn-ver-menos-respuestas:active {
    transform: translateY(0);
}

.btn-ver-mas-respuestas i,
.btn-ver-menos-respuestas i {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.btn-ver-mas-respuestas:hover i,
.btn-ver-menos-respuestas:hover i {
    transform: translateY(1px);
}

.respuestas-restantes {
    font-size: 0.8em;
    opacity: 0.8;
    font-weight: normal;
}

/* Botón "Ver menos" para comentarios */
.btn-ver-menos {
    background: linear-gradient(135deg, #666, #444) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 24px !important;
    font-size: 0.95em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-ver-menos:hover {
    background: linear-gradient(135deg, #555, #333) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(102, 102, 102, 0.4) !important;
}

.btn-ver-menos:active {
    transform: translateY(0) !important;
}

.btn-ver-menos i {
    font-size: 0.9em !important;
    transition: transform 0.3s ease !important;
}

.btn-ver-menos:hover i {
    transform: translateY(-2px) !important;
}

/* Estilos para respuestas */
.comentario-replies {
    margin-top: 12px;
    padding-left: 20px;
    position: relative;
}

.comentario-replies::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #00aaff44, #00aaff22);
    border-radius: 2px;
}

.respuestas-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.reply-connector-line {
    position: absolute;
    left: -20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #00aaff66, transparent);
    border-radius: 2px;
}

.respuesta-item {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #00aaff11;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.reply-indicator-line {
    width: 3px;
    min-height: 100%;
    background: #00aaff;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 4px;
    opacity: 0.6;
}

.respuesta-content-wrapper {
    flex: 1;
}

.respuesta-item:hover {
    border-color: #00aaff33;
    box-shadow: 0 2px 8px #00aaff11;
}

.respuesta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.respuesta-content-wrapper {
    flex: 1;
    min-width: 0;
}

.respuesta-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.respuesta-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #00aaff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: bold;
    box-shadow: 0 2px 6px #00aaff33;
    overflow: hidden;
}

.respuesta-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.respuesta-info {
    display: flex;
    flex-direction: column;
}

.respuesta-autor {
    color: #00aaff;
    font-weight: bold;
    font-size: 0.9em;
}

.respuesta-to {
    color: #aaa;
    font-weight: normal;
    font-size: 0.8em;
    margin-left: 6px;
}

.respuesta-fecha {
    color: #aaa;
    font-size: 0.75em;
    margin-top: 1px;
}

.respuesta-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.respuesta-item:hover .respuesta-actions {
    opacity: 1;
}

.respuesta-content {
    margin-bottom: 8px;
}

.respuesta-texto {
    color: #fff;
    font-size: 0.95em;
    line-height: 1.4;
    word-wrap: break-word;
}

.respuesta-texto p {
    margin: 0 0 6px 0;
}

.respuesta-texto p:last-child {
    margin-bottom: 0;
}

.respuesta-texto strong {
    color: #00aaff;
    font-weight: bold;
}

.respuesta-texto em {
    color: #ffbb00;
    font-style: italic;
}

.respuesta-texto code {
    background: #333;
    color: #00aaff;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

/* Responsive */
@media (max-width: 768px) {
    .comentarios-enhanced {
        margin: 20px 10px;
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .comentarios-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .toolbar-btn {
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    .editor-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .editor-left,
    .editor-right {
        width: 100%;
        justify-content: center;
    }
    
    .comentario-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .comentario-actions {
        opacity: 1;
        align-self: flex-end;
    }
    
    .comentario-images {
        justify-content: center;
    }
    
    .comentario-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    .comentario-replies {
        padding-left: 12px;
    }
    
    .respuesta-item {
        padding: 12px;
    }
    
    .respuesta-actions {
        opacity: 1;
    }
    
    .btn-ver-mas {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .btn-ver-mas-respuestas,
    .btn-ver-menos-respuestas {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .image-modal {
        padding: 15px;
    }
    
    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .inline-editor {
        padding: 10px;
    }
    
    .inline-textarea,
    .inline-textarea-preview {
        min-height: 60px;
        font-size: 0.9em;
    }
    
    .btn-save-inline,
    .btn-cancel-inline {
        padding: 6px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .comentarios-enhanced {
        margin: 16px 8px;
        padding: 16px 12px;
    }
    
    .comentario-item {
        padding: 7px 2px 6px 2px;
        border-radius: 8px !important;
        font-size: 0.89em;
    }
    
    .editor-textarea {
        min-height: 60px;
        font-size: 0.9em;
    }
    
    .toolbar-btn {
        font-size: 0.75em;
        padding: 3px 6px;
    }
    
    .comentario-image {
        max-width: 180px;
        max-height: 180px;
    }
    
    .image-modal {
        padding: 10px;
    }
    
    .image-modal-content {
        max-width: 98%;
        max-height: 98%;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }
    
    .inline-editor {
        padding: 8px;
    }
    
    .inline-textarea,
    .inline-textarea-preview {
        min-height: 50px;
        font-size: 0.85em;
    }
    
    .btn-save-inline,
    .btn-cancel-inline {
        padding: 5px 10px;
        font-size: 0.8em;
    }
} 

@media (max-width: 768px) {
    .comentarios-list .comentario-header {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        margin-bottom: 2px;
        justify-content: space-between;
    }
    .comentarios-list .comentario-user-line {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .comentarios-list .comentario-actions {
        opacity: 1 !important;
        align-self: unset;
        margin-top: 0;
        margin-left: 8px;
        display: flex;
        flex-direction: row;
        gap: 6px;
        position: static;
    }
}
@media (max-width: 480px) {
    .comentarios-list .comentario-header {
        gap: 4px;
    }
    .comentarios-list .comentario-actions {
        margin-left: 4px;
        gap: 4px;
    }
}

/* ===== ESTILOS MÓVILES MEJORADOS ===== */

/* Tablets y pantallas medianas */
@media (max-width: 768px) {
    /* Contenedor principal */
    .comentarios-enhanced {
        margin: 16px 8px;
        padding: 20px 14px;
        border-radius: 14px;
    }
    
    /* Título y estadísticas */
    .comentarios-title {
        font-size: 1.3em;
    }
    
    .comentarios-stats {
        font-size: 0.85em;
        padding: 5px 10px;
    }
    
    /* Editor principal */
    .comentario-editor {
        padding: 16px;
    }
    
    .editor-avatar {
        width: 36px;
        height: 36px;
        font-size: 1.1em;
    }
    
    .editor-username {
        font-size: 0.95em;
    }
    
    /* Toolbar Quill más compacto */
    .ql-toolbar.ql-snow {
        padding: 8px;
        font-size: 0.85em;
    }
    
    .ql-toolbar.ql-snow .ql-formats {
        margin-right: 6px;
    }
    
    .ql-toolbar.ql-snow button {
        width: 28px;
        height: 28px;
    }
    
    /* Editor Quill */
    .ql-container.ql-snow {
        font-size: 0.95em;
        min-height: 100px;
    }
    
    /* Botones del editor */
    .btn-send,
    .btn-cancel {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    /* Comentarios */
    .comentario-item {
        padding: 16px;
        border-radius: 10px;
    }
    
    .comentario-avatar {
        width: 32px;
        height: 32px;
        font-size: 1em;
    }
    
    .comentario-autor {
        font-size: 0.95em;
    }
    
    .comentario-fecha {
        font-size: 0.8em;
    }
    
    .comentario-texto {
        font-size: 0.95em;
        line-height: 1.5;
    }
    
    /* Botones de acción más grandes para touch */
    .action-btn {
        padding: 6px 10px;
        font-size: 0.85em;
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Imágenes en comentarios */
    .comentario-image {
        max-width: 100%;
        max-height: 250px;
    }
    
    .image-preview-item {
        width: 70px;
        height: 70px;
    }
    
    /* Respuestas */
    .respuestas-container {
        margin-left: 8px;
        position: relative;
    }
    
    /* Ocultar la línea del contenedor en tablets, solo mostrar la de cada respuesta */
    .respuestas-container .reply-connector-line {
        display: none;
    }
    
    .respuesta-item {
        padding: 12px;
        margin-left: 0;
        gap: 10px;
    }
    
    /* Ajustar la línea indicadora para tablets */
    .reply-indicator-line {
        width: 2px;
        min-height: calc(100% - 8px);
        opacity: 0.65;
    }
    
    .respuesta-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
    }
    
    .respuesta-autor {
        font-size: 0.9em;
    }
    
    .respuesta-fecha {
        font-size: 0.75em;
    }
    
    .respuesta-texto {
        font-size: 0.9em;
    }
    
    /* Editor inline Quill para edición */
    [id^="quill-inline-editor"] {
        min-height: 70px;
    }
    
    [id^="quill-inline-toolbar"] {
        padding: 6px;
    }
    
    /* Botones inline */
    .btn-save-inline,
    .btn-cancel-inline {
        padding: 8px 14px;
        font-size: 0.85em;
        min-height: 36px;
    }
    
    /* Modal de confirmación */
    .confirm-modal-content {
        width: 90%;
        max-width: 400px;
        padding: 20px;
    }
    
    .confirm-modal-title {
        font-size: 1.1em;
    }
    
    .confirm-modal-message {
        font-size: 0.9em;
    }
    
    .confirm-modal-actions {
        gap: 10px;
    }
    
    .confirm-modal-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    /* Contenedor principal */
    .comentarios-enhanced {
        margin: 12px 6px;
        padding: 16px 12px;
        border-radius: 12px;
    }
    
    /* Título */
    .comentarios-title {
        font-size: 1.2em;
        flex-wrap: wrap;
    }
    
    .comentarios-title i {
        font-size: 1em;
    }
    
    .comentarios-stats {
        font-size: 0.8em;
        padding: 4px 8px;
        margin-top: 8px;
    }
    
    /* Header del editor */
    .comentarios-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Editor */
    .comentario-editor {
        padding: 12px;
    }
    
    .editor-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .editor-avatar {
        width: 32px;
        height: 32px;
        font-size: 1em;
    }
    
    .editor-username {
        font-size: 0.9em;
    }
    
    .editor-status {
        font-size: 0.75em;
    }
    
    /* Toolbar Quill más compacto */
    .ql-toolbar.ql-snow {
        padding: 6px 4px;
        font-size: 0.75em;
    }
    
    .ql-toolbar.ql-snow .ql-formats {
        margin-right: 4px;
    }
    
    .ql-toolbar.ql-snow button {
        width: 24px;
        height: 24px;
        padding: 2px;
    }
    
    .ql-toolbar.ql-snow .ql-stroke {
        stroke-width: 1.5;
    }
    
    /* Editor Quill */
    .ql-container.ql-snow {
        font-size: 0.9em;
        min-height: 90px;
    }
    
    /* Botones del editor */
    .editor-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .editor-left,
    .editor-right {
        width: 100%;
        justify-content: stretch;
    }
    
    .btn-send,
    .btn-cancel {
        flex: 1;
        padding: 10px 16px;
        font-size: 0.9em;
        justify-content: center;
    }
    
    /* Contador de caracteres */
    .char-count {
        font-size: 0.8em;
    }
    
    /* Comentarios */
    .comentario-item {
        padding: 12px;
        border-radius: 10px;
    }
    
    .comentario-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .comentario-user {
        width: 100%;
    }
    
    .comentario-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.95em;
    }
    
    .comentario-autor {
        font-size: 0.9em;
    }
    
    .comentario-fecha {
        font-size: 0.75em;
        flex-wrap: wrap;
    }
    
    .comentario-actions {
        width: 100%;
        justify-content: flex-end;
        opacity: 1 !important;
        margin-top: 8px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 0.8em;
        min-width: 40px;
        min-height: 40px;
    }
    
    .comentario-texto {
        font-size: 0.9em;
    }
    
    /* Imágenes */
    .comentario-images {
        gap: 6px;
    }
    
    .comentario-image {
        max-width: 100%;
        max-height: 200px;
    }
    
    .image-preview {
        gap: 6px;
    }
    
    .image-preview-item {
        width: 60px;
        height: 60px;
    }
    
    .remove-image {
        width: 18px;
        height: 18px;
        font-size: 0.7em;
    }
    
    /* Respuestas */
    .comentario-replies {
        padding-left: 8px;
        margin-top: 12px;
    }
    
    .respuestas-container {
        margin-left: 8px;
        position: relative;
    }
    
    /* Ocultar la línea del contenedor en móvil, solo mostrar la de cada respuesta */
    .respuestas-container .reply-connector-line {
        display: none;
    }
    
    .respuesta-item {
        padding: 10px;
        margin-left: 0;
        gap: 8px;
    }
    
    /* Ajustar la línea indicadora para que sea más visible y única en móvil */
    .reply-indicator-line {
        width: 2px;
        min-height: calc(100% - 8px);
        margin-top: 4px;
        opacity: 0.7;
    }
    
    .respuesta-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.85em;
    }
    
    .respuesta-autor {
        font-size: 0.85em;
    }
    
    .respuesta-fecha {
        font-size: 0.7em;
    }
    
    .respuesta-texto {
        font-size: 0.85em;
    }
    
    .respuesta-actions {
        opacity: 1 !important;
        gap: 6px;
    }
    
    .respuesta-actions .action-btn {
        padding: 6px 10px;
        font-size: 0.75em;
        min-width: 36px;
        min-height: 36px;
    }
    
    /* Editor inline Quill */
    .inline-editor {
        padding: 10px;
    }
    
    [id^="quill-inline-toolbar"] {
        padding: 4px 2px;
        font-size: 0.7em;
    }
    
    [id^="quill-inline-toolbar"] .ql-formats {
        margin-right: 2px;
    }
    
    [id^="quill-inline-toolbar"] button {
        width: 22px;
        height: 22px;
    }
    
    [id^="quill-inline-editor"] {
        min-height: 60px;
        font-size: 0.85em;
    }
    
    .inline-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-save-inline,
    .btn-cancel-inline {
        width: 100%;
        padding: 10px;
        font-size: 0.85em;
        min-height: 40px;
        justify-content: center;
    }
    
    /* Modal de imágenes */
    .image-modal {
        padding: 10px;
    }
    
    .image-modal-content {
        max-width: 98%;
        max-height: 98%;
    }
    
    .image-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.3em;
        top: 10px;
        right: 10px;
    }
    
    /* Modal de confirmación */
    .confirm-modal-content {
        width: 95%;
        padding: 18px;
        margin: 10px;
    }
    
    .confirm-modal-title {
        font-size: 1em;
        margin-bottom: 12px;
    }
    
    .confirm-modal-message {
        font-size: 0.85em;
        margin-bottom: 16px;
    }
    
    .confirm-modal-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .confirm-modal-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9em;
    }
    
    /* Botón ver más respuestas */
    .btn-ver-mas-respuestas,
    .btn-ver-menos-respuestas {
        padding: 8px 14px;
        font-size: 0.8em;
        width: 100%;
        justify-content: center;
    }
    
    /* "En respuesta a" */
    .en-respuesta-a {
        font-size: 0.75em;
        padding: 4px 8px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .comentarios-enhanced {
        margin: 10px 4px;
        padding: 14px 10px;
    }
    
    .comentarios-title {
        font-size: 1.1em;
    }
    
    .comentario-item {
        padding: 10px;
    }
    
    .action-btn {
        padding: 6px 8px;
        font-size: 0.75em;
        min-width: 32px;
        min-height: 32px;
    }
    
    .btn-send,
    .btn-cancel {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .ql-toolbar.ql-snow {
        padding: 4px 2px;
    }
    
    .ql-toolbar.ql-snow button {
        width: 20px;
        height: 20px;
    }
}

/* ===== ANIMACIONES PARA NOTIFICACIONES ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Estilos para notificaciones */
.notification {
    font-family: inherit;
    font-size: 0.95em;
    line-height: 1.4;
}

.notification i {
    flex-shrink: 0;
}

.notification-success {
    background: linear-gradient(135deg, #00c853, #00a844) !important;
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.4) !important;
}

.notification-error {
    background: #ff4444 !important;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3) !important;
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    .notification {
        top: 15px !important;
        right: 15px !important;
        left: 15px !important;
        min-width: auto !important;
        max-width: none !important;
        padding: 12px 18px !important;
        font-size: 0.9em !important;
        border-radius: 8px !important;
    }
    
    .notification i {
        font-size: 1.1em !important;
    }
}

@media (max-width: 480px) {
    .notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto !important;
        max-width: none !important;
        padding: 12px 16px !important;
        font-size: 0.85em !important;
        border-radius: 8px !important;
        gap: 8px !important;
    }
    
    .notification i {
        font-size: 1em !important;
    }
}

@media (max-width: 360px) {
    .notification {
        top: 8px !important;
        right: 8px !important;
        left: 8px !important;
        padding: 10px 14px !important;
        font-size: 0.8em !important;
        gap: 6px !important;
    }
    
    .notification i {
        font-size: 0.95em !important;
    }
} 