/* ===== MODAL MODERNO DE CREACIÓN ===== */

.modern-create-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: none;
    opacity: 1;
}

.modern-create-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.modern-create-modal .modal-container {
    position: relative;
    width: 600px;
    max-width: 600px;
    min-width: 600px;
    max-height: 95vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* 🎯 PROFESIONAL: Permitir scroll vertical si el contenido es muy grande */
    overflow-x: hidden; /* Evitar scroll horizontal */
    animation: none;
    transform: none;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER MODERNO ===== */
.modern-create-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.content-type-selector {
    display: flex;
    gap: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    position: relative;
    overflow: visible;
    flex: 1;
    min-width: 0;
    align-items: center;
}

/* ===== MENÚ MÓVIL - OCULTO POR DEFECTO (SOLO SE MUESTRA EN MÓVIL) ===== */
.mobile-menu-wrapper {
    display: none;
    position: relative;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    z-index: 100;
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 101;
}

.mobile-menu-btn:hover,
.mobile-menu-btn.active {
    background: rgba(83, 252, 27, 0.1);
    border-color: #53fc1b;
    color: #53fc1b;
}

.mobile-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    min-width: 160px;
    max-width: calc(100vw - 32px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    overflow: hidden;
    padding: 4px;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.mobile-menu-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
    display: block !important;
}

.mobile-menu-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #e5e7eb !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    white-space: nowrap;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-menu-item:hover {
    background: rgba(83, 252, 27, 0.1);
    color: #53fc1b !important;
}

.mobile-menu-item i {
    font-size: 16px;
    width: 20px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: #9ca3af !important;
    display: inline-block !important;
}

.mobile-menu-item:hover i {
    color: #53fc1b !important;
}

.mobile-menu-item span {
    flex: 1;
    white-space: nowrap;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit;
}

/* Clase para mostrar el botón de Artículo en desktop */
.type-btn[data-type="article"] {
    display: flex;
}

/* ===== DESKTOP: Mostrar Artículo, ocultar menú móvil ===== */
@media (min-width: 769px) {
    /* Mostrar botón de Artículo en desktop */
    .type-btn[data-type="article"] {
        display: flex !important;
    }
    
    /* Ocultar menú móvil en desktop */
    .mobile-menu-wrapper {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu-dropdown {
        display: none !important;
    }
}

.type-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    justify-content: center;
    box-shadow: none;
}

.type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    border: 1px solid transparent;
}

.type-btn.active {
    background: transparent !important;
    color: #111827 !important;
    border: none !important;
    border-bottom: 2px solid #111827 !important;
    box-shadow: none;
    transform: none;
}

.type-btn.active span {
    color: #111827 !important;
}

.type-btn.active i {
    color: #111827 !important;
}

.type-btn.active::before {
    opacity: 0;
}

/* Forzar estilo para botón inactivo */
.type-btn:not(.active) {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: #6b7280 !important;
}

.type-btn:not(.active) span {
    color: #6b7280 !important;
}

.type-btn:not(.active) i {
    color: #6b7280 !important;
}

.type-btn:hover:not(.active) {
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    box-shadow: none;
    transform: none;
}

.type-btn i {
    position: relative;
    z-index: 1;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.type-btn.active i {
    color: #ffffff;
}

.type-btn:hover:not(.active) i {
    color: #111827;
    transform: scale(1.1);
}

.close-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 50%;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 18px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.close-btn:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ===== CONTENIDO DEL MODAL ===== */
.modern-create-modal .modal-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

.text-input-section {
    margin-bottom: 20px;
}

/* Reducir margen cuando hay campos de livestream */
.modal-content.livestream-mode .text-input-section {
    margin-bottom: 8px;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.post-visibility {
    font-size: 12px;
    color: #8e8e8e;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    width: fit-content;
}

.modern-textarea {
    width: 100%;
    min-height: 120px;
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    background: #fafafa;
}

.modern-textarea:focus {
    border-color: #53fc1b;
    background: white;
    box-shadow: 0 0 0 4px rgba(83, 252, 27, 0.1);
}

.modern-textarea::placeholder {
    color: #8e8e8e;
    font-weight: 400;
}

/* ===== OPCIONES DE CONTENIDO ===== */
.content-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: transparent;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
}

.option-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option-btn i {
    font-size: 20px;
    color: #6c757d;
}

.option-btn span {
    color: #6c757d !important;
    font-weight: 500;
}

.option-btn:hover span {
    color: #6c757d !important;
}

.option-btn.active span {
    color: #6c757d !important;
}

.option-btn.active {
    background: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== MODO OSCURO PARA BOTONES DE OPCIONES ===== */
.dark-mode .option-btn {
    background: transparent;
    border-color: #495057;
    color: #adb5bd;
}

.dark-mode .option-btn:hover {
    background: #0E0E0E !important;
    border-color: #6c757d;
}

.dark-mode .option-btn i {
    color: #adb5bd;
}

.dark-mode .option-btn span {
    color: #adb5bd !important;
}

.dark-mode .option-btn:hover span {
    color: #adb5bd !important;
}

.dark-mode .option-btn.active span {
    color: #adb5bd !important;
}

.dark-mode .option-btn.active {
    background: #0E0E0E !important;
    border-color: #6c757d;
}

/* ===== ÁREA DE MEDIA ===== */
.media-upload-section {
    margin-bottom: 20px;
    /* 🎯 PROFESIONAL: Permitir que la sección se expanda para mostrar media completo */
    overflow: visible;
}

.media-upload-area {
    border: 2px dashed #e1e5e9;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    min-height: 120px;
    /* 🎯 PROFESIONAL: Permitir que el área se expanda para mostrar media completo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Permitir que el contenido se vea completo */
}

.media-upload-area:hover,
.media-upload-area.dragover {
    border-color: #53fc1b;
    background: #f8fff8;
}

.upload-placeholder i {
    font-size: 36px;
    color: #999;
}

.upload-placeholder span {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.upload-placeholder small {
    font-size: 11px;
    color: #aaa;
}

.media-preview {
    display: none; /* Se mostrará con JavaScript cuando hay media */
    position: relative;
    width: 100%;
    /* 🎯 PROFESIONAL: Sin altura fija, se ajusta al contenido manteniendo aspect ratio */
    min-height: 120px;
    max-height: 600px; /* Aumentado para videos verticales e imágenes grandes */
    overflow: visible; /* Cambiado de hidden a visible para ver todo el contenido */
    border-radius: 8px;
    background: #000; /* Fondo negro para videos */
}

.media-preview[style*="display: block"],
.media-preview[style*="display:flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.media-preview img,
.media-preview video {
    /* 🎯 PROFESIONAL: Mantener aspect ratio original, escalar para que quepa completo */
    max-width: 100%;
    max-height: 600px; /* Altura máxima razonable para videos verticales e imágenes grandes */
    width: auto;
    height: auto;
    object-fit: contain; /* Mostrar completo sin recortar */
    border-radius: 8px;
    display: block;
    margin: 0 auto; /* Centrar horizontalmente */
}

/* Asegurar que videos verticales se vean completos */
.media-preview video {
    max-height: 500px; /* Ligeramente menor para videos */
}

/* Asegurar que imágenes grandes se vean completas */
.media-preview img {
    max-height: 600px; /* Más alto para imágenes */
}

.remove-media {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.remove-media:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 🎯 PROFESIONAL: Estilos para modo oscuro */
.dark-mode .media-upload-area {
    background: #0E0E0E !important;
    border-color: #4a5568;
}

.dark-mode .media-upload-area:hover,
.dark-mode .media-upload-area.dragover {
    border-color: #53fc1b;
    background: #0E0E0E !important;
}

.dark-mode .upload-placeholder i {
    color: #9ca3af;
}

.dark-mode .upload-placeholder span {
    color: #d1d5db;
}

.dark-mode .upload-placeholder small {
    color: #6b7280;
}

.dark-mode .media-preview {
    background: #000;
}

/* ===== CAMPOS ADICIONALES ===== */
.additional-fields {
    margin-bottom: 20px;
}

.additional-fields label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.modern-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #fafafa;
}

.modern-input:focus {
    border-color: #53fc1b;
    box-shadow: 0 0 0 4px rgba(83, 252, 27, 0.1);
    background: white;
}

.feeling-field {
    margin-bottom: 20px;
}

.feeling-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.feeling-option {
    width: 60px;
    height: 60px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.feeling-option:hover,
.feeling-option.selected {
    border-color: #53fc1b;
    background: #f8fff8;
    box-shadow: 0 4px 12px rgba(83, 252, 27, 0.2);
}

/* ===== FOOTER DEL MODAL ===== */
.modern-create-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    margin-top: auto;
}

.char-count {
    font-size: 12px;
    color: #8e8e8e;
    font-weight: 500;
}

.char-count.warning {
    color: #dc3545;
}

.footer-right {
    display: flex;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    color: #6c757d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    color: #495057;
    border-color: #adb5bd;
    background: #f8f9fa;
}

.btn-publish {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #53fc1b !important;
    border: none;
    border-radius: 12px;
    color: #000 !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(83, 252, 27, 0.3);
}

.btn-publish:hover {
    background: #4ae317 !important;
    box-shadow: 0 6px 20px rgba(83, 252, 27, 0.4);
    transform: translateY(-1px);
}

.btn-publish:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-publish.success {
    background: #28a745;
    color: white;
}

/* ===== CAMPOS DE ARTÍCULO ===== */
.article-fields {
    display: grid;
    gap: 15px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.article-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.article-field .modern-input,
.article-field .modern-textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.article-field .modern-input:focus,
.article-field .modern-textarea:focus {
    border-color: #53fc1b;
    box-shadow: 0 0 0 3px rgba(83, 252, 27, 0.15);
    background-color: #fff;
    outline: none;
}

.article-field .char-counter {
    font-size: 11px;
    color: #888;
    text-align: right;
    margin-top: 4px;
}

.article-field .char-counter.warning {
    color: #dc3545;
    font-weight: 600;
}

/* ===== UPLOAD DE IMÁGENES DE ARTÍCULO ===== */
.image-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f9f9f9;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: #53fc1b;
    background-color: #f8fff8;
}

.image-upload-area .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
}

.image-upload-area .upload-placeholder i {
    font-size: 36px;
    color: #999;
}

.image-upload-area .upload-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

.image-upload-area .upload-placeholder small {
    font-size: 11px;
    color: #aaa;
}

.image-preview {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.image-preview img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.image-preview .remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.image-preview .remove-image:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ===== RESPONSIVE DESIGN - TABLET Y MOBILE (FULLSCREEN) ===== */
@media (max-width: 768px) {
    /* Modal fullscreen en tablet y móvil */
    .modern-create-modal {
        align-items: stretch !important;
        padding: 0 !important;
    }
    
    .modern-create-modal .modal-backdrop {
        display: none;
    }
    
    .modern-create-modal .modal-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        max-height: 100vh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        background: #ffffff; /* ✅ MODO CLARO: Fondo blanco por defecto */
        box-sizing: border-box;
    }
    
    /* ✅ MODO OSCURO: Solo aplicar fondo oscuro cuando está activo */
    .dark-mode .modern-create-modal .modal-container {
        background: #0E0E0E !important;
    }
    
    /* Header con tabs - estilo app nativa */
    .modern-create-modal .modal-header {
        padding: 0;
        background: #ffffff; /* ✅ MODO CLARO: Fondo blanco por defecto */
        border-bottom: 1px solid #e5e7eb; /* ✅ MODO CLARO: Borde sutil */
        position: relative;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        overflow: visible;
    }
    
    /* ✅ MODO OSCURO: Header oscuro solo cuando está activo */
    .dark-mode .modern-create-modal .modal-header {
        background: #0E0E0E !important;
        border-bottom: none;
    }
    
    .content-type-selector {
        display: flex;
        flex: 1;
        min-width: 0;
        background: transparent; /* ✅ MODO CLARO: Transparente para heredar del header */
        padding: 0;
        gap: 0;
        position: relative;
        overflow: visible;
    }
    
    /* ✅ MODO OSCURO: Fondo oscuro solo cuando está activo */
    .dark-mode .content-type-selector {
        background: #111;
    }
    
    .type-btn {
        flex: 1;
        padding: 16px 8px 14px;
        font-size: 11px;
        min-width: auto;
        gap: 6px;
        border-radius: 0;
        border: none !important;
        border-bottom: 3px solid transparent !important;
        background: transparent !important;
        justify-content: center;
        flex-direction: column;
        color: #6b7280 !important; /* ✅ MODO CLARO: Color gris claro por defecto */
        transition: all 0.2s ease;
    }
    
    /* ✅ MODO OSCURO: Color gris oscuro solo cuando está activo */
    .dark-mode .type-btn {
        color: #888 !important;
    }
    
    .type-btn i {
        font-size: 18px;
        margin-bottom: 4px;
        color: inherit !important;
    }
    
    .type-btn span {
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        letter-spacing: 0.3px;
        color: inherit !important;
    }
    
    .type-btn.active {
        color: #111827 !important; /* ✅ MODO CLARO: Color oscuro para texto activo */
        border-bottom: 3px solid #111827 !important; /* ✅ MODO CLARO: Borde oscuro */
        background: transparent !important;
    }
    
    /* ✅ MODO OSCURO: Color verde solo cuando está activo */
    .dark-mode .type-btn.active {
        color: #53fc1b !important;
        border-bottom: 3px solid #53fc1b !important;
    }
    
    .type-btn.active i,
    .type-btn.active span {
        color: inherit; /* Heredar del color del botón */
    }
    
    /* ✅ MODO CLARO: Iconos y texto activos en color oscuro */
    .type-btn.active i,
    .type-btn.active span {
        color: #111827 !important;
    }
    
    /* ✅ MODO OSCURO: Iconos y texto activos en color verde */
    .dark-mode .type-btn.active i,
    .dark-mode .type-btn.active span {
        color: #53fc1b !important;
    }
    
    /* Ocultar botón de Artículo en móvil */
    .type-btn[data-type="article"] {
        display: none !important;
    }
    
    /* Mostrar menú móvil en móvil */
    .mobile-menu-wrapper {
        display: flex !important;
        position: relative !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
        margin-right: 8px !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 5;
    }
    
    .mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
    }
    
    .mobile-menu-dropdown {
        display: block !important;
    }
    
    /* Botón cerrar - posicionado al final del header */
    .close-btn {
        position: relative !important;
        top: auto;
        right: auto;
        transform: none;
        z-index: 10;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        max-width: 48px;
        max-height: 48px;
        background: #f3f4f6; /* ✅ MODO CLARO: Fondo gris claro por defecto */
        border: 1px solid #e5e7eb; /* ✅ MODO CLARO: Borde gris claro por defecto */
        border-radius: 50%;
        color: #6b7280; /* ✅ MODO CLARO: Color gris por defecto */
        font-size: 20px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* ✅ MODO CLARO: Sombra sutil */
        flex-shrink: 0;
        margin-right: 8px;
        transition: all 0.2s ease;
    }
    
    .close-btn:hover {
        background: #e5e7eb; /* ✅ MODO CLARO: Fondo gris más oscuro al hover */
        color: #374151; /* ✅ MODO CLARO: Color más oscuro al hover */
    }
    
    /* ✅ MODO OSCURO: Fondo y color oscuros solo cuando está activo */
    .dark-mode .close-btn {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: #999;
        box-shadow: none;
    }
    
    .dark-mode .close-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #ccc;
    }
    
    /* Contenido principal */
    .modern-create-modal .modal-content {
        flex: 1;
        padding: 16px;
        padding-bottom: 90px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #ffffff; /* ✅ MODO CLARO: Fondo blanco por defecto */
    }
    
    /* ✅ MODO OSCURO: Fondo oscuro solo cuando está activo */
    .dark-mode .modern-create-modal .modal-content {
        background: #0E0E0E !important;
    }
    
    /* Card contenedora - sin borde visible */
    .text-input-section {
        background: #f8f9fa; /* ✅ MODO CLARO: Fondo gris claro por defecto */
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 12px;
        border: 1px solid #e5e7eb !important; /* ✅ MODO CLARO: Borde sutil */
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important; /* ✅ MODO CLARO: Sombra sutil */
    }
    
    /* ✅ MODO OSCURO: Fondo y borde oscuros solo cuando está activo */
    .dark-mode .text-input-section {
        background: #0E0E0E !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .user-info {
        margin-bottom: 14px;
        gap: 12px;
    }
    
    .user-avatar {
        width: 44px;
        height: 44px;
        min-width: 44px;
        border: 2px solid #e5e7eb; /* ✅ MODO CLARO: Borde gris claro por defecto */
    }
    
    /* ✅ MODO OSCURO: Borde oscuro solo cuando está activo */
    .dark-mode .user-avatar {
        border: 2px solid #333;
    }
    
    .user-name {
        font-size: 15px;
        font-weight: 600;
        color: #1a1a1a; /* ✅ MODO CLARO: Color oscuro por defecto */
    }
    
    /* ✅ MODO OSCURO: Color blanco solo cuando está activo */
    .dark-mode .user-name {
        color: #fff;
    }
    
    .post-visibility {
        font-size: 11px;
        padding: 3px 8px;
        background: #e5e7eb; /* ✅ MODO CLARO: Fondo gris claro por defecto */
        border-radius: 4px;
        color: #6b7280; /* ✅ MODO CLARO: Color gris por defecto */
    }
    
    /* ✅ MODO OSCURO: Fondo y color oscuros solo cuando está activo */
    .dark-mode .post-visibility {
        background: #2a2a2a;
        color: #888;
    }
    
    /* Textarea sin borde - RESET COMPLETO */
    .modern-textarea,
    .modern-textarea:focus,
    .modern-textarea:active,
    .modern-textarea:hover,
    .modern-textarea:valid,
    .modern-textarea:invalid,
    .modern-textarea:required {
        min-height: 80px;
        padding: 0 !important;
        font-size: 16px;
        border: none !important;
        border-width: 0 !important;
        border-color: transparent !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #1a1a1a; /* ✅ MODO CLARO: Color oscuro por defecto */
        resize: none;
        outline: none !important;
        outline-width: 0 !important;
        box-shadow: none !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* ✅ MODO OSCURO: Color blanco solo cuando está activo */
    .dark-mode .modern-textarea,
    .dark-mode .modern-textarea:focus,
    .dark-mode .modern-textarea:active,
    .dark-mode .modern-textarea:hover,
    .dark-mode .modern-textarea:valid,
    .dark-mode .modern-textarea:invalid,
    .dark-mode .modern-textarea:required {
        color: #fff;
    }
    
    .modern-textarea::placeholder {
        color: #9ca3af; /* ✅ MODO CLARO: Color gris claro por defecto */
    }
    
    /* ✅ MODO OSCURO: Color gris oscuro solo cuando está activo */
    .dark-mode .modern-textarea::placeholder {
        color: #666;
    }
    
    /* Eliminar cualquier estilo de validación del navegador */
    .modern-textarea:-webkit-autofill,
    .modern-textarea:-webkit-autofill:hover,
    .modern-textarea:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
        background: transparent !important;
    }
    
    /* Opciones de contenido */
    .content-options {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 0;
    }
    
    .option-btn {
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px 16px;
        gap: 14px;
        border-radius: 12px;
        border: 1px solid #e5e7eb; /* ✅ MODO CLARO: Borde gris claro por defecto */
        background: #ffffff; /* ✅ MODO CLARO: Fondo blanco por defecto */
        font-size: 15px;
    }
    
    /* ✅ MODO OSCURO: Fondo y borde oscuros solo cuando está activo */
    .dark-mode .option-btn {
        border: 1px solid #2a2a2a;
        background: #0E0E0E !important;
    }
    
    .option-btn i {
        font-size: 20px;
        width: 28px;
        text-align: center;
        color: #6b7280; /* ✅ MODO CLARO: Color gris por defecto */
    }
    
    /* ✅ MODO OSCURO: Color gris oscuro solo cuando está activo */
    .dark-mode .option-btn i {
        color: #888;
    }
    
    .option-btn span {
        font-size: 15px;
        font-weight: 500;
        color: #374151 !important; /* ✅ MODO CLARO: Color gris oscuro por defecto */
    }
    
    /* ✅ MODO OSCURO: Color gris claro solo cuando está activo */
    .dark-mode .option-btn span {
        color: #ccc !important;
    }
    
    /* Media upload */
    .media-upload-area {
        min-height: 100px;
        padding: 24px 16px;
        border-radius: 12px;
        background: #f8f9fa; /* ✅ MODO CLARO: Fondo gris claro por defecto */
        border: 1px dashed #d1d5db; /* ✅ MODO CLARO: Borde gris claro por defecto */
    }
    
    /* ✅ MODO OSCURO: Fondo y borde oscuros solo cuando está activo */
    .dark-mode .media-upload-area {
        background: #0E0E0E !important;
        border: 1px dashed #333;
    }
    
    .upload-placeholder i {
        font-size: 32px;
        color: #9ca3af; /* ✅ MODO CLARO: Color gris por defecto */
    }
    
    /* ✅ MODO OSCURO: Color gris oscuro solo cuando está activo */
    .dark-mode .upload-placeholder i {
        color: #555;
    }
    
    .upload-placeholder span {
        font-size: 14px;
        color: #6b7280; /* ✅ MODO CLARO: Color gris por defecto */
    }
    
    /* ✅ MODO OSCURO: Color gris oscuro solo cuando está activo */
    .dark-mode .upload-placeholder span {
        color: #777;
    }
    
    /* Footer fijo */
    .modern-create-modal .modal-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: #ffffff; /* ✅ MODO CLARO: Fondo blanco por defecto */
        border-top: 1px solid #e5e7eb; /* ✅ MODO CLARO: Borde gris claro por defecto */
        z-index: 50;
        margin-top: 0;
    }
    
    /* ✅ MODO OSCURO: Fondo y borde oscuros solo cuando está activo */
    .dark-mode .modern-create-modal .modal-footer {
        background: #0E0E0E !important;
        border-top: 1px solid #222;
    }
    
    .char-count {
        font-size: 12px;
        color: #6b7280; /* ✅ MODO CLARO: Color gris por defecto */
    }
    
    /* ✅ MODO OSCURO: Color gris oscuro solo cuando está activo */
    .dark-mode .char-count {
        color: #666;
    }
    
    .footer-right {
        display: flex;
        gap: 10px;
    }
    
    .btn-cancel {
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 24px;
        background: #f3f4f6; /* ✅ MODO CLARO: Fondo gris claro por defecto */
        border: 1px solid #e5e7eb; /* ✅ MODO CLARO: Borde gris claro por defecto */
        color: #374151; /* ✅ MODO CLARO: Color gris oscuro por defecto */
    }
    
    /* ✅ MODO OSCURO: Fondo y color oscuros solo cuando está activo */
    .dark-mode .btn-cancel {
        background: #2a2a2a;
        border: none;
        color: #ccc;
    }
    
    .btn-publish {
        padding: 12px 24px;
        font-size: 14px;
        font-weight: 600;
        border-radius: 24px;
        gap: 8px;
        background: #53fc1b !important;
        color: #000 !important;
        box-shadow: none;
    }
}

/* ===== RESPONSIVE DESIGN - SMALL MOBILE ===== */
@media (max-width: 480px) {
    .type-btn {
        padding: 14px 6px 12px;
    }
    
    .type-btn i {
        font-size: 16px;
    }
    
    .type-btn span {
        font-size: 10px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    .option-btn {
        padding: 12px 14px;
        gap: 12px;
    }
    
    .option-btn i {
        font-size: 18px;
        width: 24px;
    }
    
    .option-btn span {
        font-size: 14px;
    }
    
    .btn-cancel {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-publish {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .feeling-options {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .feeling-option {
        height: 46px;
        font-size: 20px;
    }
}

/* ===== EXTRA SMALL DEVICES ===== */
@media (max-width: 360px) {
    .type-btn {
        padding: 12px 4px;
    }
    
    .type-btn span {
        font-size: 10px;
    }
    
    .type-btn i {
        font-size: 14px;
    }
    
    .option-btn {
        padding: 12px 14px;
    }
    
    .option-btn span {
        font-size: 13px;
    }
    
    .btn-cancel {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .btn-publish {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .feeling-options {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .feeling-option {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .modern-create-modal .modal-container {
        max-height: 100vh;
    }
    
    .modern-create-modal .modal-content {
        padding-bottom: 80px;
    }
    
    .modern-textarea {
        min-height: 60px;
    }
    
    .content-options {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .option-btn {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 100px;
    }
}

/* ===== Z-INDEX OVERRIDES ===== */
.modern-create-modal {
    z-index: 999999999 !important;
}

.modern-create-modal .modal-backdrop {
    z-index: 999999998 !important;
}

.modern-create-modal .modal-container {
    z-index: 999999999 !important;
}

/* Forzar header por debajo del modal */
.modern-create-modal ~ .universal-header,
.modern-create-modal ~ .header,
.modern-create-modal ~ .main-header {
    z-index: 1 !important;
}

.modern-create-modal ~ * {
    z-index: 1 !important;
}

/* ===== INFORMACIÓN SEO ===== */
.seo-info {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.seo-info-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.seo-info i {
    color: #0ea5e9;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.seo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seo-text strong {
    color: #0369a1;
    font-size: 14px;
    font-weight: 600;
}

.seo-text span {
    color: #0c4a6e;
    font-size: 13px;
    line-height: 1.4;
}

/* Dark mode para información SEO */
.dark-mode .seo-info {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.dark-mode .seo-info i {
    color: #60a5fa;
}

.dark-mode .seo-text strong {
    color: #93c5fd;
}

.dark-mode .seo-text span {
    color: #dbeafe;
}

/* ===== CONTENEDORES DEL FEED ===== */
.feed-create-post-container {
    width: 100%;
    max-width: 650px;
    margin-bottom: 16px;
}

.feed-contenido-container {
    width: 100%;
    max-width: 650px;
}

/* ===== ESTILOS PARA LIVESTREAM ===== */
.livestream-fields {
    margin-top: 12px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.livestream-fields::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.livestream-field {
    margin-bottom: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.livestream-field:hover {
    background: #f1f3f4;
    border-color: #dee2e6;
}

.livestream-field:last-child {
    margin-bottom: 0;
}

.livestream-field label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.livestream-field input,
.livestream-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    color: #495057;
}

.livestream-field input:focus,
.livestream-field select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.livestream-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007bff;
}

.livestream-info {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    margin-top: 0;
}

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #1976d2;
}

.info-text {
    flex: 1;
}

.info-text strong {
    color: #1565c0;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.info-text ul {
    margin: 0;
    padding-left: 16px;
    color: #424242;
    font-size: 13px;
    line-height: 1.5;
}

.info-text li {
    margin-bottom: 4px;
}

/* Dark mode para livestream */
.dark-mode .livestream-fields::before {
    background: linear-gradient(90deg, transparent, #4a5568, transparent);
}

.dark-mode .livestream-field {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-mode .livestream-field:hover {
    background: #374151;
    border-color: #6b7280;
}

.dark-mode .livestream-field label {
    color: #e2e8f0;
}

.dark-mode .livestream-field input,
.dark-mode .livestream-field select {
    background: #374151;
    border-color: #4a5568;
    color: #f7fafc;
}

.dark-mode .livestream-field input:focus,
.dark-mode .livestream-field select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.1);
}

.dark-mode .checkbox-label {
    color: #e2e8f0;
}

.dark-mode .checkbox-label:hover {
    background: #374151;
}

.dark-mode .checkbox-label input[type="checkbox"] {
    accent-color: #60a5fa;
}

.dark-mode .livestream-info {
    background: #1e3a8a;
    border-color: #3b82f6;
}

.dark-mode .info-icon {
    color: #93c5fd;
}

.dark-mode .info-text strong {
    color: #bfdbfe;
}

.dark-mode .info-text ul {
    color: #cbd5e0;
}

/* ===== DARK MODE ADAPTATION ===== */
.dark-mode .modern-create-modal .modal-container {
    background: #0E0E0E !important;
    border: 1px solid #26272a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    color: #e5e7eb;
}

.dark-mode .modern-create-modal .modal-header {
    background: #0E0E0E !important;
    color: #f8fafc;
    border-bottom: 1px solid #2d2f33;
}

.dark-mode .content-type-selector {
    background: transparent;
}

.dark-mode .type-btn {
    color: #cbd5f5 !important;
}

.dark-mode .type-btn:not(.active) {
    color: #94a3b8 !important;
}

.dark-mode .type-btn:not(.active):hover {
    background: #0E0E0E !important;
    border: 1px solid #32353a !important;
    border-bottom: 2px solid #32353a !important;
    color: #f8fafc !important;
}

.dark-mode .type-btn.active {
    border-bottom: 2px solid #53fc1b !important;
    color: #f8fafc !important;
}

.dark-mode .modern-create-modal .modal-content {
    background: #0E0E0E !important;
    color: #e5e7eb;
}

.dark-mode .modern-create-modal .modal-footer {
    background: #0E0E0E !important;
    border-top: 1px solid #2d2f33;
    color: #e5e7eb;
}

.dark-mode .modern-textarea,
.dark-mode .modern-input,
.dark-mode .article-field .modern-input,
.dark-mode .article-field .modern-textarea {
    background: #0E0E0E !important;
    border: 1px solid #2f3236;
    color: #e5e7eb;
}

.dark-mode .modern-textarea::placeholder,
.dark-mode .modern-input::placeholder,
.dark-mode .article-field .modern-input::placeholder,
.dark-mode .article-field .modern-textarea::placeholder {
    color: #64748b;
}

.dark-mode .modern-textarea:focus,
.dark-mode .modern-input:focus,
.dark-mode .article-field .modern-input:focus,
.dark-mode .article-field .modern-textarea:focus {
    border-color: #53fc1b;
    box-shadow: 0 0 0 3px rgba(83, 252, 27, 0.12);
    background: #0E0E0E !important;
}

.dark-mode .btn-cancel {
    background: linear-gradient(135deg, #44464a 0%, #36383c 100%);
    border: 2px solid rgba(148, 163, 184, 0.65);
    color: rgba(236, 242, 248, 0.96) !important;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.35);
}

.dark-mode .btn-cancel:hover {
    background: linear-gradient(135deg, #4c4f53 0%, #3c3f43 100%);
    border-color: rgba(148, 163, 184, 0.85);
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.45), 0 0 0 2px rgba(148, 163, 184, 0.35);
}

.dark-mode .btn-cancel:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(83, 252, 27, 0.35);
}

.dark-mode .btn-publish {
    background: #53fc1b !important;
    color: #000 !important;
    box-shadow: 0 6px 18px rgba(83, 252, 27, 0.35);
}

.dark-mode .btn-publish:hover {
    background: #4ae317 !important;
    box-shadow: 0 8px 22px rgba(83, 252, 27, 0.45);
}

.dark-mode .btn-publish:disabled {
    background: #313336;
    color: #6c7280;
    box-shadow: none;
}

.dark-mode .char-count {
    color: #94a3b8;
}

.dark-mode .char-count.warning {
    color: #f87171;
}

.dark-mode .type-btn.active span,
.dark-mode .type-btn.active i {
    color: #f8fafc !important;
}

.dark-mode .type-btn:not(.active) span,
.dark-mode .type-btn:not(.active) i {
    color: #cbd5f5 !important;
}