/*
Theme Name: Tudo Vira Rádio
Theme URI: https://seudominio.com
Author: Seu Nome
Author URI: https://seudominio.com
Description: Tema WordPress para rádios online com integração Radio-Browser.info
Version: 2.0.0
License: GPL v2 or later
Text Domain: tudo-vira-radio
*/

/* ===== VARIÁVEIS ===== */
:root { 
    --primary: #00ff88; 
    --bg: #121212; 
    --card: #1e1e1e; 
    --text: #ffffff; 
    --secondary: #ffaa00;
    --danger: #ff4444;
    --success: #00ff88;
}

/* ===== RESET E ESTILOS GLOBAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    background: var(--bg); 
    color: var(--text); 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0; 
    line-height: 1.6;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* ===== HEADER ===== */
.site-header { 
    text-align: center; 
    padding: 40px 0; 
    background: linear-gradient(180deg, #1f1f1f 0%, var(--bg) 100%); 
    margin-bottom: 30px;
}

.site-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.site-title a {
    color: var(--primary);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.site-description {
    color: #888;
    font-size: 1.1rem;
}

/* ===== BUSCA GLOBAL ===== */
.header-search-container {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.global-search-input {
    width: 100%;
    padding: 16px 25px 16px 50px;
    border-radius: 40px;
    border: 2px solid #333;
    background: var(--card);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
}

/* ===== NAVEGAÇÃO POR ABAS ===== */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.tab-btn:hover {
    background: var(--card);
    color: white;
}

.tab-btn.active {
    background: var(--primary);
    color: black;
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== CABEÇALHOS DE FILTRO ===== */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-header h2 {
    font-size: 22px;
    color: white;
    margin: 0;
}

/* ===== SELECTS ===== */
.country-select,
.state-select {
    background: var(--card);
    color: white;
    border: 2px solid #333;
    border-radius: 30px;
    padding: 12px 25px;
    font-size: 15px;
    cursor: pointer;
    min-width: 220px;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

.country-select:hover,
.country-select:focus,
.state-select:hover,
.state-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* ===== FORMULÁRIO DE BUSCA ===== */
.search-form-radio {
    display: flex;
    gap: 10px;
}

.search-form-radio input {
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid #333;
    background: var(--card);
    color: white;
    width: 300px;
    font-size: 15px;
}

.search-form-radio input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-form-radio button {
    background: var(--primary);
    color: black;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.search-form-radio button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary);
}

/* ===== NUVEM DE TAGS ===== */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.tag {
    background: var(--card);
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #333;
    transition: all 0.3s;
}

.tag:hover,
.tag.active {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ===== GRID DE RÁDIOS ===== */
.radio-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 25px; 
    padding: 20px 0;
}

/* ===== RADIO CARD ===== */
.radio-card { 
    background: var(--card); 
    border-radius: 16px; 
    padding: 20px; 
    display: flex; 
    align-items: flex-start; 
    cursor: pointer; 
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.radio-card:hover { 
    border-color: var(--primary); 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.1);
    background: #252525;
}

.radio-card.playing {
    border-color: var(--primary);
    background: linear-gradient(145deg, #252525, #1a1a1a);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* ===== ÍCONES E FAVICONS ===== */
.radio-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-right: 15px;
    object-fit: cover;
    border: 2px solid #333;
}

.radio-card .icon { 
    font-size: 42px; 
    margin-right: 15px; 
    filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.5));
    min-width: 50px;
    text-align: center;
}

/* ===== INFORMAÇÕES DA RÁDIO ===== */
.radio-info {
    flex: 1;
    min-width: 0;
}

.radio-card h3 { 
    margin: 0 0 5px 0; 
    font-size: 17px; 
    font-weight: 600;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    color: white;
    max-width: 200px;
    padding-right: 70px;
}

.radio-card .genre { 
    margin: 0; 
    font-size: 12px; 
    color: #aaa; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.radio-card .location {
    margin: 5px 0 0;
    font-size: 11px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.radio-card .location::before {
    content: "📍";
    font-size: 12px;
}

.radio-card .popularity {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== BADGE DE "TOCANDO AGORA" ===== */
.now-playing {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: black;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
    z-index: 2;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== MENSAGENS DE ESTADO ===== */
.no-radios,
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--card);
    border-radius: 16px;
    color: #888;
    font-size: 18px;
}

/* ===== INDICADOR DE CARREGAMENTO ===== */
#loading-indicator {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(0, 255, 136, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== PLAYER FIXO ===== */
.player-bar { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background: rgba(0, 0, 0, 0.95); 
    backdrop-filter: blur(10px);
    padding: 20px 0; 
    border-top: 3px solid var(--primary); 
    display: none; 
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.player-content { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 30px; 
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.player-status {
    font-size: 20px;
}

.player-text {
    font-size: 16px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-text strong {
    color: var(--primary);
    margin-right: 5px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.play-btn { 
    background: var(--primary); 
    border: none; 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-size: 20px;
    font-weight: bold; 
    color: black;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.volume-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.volume-slider-container {
    width: 100px;
}

.volume-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #333;
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.close-player {
    background: transparent;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.close-player:hover {
    color: var(--danger);
}

/* ===== FOOTER ===== */
.site-footer { 
    text-align: center; 
    padding: 60px 20px 140px; 
    color: #888; 
    font-size: 14px; 
    background: linear-gradient(0deg, #1a1a1a 0%, var(--bg) 100%);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    text-align: left;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-menu a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: var(--primary);
}

.privacy-link {
    color: var(--primary);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--primary);
    border-radius: 20px;
    transition: all 0.3s;
}

.privacy-link:hover {
    background: var(--primary);
    color: black;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 992px) {
    .radio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .nav-tabs {
        justify-content: center;
    }
    
    .tab-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .country-select,
    .state-select {
        width: 100%;
    }
    
    .search-form-radio {
        flex-direction: column;
    }
    
    .search-form-radio input {
        width: 100%;
    }
    
    .radio-grid {
        grid-template-columns: 1fr;
    }
    
    .radio-card h3 {
        max-width: 180px;
    }
    
    .now-playing {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
    
    .player-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .player-info {
        width: 100%;
    }
    
    .player-text {
        white-space: normal;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    .radio-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .radio-icon,
    .radio-card .icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .radio-card h3 {
        max-width: 100%;
        padding-right: 0;
    }
}