:root {
    --bg-dark: #09090b;
    --card-bg: #18181b;
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --text-main: #fafafa;
    --text-muted: #a1a1aa;
    --glass-bg: rgba(24, 24, 27, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* --- GENERIC MODAL STYLES --- */
.modal {
    position: fixed;
    top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
    padding: 1rem;
}

.modal:not(.hidden) {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: modalSpring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSpring {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

/* FORM STYLES */
.form-group label {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-md);
    width: 100%;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.btn {
    padding: 1rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* CONTAINER & LAYOUT */
.container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    border: 4px solid var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    background: white;
}

h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.025em;
    text-align: center;
    background: linear-gradient(to bottom, #fff, #a1a1aa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ig-bio {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.bio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-main);
}

.bio-icon {
    font-size: 1.2rem;
}

.bio-item.highlight {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    color: #fff;
    margin: 0.2rem 0;
}

.bio-item.highlight strong {
    color: var(--primary);
    font-weight: 700;
}

.bio-item.text-muted {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.bio-arrow {
    text-align: center;
    font-weight: 700;
    margin-top: 0.5rem;
    color: var(--text-main);
    opacity: 0.8;
}

.ig-bio a {
    color: #4fc3f7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.ig-bio a:hover {
    color: #81d4fa;
    text-decoration: underline;
}

.footer-links {
    width: 100%;
    text-align: center;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.footer-links a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.events-section {
    width: 100%;
    margin-top: 1rem;
}

.events-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feed-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.feed-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

#events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.event-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.event-card:hover {
    transform: scale(1.02);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.event-link {
    display: flex;
    padding: 1rem;
    gap: 1.2rem;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.event-media {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}

.event-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-body {
    flex: 1;
    min-width: 0;
}

.event-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    align-items: center;
}

.event-meta strong {
    color: var(--primary);
}

@media (max-width: 600px) {
    .container { padding: 2rem 1rem; }
    .event-media { width: 70px; height: 70px; }
}

/* ===========================================
   ESTILOS PARA PÁGINA DE JUEGOS
   =========================================== */

.games-section {
    width: 100%;
    margin-bottom: 2rem;
}

.games-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.games-title span {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.games-stats {
    font-size: 0.9rem;
    color: #bdbdbd;
}

#games-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.game-card {
    background: #23232a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.game-card.featured {
    border: 2px solid #4ecdc4;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.game-card.featured:hover {
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.4);
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.game-info {
    padding: 1.2rem;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.game-description {
    font-size: 0.9rem;
    color: #bdbdbd;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.game-category, .game-difficulty {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

.game-category {
    background: #4ecdc4;
    color: #fff;
}

.game-difficulty {
    background: #2a2a30;
    border: 1px solid currentColor;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #bdbdbd;
}

.game-rating, .game-plays {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.game-rating i {
    color: #ffd700;
}

/* Modal para juegos */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.game-modal.hidden {
    display: none;
}

.game-modal-content {
    background: #23232a;
    border-radius: 12px;
    width: 100%;
    max-width: 1000px; /* Aumentado de 800px */
    max-height: 95vh; /* Aumentado de 90vh */
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem; /* Reducido padding vertical */
    border-bottom: 1px solid #333;
    flex-shrink: 0; /* Evita que se comprima */
}

.game-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
}

.close-button {
    background: none;
    border: none;
    color: #bdbdbd;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #333;
    color: #fff;
}

.game-modal-body {
    padding: 1rem 1.5rem 1.5rem;
    flex: 1; /* Toma el espacio restante */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Permite que se encoja */
}

/* Estilos para juegos específicos */
.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.games-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.games-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #bdbdbd;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.game-canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.game-canvas-container canvas {
    border: 2px solid #4ecdc4;
    border-radius: 8px;
    background: #1a1a1a;
}

.game-controls {
    text-align: center;
    color: #bdbdbd;
}

.game-score {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4ecdc4;
    margin-top: 0.5rem;
}

/* Juego de memoria */
.memory-game {
    max-width: 500px;
    margin: 0 auto;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.memory-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
}

.memory-card.flipped .card-front {
    transform: rotateY(-180deg);
}

.memory-card.flipped .card-back {
    transform: rotateY(0);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.5rem;
    transition: transform 0.6s;
    border: 2px solid #333;
}

.card-front {
    background: #2a2a30;
    color: #4ecdc4;
}

.card-back {
    background: #4ecdc4;
    color: #fff;
    transform: rotateY(180deg);
}

/* Estados de carga y error */
.loading, .error, .coming-soon {
    text-align: center;
    padding: 2rem;
    color: #bdbdbd;
}

.coming-soon {
    background: #2a2a30;
    border-radius: 12px;
    margin: 1rem 0;
}

.coming-soon i {
    font-size: 3rem;
    color: #4ecdc4;
    margin-bottom: 1rem;
}

.coming-soon h3 {
    color: #fff;
    margin: 0 0 0.5rem 0;
}

.error {
    color: #ff6b6b;
}

.error i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive para juegos */
@media (max-width: 600px) {
    #games-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .game-modal {
        padding: 0.5rem;
    }
    
    .game-modal-content {
        margin: 0;
        max-height: 98vh;
        max-width: 100%;
        border-radius: 8px;
    }
    
    .game-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .game-modal-header h2 {
        font-size: 1.1rem;
    }
    
    .game-modal-body {
        padding: 0.75rem 1rem 1rem;
    }
    
    /* Ajustes específicos para juegos en modal móvil */
    .game-container .frikifest-game {
        padding: 15px !important;
        border-radius: 15px !important;
        max-width: 100% !important;
    }
    
    .game-container .card {
        width: 80px !important;
        height: 110px !important;
        margin: 3px !important;
    }
    
    .game-container .battle-area {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .game-canvas-container canvas {
        max-width: 100%;
        height: auto;
    }
    
    .memory-board {
        gap: 0.3rem;
    }
    
    /* Header de juegos responsive */
    .games-header {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .games-header h2 {
        font-size: 1.3rem;
    }
    
    .games-count {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* HERO SECTION STYLES */
.hero-section {
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.1) 0%, 
        rgba(255, 107, 107, 0.1) 50%, 
        rgba(255, 195, 113, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
/* HERO SECTION STYLES */
.hero-section {
    background: linear-gradient(135deg, 
        rgba(78, 205, 196, 0.1) 0%, 
        rgba(255, 107, 107, 0.1) 50%, 
        rgba(255, 195, 113, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.page-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 0 0 1.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.hero-description {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.description-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.description-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.description-card .card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.description-card .card-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.description-card .card-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* GAMES SECTION ENHANCED */
.games-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.section-title h2 {
    color: #fff;
    font-size: 2rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.games-count {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin: 0;
}

.games-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.games-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.filter-icon {
    font-size: 1.1rem;
}

.filter-text {
    font-weight: 600;
}

.games-search {
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

#game-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.8rem 3rem 0.8rem 2.5rem;
    border-radius: 12px;
    font-size: 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

#game-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

#game-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: none;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

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

/* RESPONSIVE ENHANCEMENTS */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-logo {
        font-size: 3rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .hero-description {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-title {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .games-filters {
        justify-content: stretch;
    }
    
    .filter-btn {
        flex: 1;
        justify-content: center;
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .filter-text {
        display: none;
    }
    
    .filter-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .hero-logo {
        font-size: 2.5rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .description-card {
        padding: 1rem;
    }
    
    .games-filters {
        grid-template-columns: repeat(3, 1fr);
        display: grid;
    }
    
    .search-container {
        max-width: 100%;
    }
}

/* ANIMATIONS FOR FILTERING */
.game-card {
    transition: all 0.3s ease;
    opacity: 1;
}

.game-card.fade-in {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* NAVIGATION STYLES */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0 2rem 0;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.nav-btn i {
    font-size: 1.1rem;
}

/* ENHANCED EVENT CARDS (PREMIUM UI) */
.event-card {
    background: linear-gradient(145deg, #1e1e24 0%, #18181b 100%);
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.event-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

/* MOBILE FIRST BOTTOM NAVIGATION */
@media (max-width: 768px) {
    body {
        padding-bottom: 90px; /* Space for bottom nav */
    }

    .nav-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 8px 16px 20px 16px; /* Extra padding bottom for iOS home indicator */
        background: rgba(20, 20, 23, 0.9); /* Deep dark glass */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        z-index: 9999;
        justify-content: space-around; /* Distribute evenly */
        align-items: center;
        gap: 0;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.5);
    }

    .nav-btn {
        background: transparent;
        border: none;
        box-shadow: none !important;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 6px 4px;
        border-radius: 12px;
        color: var(--text-muted);
        width: 25%; /* 4 items = 25% each */
        min-width: auto;
        backdrop-filter: none;
    }
    
    .nav-btn:hover {
        background: rgba(255, 255, 255, 0.03);
        transform: none;
        color: var(--text-main);
    }

    .nav-btn.active {
        background: transparent;
        color: var(--primary); /* Highlight color */
        border: none;
        position: relative;
    }

    .nav-btn.active::after {
        content: '';
        position: absolute;
        top: -8px; 
        left: 50%;
        transform: translateX(-50%);
        width: 40%;
        height: 3px;
        background: var(--primary);
        border-radius: 0 0 4px 4px;
        box-shadow: 0 2px 8px var(--primary);
    }

    .nav-btn i {
        font-size: 1.35rem;
        margin-bottom: 2px;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    .nav-btn.active i {
        transform: translateY(-2px);
    }

    .nav-btn span {
        display: block; /* Show labels on mobile */
        font-size: 0.7rem;
        font-weight: 500;
        letter-spacing: 0.3px;
        opacity: 0.9;
    }
}

/* IOS-STYLE BOTTOM SHEET MODALS FOR MOBILE */
@media (max-width: 768px) {
    .modal {
        align-items: flex-end !important;
        padding: 0 !important;
        backdrop-filter: blur(8px) !important;
    }

    .modal-content {
        border-radius: 24px 24px 0 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
        animation: slideUpMobile 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        padding-bottom: max(2rem, env(safe-area-inset-bottom)) !important;
    }

    /* Drag handle indicator */
    .modal-content::before {
        content: '';
        display: block;
        width: 40px;
        height: 5px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
        margin: -1rem auto 1.5rem auto; 
    }

    @keyframes slideUpMobile {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Header adjustments for mobile */
    .logo {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }

    .ig-bio {
        padding: 1.2rem;
        margin-bottom: 2rem;
    }
}

/* MAP MODAL SPECIFIC STYLES */
#modal-mapa .modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    position: relative;
}

#map {
    height: 400px; 
    width: 100%; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.map-loading, .map-no-events {
    position: absolute; 
    left: 0; right: 0; top: 50%; 
    transform: translateY(-50%);
    text-align: center; 
    color: #333; 
    font-size: 1.1em; 
    background: rgba(255,255,255,0.95); 
    padding: 20px; 
    border-radius: 12px;
    margin: 0 20px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    #modal-mapa .modal-body {
        min-height: auto;
        padding-bottom: 0; /* Let main padding handle it */
    }
    #map {
        height: 50vh; /* Taller map on mobile */
        min-height: 300px;
        max-height: 500px;
        border-radius: 12px;
    }
}
