/* NUEVO DISEÑO MÓVIL - INSPIRADO EN CHOLLOMETRO */

/* Variables CSS */
:root {
    --mobile-bg: #1a1a1a;
    --mobile-header-bg: #2d2d2d;
    --mobile-orange: #ff6b35;
    --mobile-text: #ffffff;
    --mobile-text-secondary: #cccccc;
    --mobile-border: #333333;
    --mobile-shadow: 0 2px 10px rgba(0,0,0,0.3);
    --mobile-radius: 8px;
    --mobile-transition: all 0.3s ease;
}

/* HEADER MÓVIL SUPERIOR - COMPACTO COMO CHOLLOMETRO */
.mobile-header-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--mobile-header-bg);
    z-index: 1000;
    transform: translateY(0);
    transition: var(--mobile-transition);
    box-shadow: var(--mobile-shadow);
    padding: 8px 15px;
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 100%;
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--mobile-text);
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 20px;
    color: var(--mobile-orange);
}

.logo-text {
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
}

.logo-codigo {
    color: var(--mobile-text);
}

.logo-amigo {
    color: var(--mobile-orange);
}

.mobile-search-container {
    flex: 1;
    position: relative;
    max-width: 300px;
}

.mobile-search-box {
    position: relative;
    width: 100%;
}

.mobile-search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--mobile-border);
    border-radius: 20px;
    background: #f8f9fa;
    color: var(--mobile-text);
    font-size: 14px;
    outline: none;
    transition: var(--mobile-transition);
}

.mobile-search-input:focus {
    border-color: var(--mobile-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
    background: white;
}

.mobile-search-input::placeholder {
    color: #999;
}

.mobile-search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
}

/* SUGERENCIAS DE BÚSQUEDA */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--mobile-border);
    border-top: none;
    border-radius: 0 0 var(--mobile-radius) var(--mobile-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

/* AUTOCOMPLETADO EASY-AUTOCOMPLETE - Z-INDEX ALTO PARA HEADER MÓVIL */
.mobile-search-input + .easy-autocomplete-container {
    z-index: 3000 !important;
}

.mobile-search-input + .easy-autocomplete-container ul {
    z-index: 3000 !important;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--mobile-transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    color: var(--mobile-orange);
    font-size: 14px;
}

.suggestion-text {
    color: #333;
    font-size: 14px;
}

/* NAVEGACIÓN HORIZONTAL MÓVIL - OCULTA */
.mobile-nav-horizontal {
    display: none !important;
}

.mobile-nav-scroll {
    display: flex;
    gap: 20px;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-nav-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--mobile-text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--mobile-radius);
    transition: var(--mobile-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--mobile-orange);
    background: rgba(255, 107, 53, 0.1);
}

.mobile-nav-item i {
    font-size: 18px;
}

.mobile-nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* FILTROS MÓVILES - OCULTOS */
.mobile-filters {
    display: none !important;
}

.mobile-filters-scroll {
    display: flex;
    gap: 15px;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-filters-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-filter-item {
    color: var(--mobile-text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--mobile-transition);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

.mobile-filter-item:hover,
.mobile-filter-item.active {
    color: var(--mobile-orange);
    background: rgba(255, 107, 53, 0.1);
}

.mobile-filter-item.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--mobile-orange);
    border-radius: 1px;
}

/* MENÚ INFERIOR FIJO - NUEVO DISEÑO MEJORADO */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4), 0 -2px 10px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: space-between;
    height: 60px;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 4px 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    text-align: center;
    min-width: 0;
    height: 48px;
    border-radius: 8px;
    margin: 0 1px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: #ffffff;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.bottom-nav-item i {
    font-size: 18px;
    line-height: 1;
    display: block;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    display: block;
    letter-spacing: 0.1px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 1);
}

/* BOTÓN DESTACADO "PUBLICAR" */
.bottom-nav-item.publish-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin: 0 4px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    animation: pulse 2s infinite;
    position: relative;
    z-index: 10;
    flex: none;
}

.bottom-nav-item.publish-btn:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e8821c 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
    animation: none;
}

.bottom-nav-item.publish-btn .publish-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1px;
}

.bottom-nav-item.publish-btn i {
    font-size: 14px;
    margin: 0;
    color: #ffffff;
}

.bottom-nav-item.publish-btn span {
    color: #ffffff;
    font-weight: 600;
    opacity: 1;
    font-size: 8px;
}

/* CONTENEDOR DEL PERFIL */
.bottom-nav-item .profile-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.bottom-nav-item #profile-image {
    position: absolute;
    top: -18px;
    width: 40px !important;
    height: 40px !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ANIMACIONES */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.6), 0 0 0 10px rgba(255, 107, 53, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
}

/* MENÚ HAMBURGUESA DESPLEGABLE */
.mobile-hamburger-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-hamburger-menu.show {
    display: block;
    opacity: 1;
}

.hamburger-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--mobile-bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-hamburger-menu.show .hamburger-menu-content {
    transform: translateX(0);
}

.hamburger-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--mobile-border);
}

.hamburger-menu-header h3 {
    color: var(--mobile-text);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.close-menu {
    background: none;
    border: none;
    color: var(--mobile-text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-menu:hover {
    color: var(--mobile-orange);
}

.hamburger-menu-items {
    padding: 10px 0;
}

.hamburger-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--mobile-text-secondary);
    text-decoration: none;
    transition: var(--mobile-transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hamburger-menu-item:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--mobile-orange);
}

.hamburger-menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.hamburger-menu-item span {
    font-size: 14px;
    font-weight: 500;
}

/* FUNCIONALIDAD "VER MÁS" - ESTILO CHOLLOMETRO */
.read-more-content {
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more-content.truncated {
    cursor: pointer;
}

.read-more-btn {
    color: var(--mobile-orange);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-left: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--mobile-orange);
}

/* TARJETAS DE CÓDIGOS - MÁS PROMINENTES COMO CHOLLOMETRO */
.featured-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
    border-color: var(--mobile-orange);
}

/* HEADER DE TARJETA MÁS COMPACTO */
.featured-card-header {
    margin-bottom: 1rem;
}

.featured-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mobile-text);
    margin-bottom: 0.5rem;
}

.featured-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-user-details {
    flex: 1;
    min-width: 0;
}

.featured-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mobile-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-time {
    font-size: 0.75rem;
    color: #888;
    margin: 0;
}

/* CONTENIDO DE LA TARJETA MÁS VISIBLE */
.featured-content {
    margin-bottom: 1.5rem;
}

.featured-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mobile-text);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.featured-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* CÓDIGO MÁS PROMINENTE */
.featured-code {
    background: var(--mobile-orange);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
}

.featured-code-text {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.featured-copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ACCIONES MÁS ACCESIBLES */
.featured-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.featured-action-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-action-btn.primary {
    background: var(--mobile-orange);
    color: white;
}

.featured-action-btn.primary:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.featured-action-btn.secondary {
    background: #f8f9fa;
    color: var(--mobile-text);
    border: 1px solid #dee2e6;
}

.featured-action-btn.secondary:hover {
    background: #e9ecef;
}

/* MENÚ PERFIL DESPLEGABLE - NUEVO DISEÑO MEJORADO */
.mobile-profile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-profile-menu.show {
    display: block;
    opacity: 1;
}

.profile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-profile-menu.show .profile-menu-content {
    transform: translateX(0);
}

.profile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.profile-details h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    letter-spacing: 0.2px;
}

.profile-details span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.profile-menu-items {
    padding: 15px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.profile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    transition: width 0.3s ease;
    z-index: -1;
}

.profile-menu-item:hover::before {
    width: 4px;
}

.profile-menu-item:hover {
    background: rgba(255, 107, 53, 0.15);
    color: #ffffff;
    padding-left: 30px;
    transform: translateX(2px);
}

.profile-menu-item.logout {
    color: #ff6b6b;
    margin-top: 20px;
}

.profile-menu-item.logout::before {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4444 100%);
}

.profile-menu-item.logout:hover {
    background: rgba(255, 107, 107, 0.15);
    color: #ff9999;
}

.profile-menu-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.profile-menu-item:hover i {
    transform: scale(1.1);
}

.profile-menu-item span {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

/* AJUSTES DEL BODY PARA EL MENÚ INFERIOR - NUEVO */
body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
}

/* RESPONSIVE - SOLO MÓVILES */
@media (max-width: 768px) {
    .mobile-header-top,
    .mobile-bottom-nav {
        display: flex;
    }
    
    .header-modern.desktop-only {
        display: none !important;
    }
    
    .header-modern.mobile-only {
        display: none !important;
    }
}

/* OCULTAR EN DESKTOP */
@media (min-width: 769px) {
    .mobile-header-top,
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* ANIMACIONES DE SCROLL */
.mobile-header-top.hide {
    transform: translateY(-100%);
}

.mobile-nav-horizontal.hide {
    transform: translateY(-100%);
}

.mobile-filters.hide {
    transform: translateY(-100%);
}
