/* PanyQueso Football - Estilos Responsive Mejorados */

/* ========== MOBILE MENU TOGGLE ========== */
.mobile-menu-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* ========== MEJORAS RESPONSIVE NAVBAR ========== */
@media screen and (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .container {
        flex-direction: column;
    }
    
    .nav-brand {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 0;
    }
    
    .nav-brand span {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        animation: slideDown 0.3s ease;
    }
    
    .nav-menu.show {
        display: flex !important;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--light-color);
    }
    
    .nav-menu a {
        color: var(--dark-color) !important;
        width: 100%;
        padding: 1rem 1.5rem !important;
        border-radius: 0 !important;
        justify-content: flex-start;
    }
    
    .nav-menu a:hover {
        background-color: var(--light-color) !important;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        background: var(--bg-color);
        margin: 0;
        padding-left: 1rem;
    }
    
    .dropdown:hover .dropdown-menu,
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* ========== TABLETS ========== */
@media screen and (max-width: 768px) {
    /* Contenedores */
    .container {
        padding: 0 15px;
    }
    
    /* Dashboard */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 0.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    /* Welcome Banner */
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .welcome-banner h1 {
        font-size: 1.5rem;
    }
    
    .welcome-icon {
        margin-top: 1rem;
    }
    
    /* Formularios */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Cards */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    /* Atributos */
    .attributes-grid {
        grid-template-columns: 1fr;
    }
    
    /* Partidos */
    .partido-card-header {
        flex-direction: column;
    }
    
    .partido-date-big {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        padding: 0.75rem;
    }
    
    .partido-card-footer {
        flex-direction: column;
    }
    
    .partido-card-footer .btn {
        width: 100%;
    }
    
    /* Equipos */
    .equipos-grid {
        grid-template-columns: 1fr;
    }
    
    /* Rankings */
    .ranking-table {
        font-size: 0.85rem;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.5rem;
    }
    
    /* Quick Actions */
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    /* Tabs */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .tab-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    /* Página de Auth */
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header i {
        font-size: 2.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* ========== MÓVILES PEQUEÑOS ========== */
@media screen and (max-width: 480px) {
    /* Stats Grid - Una columna */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Botones */
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .btn i {
        font-size: 1rem;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    /* Jugadores Grid */
    .jugadores-grid {
        grid-template-columns: 1fr;
    }
    
    /* Partido Info Grid */
    .partido-info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Marcador */
    .marcador {
        flex-direction: column;
        gap: 1rem;
    }
    
    .equipo-goles {
        font-size: 2rem;
    }
    
    /* Tabla Responsive */
    .ranking-table table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Comparison */
    .comparison-item {
        font-size: 0.9rem;
    }
    
    .attribute-bar-label {
        min-width: 100px;
        font-size: 0.85rem;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    /* Footer */
    .footer {
        font-size: 0.85rem;
        padding: 1.5rem 0;
    }
    
    /* Jugador Selection */
    .jugadores-selection {
        max-height: 300px;
    }
    
    /* Nav Text - Ocultar en móviles muy pequeños */
    .nav-text {
        display: none;
    }
    
    .nav-menu a {
        justify-content: center;
        min-width: 44px;
        padding: 0.5rem !important;
    }
}

/* ========== LANDSCAPE MODE (Móviles en horizontal) ========== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .navbar {
        position: relative;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .welcome-banner {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* ========== TABLETS GRANDES Y DESKTOP PEQUEÑO ========== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .attributes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .jugadores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== DESKTOP GRANDE ========== */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .jugadores-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== ANIMACIONES ADICIONALES ========== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== UTILIDADES RESPONSIVE ========== */
.mobile-only {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none !important;
    }
}

.tablet-only {
    display: none;
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .tablet-only {
        display: block;
    }
}

/* ========== MEJORAS DE ACCESIBILIDAD ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== MODO OSCURO (Futuro) ========== */
@media (prefers-color-scheme: dark) {
    /* Se puede implementar en el futuro */
}

/* ========== IMPRESIÓN ========== */
@media print {
    .navbar,
    .footer,
    .btn,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ========== TOUCH IMPROVEMENTS ========== */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos táctiles */
    .btn,
    .nav-menu a,
    .quick-action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    a,
    button {
        -webkit-tap-highlight-color: rgba(46, 204, 113, 0.2);
    }
}

