/* --- HERO SECTION --- */
.maps-hero {
    text-align: center;
    padding: 140px 20px 60px;
    background: linear-gradient(180deg, #05000a 0%, #1a002e 100%);
    border-bottom: 2px solid #bc13fe;
}

.maps-hero h1 { 
    font-size: 3.5rem; 
    margin-bottom: 10px; 
    text-shadow: 0 0 20px rgba(188, 19, 254, 0.6);
}

.maps-hero p { 
    font-family: 'AquireLight', sans-serif; 
    color: #ccc; 
    font-size: 1.2rem; 
}

/* --- CONTROLLI --- */
.maps-controls-container {
    max-width: 1200px;
    margin: 40px auto 20px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.search-bar-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #bc13fe;
    border-radius: 50px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Segoe UI', sans-serif;
    transition: 0.3s;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.3);
    border-color: #00ffff;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #bc13fe;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: 1px solid #bc13fe;
    color: #fff;
    padding: 8px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'AquireBold', sans-serif;
    transition: 0.3s;
    font-size: 0.85rem;
}

.filter-btn:hover, .filter-btn.active {
    background: #bc13fe;
    box-shadow: 0 0 15px #bc13fe;
    color: #fff;
}

.btn-random {
    background: linear-gradient(45deg, #ff00cc, #333399);
    border: none;
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'AquireBold', sans-serif;
    font-size: 0.9rem;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(255, 0, 204, 0.4);
}

.btn-random:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 0, 204, 0.7);
}

/* --- SEZIONI --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.bg-darker { background: rgba(0,0,0,0.3); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 15px; font-family: 'AquireBold', sans-serif; }

.line-purple { width: 100px; height: 3px; background: #bc13fe; margin: 0 auto; box-shadow: 0 0 10px #bc13fe; }
.line-gold { width: 100px; height: 3px; background: #ffd700; margin: 0 auto; box-shadow: 0 0 10px #ffd700; }

.neon-purple { color: #bc13fe; text-shadow: 0 0 15px rgba(188, 19, 254, 0.5); }
.neon-gold { color: #ffd700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }

/* --- GRID MAPPE --- */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-items: center;
    align-items: start;
}

/* --- CARD MAPPA --- */
.map-card {
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    position: relative;
    /* Altezza aumentata per descrizioni lunghe */
    min-height: 600px; 
    height: auto;
    width: 100%;
    max-width: 380px; 
}

.map-card:hover {
    transform: translateY(-8px);
    border-color: #00ffff !important; 
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.15);
}

/* FEATURED */
.map-card.featured {
    border: 1px solid rgba(255, 215, 0, 0.5);
    background: linear-gradient(145deg, rgba(30, 25, 10, 0.9), rgba(20, 20, 30, 0.9));
}
.map-card.featured:hover {
    border-color: #ffd700 !important;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #000;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Immagine */
.map-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.map-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.map-card:hover .map-image img { transform: scale(1.1); }

/* Tag Categoria */
.category-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
}
.category-tag.pvp { background: #ff4655; }
.category-tag.training { background: #00ffff; color: #000; }
.category-tag.fun { background: #bc13fe; }

/* Info Mappa */
.map-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permette alla card di allungarsi */
}

.map-info h3 {
    font-family: 'AquireBold', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 10px;
}

/* Sottocategorie */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.sub-tag {
    font-size: 0.7rem;
    color: #aaa;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    transition: 0.3s;
}

.map-card:hover .sub-tag { border-color: #00ffff; color: #00ffff; }

.map-subtitle { 
    color: #ccc; 
    font-size: 0.9rem; 
    margin-bottom: 15px; 
    font-weight: bold; 
    line-height: 1.5; 
}

/* Features */
.map-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
    font-size: 0.9rem;
    color: #aaa;
    flex-grow: 1; 
}
.map-features li { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.map-features i { color: #00ffff; width: 20px; text-align: center; }

/* Footer Creator */
.map-footer {
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.creator-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center; /* Centra automaticamente */
    align-items: center;
}

/* Creator Pillola */
.creator-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #bbb;
    font-size: 0.75rem; 
    font-weight: bold;
    transition: 0.3s;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px; 
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.creator-pill:hover {
    background: rgba(188, 19, 254, 0.1);
    border-color: #bc13fe;
    color: #fff;
    transform: translateY(-2px);
}

.creator-pill img {
    width: 24px; 
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #888;
}

/* Box Codice */
.code-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed #bc13fe;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: auto; /* Allinea in basso */
}
.code-container:hover { background: rgba(188, 19, 254, 0.1); border-color: #00ffff; }
.code-text { font-family: 'Segoe UI', monospace; font-weight: bold; font-size: 1.1rem; color: #00ffff; letter-spacing: 1px; }
.code-container i { color: #fff; font-size: 1.1rem; }
.code-container:active { transform: scale(0.98); }

/* Effetto Random */
.highlight-random {
    animation: pulseGlow 1.5s ease-in-out infinite;
    border-color: #ff00cc !important;
    transform: scale(1.05);
    z-index: 10;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px #ff00cc; }
    50% { box-shadow: 0 0 40px #ff00cc; }
    100% { box-shadow: 0 0 10px #ff00cc; }
}

@media (max-width: 768px) {
    .maps-hero h1 { font-size: 2.5rem; }
    .filter-group { gap: 10px; }
    .filter-btn { padding: 8px 15px; font-size: 0.8rem; }
    .search-bar-container { max-width: 100%; }
}