/* =====================================================
   RADIO FM - Estilos Adicionales y Menú Móvil
   style2.css - Responsive Navigation
   ===================================================== */

/* === MENÚ MÓVIL === */

/* Botón hamburguesa */
.mobile-menu-btn {
    display: none;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    z-index: 10001;
    position: relative;
}

.mobile-menu-btn:hover {
    background: rgba(0, 240, 255, 0.2);
}

/* Overlay del menú móvil - CUBRE TODO */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.92) !important;
    z-index: 9998 !important;
    visibility: hidden;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    /*visibility: visible !important;*/
    pointer-events: auto !important;
}

/* === RESPONSIVE HEADER === */
@media (max-width: 768px) {
    /* Header z-index más bajo que el menú */
    .header {
        z-index: 100;
    }
    
    /* Mostrar botón hamburguesa */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 10001;
    }
    
    /* Navegación móvil - OCULTA por defecto */
    .nav-main {
        position: fixed !important;
        top: 0 !important;
        left: -300px !important;
        width: 280px !important;
        height: 100vh !important;
        background: linear-gradient(180deg, #0f0f19 0%, #0a0a12 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 80px 1.5rem 2rem !important;
        z-index: 9999 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        border-right: 1px solid rgba(0, 240, 255, 0.2) !important;
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
    }
    
    /* Navegación móvil - VISIBLE cuando está activa */
    .nav-main.active {
        left: 0 !important;
    }
    
    .nav-main .nav-link {
        display: flex !important;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem !important;
        border-radius: 10px;
        margin-bottom: 0.5rem;
        font-size: 1rem;
        color: #ccc;
        text-decoration: none;
        transition: all 0.2s ease;
    }
    
    .nav-main .nav-link:hover {
        background: rgba(0, 240, 255, 0.1);
        color: #00f0ff;
    }
    
    .nav-main .nav-link.active {
        background: rgba(0, 240, 255, 0.15);
        color: #00f0ff;
    }
    
    /* Ocultar contenido cuando el menú está abierto */
    body.menu-open main,
    body.menu-open .radio-player,
    body.menu-open .header-actions,
    body.menu-open .genres-bar {
        opacity: 0.1;
        pointer-events: none;
    }
    
    /* Header ajustes */
    .header-inner {
        padding: 0 1rem;
    }
    
    .logo span {
        display: none;
    }
    
    .logo-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* User menu en móvil */
    .user-menu-toggle span {
        display: none;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    /* Header actions */
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions .text-muted {
        display: none;
    }
}

/* === CONTENIDO RESPONSIVE === */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .main-content.single-sidebar {
        grid-template-columns: 1fr !important;
    }
    
    /* Sidebars en móvil */
    .sidebar-right,
    .main-content > aside {
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    main.container {
        padding-top: 1rem;
        padding-bottom: 120px;
    }
    
    /* Cards */
    .card {
        border-radius: 12px;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body,
    .card > p,
    .card > div:not(.card-header) {
        padding: 1rem;
    }
    
    /* Chat container */
    .chat-container {
        height: calc(100vh - 180px) !important;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-message {
        max-width: 90%;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
    }
    
    /* Grid de estaciones */
    .stations-grid {
        grid-template-columns: 1fr !important;
    }
    
    .station-card {
        padding: 1rem;
    }
    
    /* Profile */
    .profile-header {
        padding: 1.5rem 1rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .profile-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .profile-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .profile-actions .btn {
        width: 100%;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Users list */
    .users-list {
        max-height: 300px;
        overflow-y: auto;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    /* Botones */
    .btn {
        padding: 0.75rem 1.25rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.875rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Inbox/Mensajes */
    .main-content[style*="350px"] {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }
    
    .inbox-list {
        max-height: 250px;
    }
    
    .inbox-item {
        padding: 0.75rem;
    }
}

/* === REPRODUCTOR MÓVIL === */
@media (max-width: 768px) {
    .radio-player {
        padding: 0.75rem 1rem;
    }
    
    .player-inner {
        grid-template-columns: 1fr auto !important;
        gap: 0.75rem;
    }
    
    .player-station {
        min-width: 0;
    }
    
    .station-cover {
        width: 40px;
        height: 40px;
    }
    
    .station-info h4 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    .station-info p {
        font-size: 0.7rem;
    }
    
    .player-controls {
        gap: 0.25rem;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .play-btn {
        width: 44px;
        height: 44px;
    }
    
    .audio-visualizer {
        display: none;
    }
    
    .player-volume {
        display: none;
    }
}

@media (max-width: 480px) {
    .player-inner {
        grid-template-columns: 1fr auto !important;
    }
    
    .station-info h4 {
        max-width: 100px;
    }
    
    .control-btn:not(.play-btn) {
        display: none;
    }
}

/* === LOGIN/REGISTRO RESPONSIVE === */
@media (max-width: 768px) {
    main[style*="padding: 3rem"] {
        padding: 1.5rem 1rem !important;
    }
    
    div[style*="max-width: 420px"],
    div[style*="max-width: 500px"] {
        max-width: 100% !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* === CHAT RESPONSIVE === */
@media (max-width: 768px) {
    .main-content[style*="220px 1fr 260px"] {
        grid-template-columns: 1fr !important;
    }
    
    .main-content[style*="220px 1fr 260px"] > aside {
        display: none;
    }
    
    .main-content[style*="220px 1fr 260px"] > aside:first-child {
        display: block;
        margin-bottom: 1rem;
    }
    
    .main-content[style*="220px 1fr 260px"] > aside:first-child .card {
        max-height: none;
    }
    
    .main-content[style*="220px 1fr 260px"] > aside:first-child .users-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        max-height: none;
        padding: 0.75rem;
    }
    
    .main-content[style*="220px 1fr 260px"] > aside:first-child .user-item {
        padding: 0.5rem 0.75rem;
        border-radius: 20px;
        background: rgba(0, 240, 255, 0.05);
        border: 1px solid rgba(0, 240, 255, 0.1);
    }
    
    .main-content[style*="220px 1fr 260px"] > aside:first-child .user-item-name {
        display: block;
        font-size: 0.8rem;
    }
}

/* === NOTIFICACIONES RESPONSIVE === */
@media (max-width: 768px) {
    div[style*="max-width: 700px"] {
        max-width: 100% !important;
        margin: 1rem auto !important;
    }
    
    .notification-item {
        padding: 0.875rem;
    }
    
    .notification-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* === AMIGOS RESPONSIVE === */
@media (max-width: 768px) {
    .friend-request {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .friend-request-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    
    .friend-request-actions form {
        flex: 1;
    }
    
    .friend-request-actions .btn {
        width: 100%;
    }
}

/* === UTILIDADES MÓVILES === */
@media (max-width: 768px) {
    .text-muted-mobile {
        display: none;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* Scroll horizontal para tablas */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Fix para inputs en iOS */
    input, select, textarea {
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    
    .desktop-only {
        display: block !important;
    }
}

/* === ANIMACIONES === */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Menú animación */
.nav-main.active {
    animation: slideIn 0.3s ease;
}

/* === MEJORAS TÁCTILES === */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos táctiles */
    .btn, .nav-link, .user-item, .station-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    /* Áreas táctiles más grandes */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .user-item {
        min-height: 48px;
    }
}