:root {
    --primary-color: #002029;
    --accent-color: #00d4ff;
    --bg-color: #f4f7f8;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --player-bg: #111111;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding-bottom: 0;
    transition: padding-bottom 0.3s;
}

@media (max-width: 480px) {
    body {
        padding-bottom: 80px; /* Espacio para el reproductor fijo */
    }

    .player-container {
        bottom: 0;
    }

    .player-content {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }

    .station-card {
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 20px 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5b1c2;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent-color);
    font-size: 1.8rem;
}

.logo strong {
    color: var(--accent-color);
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border-radius: 25px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-box input::placeholder {
    color: #ccc;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 0; /* Asegurar que no haya margen extra a la derecha */
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: rgba(0, 32, 41, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    right: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu-header h3 {
    color: var(--accent-color);
    margin: 0;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.community-list {
    list-style: none;
    overflow-y: auto;
}

.community-list li {
    margin-bottom: 10px;
}

.community-list a {
    color: #a5b1c2;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    display: block;
    padding: 8px 0;
}

.community-list a:hover {
    color: var(--accent-color);
    padding-left: 10px;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

.menu-overlay.active {
    display: block;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px var(--accent-color);
}

/* Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.95) 0%, rgba(0, 32, 41, 0.98) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
}

#main-footer {
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0 30px;
    margin-top: 50px;
    text-align: left;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 0 20px;
    text-align: left;
}

.footer-section {
    text-align: left;
}

.logo {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.logo span {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Breadcrumb */
.breadcrumb-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.15rem;
    background: var(--primary-color);
    border-radius: 999px;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
    margin-bottom: 1.25rem;
    letter-spacing: 0.01em;
}

.breadcrumb-nav a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.breadcrumb-nav a:hover {
    opacity: 0.75;
}

.breadcrumb-nav span {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
}

.breadcrumb-nav .breadcrumb-sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 0.2rem;
    font-size: 0.7rem;
}

.seo-content {
    margin-top: 80px;
    padding: 60px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

/* Communities Section */
.communities-section {
    margin-top: 40px;
    padding: 30px 20px;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.communities-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.communities-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.community-link {
    background: #f0f2f5;
    color: #5f6368;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.community-link:hover {
    background: #e4e6e9;
    color: var(--primary-color);
    border-color: #dadce0;
}

/* Side Menu Fixes */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
}

.menu-overlay.active {
    display: block;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--primary-color);
    color: white;
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 30px 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
}

.side-menu.active {
    right: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu-header h3 {
    color: var(--accent-color);
    margin: 0;
    font-size: 1.3rem;
}

.community-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.community-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.community-list li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: block;
    padding: 10px 0;
}

.community-list li a:hover {
    color: var(--accent-color);
    padding-left: 8px;
}

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

.logo i {
    color: var(--accent-color);
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .communities-grid {
        gap: 8px;
    }
    
    .community-link {
        font-size: 0.85rem;
        padding: 6px 14px;
    }
}


.seo-content h2 {
    color: var(--text-main);
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.seo-content p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-item {
    background: rgba(0, 0, 0, 0.02);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.faq-item:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.footer-section h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-section p {
    color: #a5b1c2;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #a5b1c2;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #a5b1c2;
    font-size: 0.85rem;
}

.footer-section.about .logo {
    margin-bottom: 15px;
    justify-content: flex-start;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
    margin: 0 auto;
    padding: 20px 0;
}

.station-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.station-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.station-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
}

.station-card .station-name {
    font-size: 0.95rem;
    color: var(--text-main);
    margin: 0;
    font-weight: 600;
    display: block;
}

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

.station-grid .station-card:nth-child(1) { animation-delay: 0.1s; }
.station-grid .station-card:nth-child(2) { animation-delay: 0.15s; }
.station-grid .station-card:nth-child(3) { animation-delay: 0.2s; }
.station-grid .station-card:nth-child(4) { animation-delay: 0.25s; }
.station-grid .station-card:nth-child(5) { animation-delay: 0.3s; }
.station-grid .station-card:nth-child(6) { animation-delay: 0.35s; }
.station-grid .station-card:nth-child(7) { animation-delay: 0.4s; }
.station-grid .station-card:nth-child(8) { animation-delay: 0.45s; }
.station-grid .station-card:nth-child(9) { animation-delay: 0.5s; }
.station-grid .station-card:nth-child(10) { animation-delay: 0.55s; }
.station-grid .station-card:nth-child(n+11) { animation-delay: 0.6s; }

.station-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.station-card.active-station {
    background: #f0f4f5;
    border: 2px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.15);
    transform: translateY(-5px);
}

.station-card img {
    max-width: 80%;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.station-card .station-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Player */
.player-container {
    position: fixed;
    bottom: -100px; /* Hidden by default */
    left: 0;
    right: 0;
    background-color: var(--player-bg);
    color: white;
    padding: 15px 30px;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
}

.player-container.visible {
    bottom: 0;
}

.player-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-station {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 30%;
}

#current-logo {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background: white;
    padding: 5px;
    object-fit: contain;
}

.station-info {
    display: flex;
    flex-direction: column;
}

#current-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.live-badge {
    font-size: 0.7rem;
    background: #ff4757;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
    font-weight: 700;
    margin-top: 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.main-btn {
    background: white;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.main-btn:hover {
    transform: scale(1.1);
    background: var(--accent-color);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="range"] {
    appearance: none;
    width: 100px;
    height: 4px;
    background: #444;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .station-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .station-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box {
        width: 100%;
        margin-bottom: 15px; /* Separar buscador de los botones de categoría */
    }
    
    .player-container {
        padding: 8px 10px;
    }

    .player-content {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .current-station {
        flex: 0 0 auto; /* No se estira */
        width: auto;
        gap: 10px;
    }
    
    .player-controls {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        gap: 12px;
    }

    .live-badge {
        display: none; /* Ocultar en móvil para ganar espacio */
    }

    .volume-control {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    input[type="range"] {
        width: 40px; /* Aún más pequeño para asegurar que quepa */
    }

    #current-logo {
        width: 35px;
        height: 35px;
        padding: 2px;
        flex-shrink: 0;
    }

    #current-name {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80px;
    }

    .main-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }

    .station-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .station-card {
        background: white;
        border: 1px solid #ddd;
        aspect-ratio: 1/1;
        padding: 5px;
        box-shadow: none;
        border-radius: 8px;
    }
    
    .station-card .station-name {
        display: block;
        font-size: 0.7rem;
        margin-top: 5px;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .footer-content {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px 10px !important;
        padding: 0 10px !important;
        width: 100% !important;
        text-align: center;
        overflow-x: hidden;
    }

    .footer-section {
        min-width: 0;
        overflow-wrap: break-word;
        text-align: center;
    }

    .footer-section.about {
        grid-column: span 3 !important;
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-section.about .logo {
        justify-content: center !important;
        margin: 0 auto 15px;
    }

    .footer-section h3 {
        font-size: 0.85rem;
        margin-bottom: 12px;
        white-space: nowrap;
    }

    .footer-section ul li a {
        font-size: 0.75rem;
    }

    .player-container {
        bottom: 0 !important;
        padding: 8px 12px;
        background: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        left: 0;
        right: 0;
    }

    .player-content {
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        max-width: 100%;
    }

    .current-station {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }

    #current-name {
        font-size: 0.8rem;
        max-width: 100%;
    }

    .player-controls {
        flex: 0 0 auto;
        gap: 10px;
    }

    .volume-control {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .volume-control i {
        font-size: 0.8rem;
    }

    .volume-control input[type="range"] {
        width: 35px;
    }
}

/* Directorio SEO */
.station-directory {
    margin-top: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    text-align: center;
}

.station-directory h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 25px;
}

.directory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    justify-content: center;
}

.directory-list a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    text-transform: none;
}

.directory-list a:hover {
    color: var(--accent-color);
}

.directory-list a:not(:last-child)::after {
    content: "|";
    margin-left: 20px;
    color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .station-directory {
        margin-top: 40px;
        padding: 20px;
    }
    
    .directory-list {
        gap: 10px 15px;
    }
}
