/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #121212;
    color: #E4E4E7;
    line-height: 1.6;
    min-height: 100vh;
}

/* Tipografia */
h1 { font-size: 3rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 2rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.4; }
p { font-size: 1rem; line-height: 1.6; }

/* Layout */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
}

.section {
    padding: 96px 0;
}

.section-sm {
    padding: 48px 0;
}

/* Header */
.header {
    background: #1E1E1E;
    border-bottom: 1px solid #666666;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo {
    color: #007BFF;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: #A5A5A5;
    text-decoration: none;
    font-size: 15px;
    transition: all 300ms ease;
    position: relative;
}

.nav-menu a:hover {
    color: #E4E4E7;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #007BFF;
    transition: all 300ms ease;
    transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 250ms ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #007BFF;
    color: white;
}

.btn-primary:hover {
    background: #0056B3;
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 123, 255, 0.35);
}

.btn-secondary {
    background: transparent;
    color: #A5A5A5;
    border: 1px solid #666666;
}

.btn-secondary:hover {
    color: #E4E4E7;
    border-color: #E4E4E7;
}

.btn-outline {
    background: transparent;
    color: #007BFF;
    border: 1px solid #007BFF;
}

.btn-outline:hover {
    background: #007BFF;
    color: white;
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #E4E4E7;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #121212;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: #E4E4E7;
    text-decoration: none;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    background: #121212;
    padding: 96px 0;
    text-align: center;
}

.hero h1 {
    margin-bottom: 24px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    height: 56px;
    background: #1E1E1E;
    border: 1px solid #666666;
    border-radius: 12px;
    padding: 0 24px;
    color: #E4E4E7;
    font-size: 16px;
    transition: all 250ms ease;
}

.search-input:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.25);
}

.search-input::placeholder {
    color: #666666;
}

/* Banners */
.banner-container {
    background: #1E1E1E;
    padding: 24px;
    margin: 32px 0;
    border-radius: 12px;
    text-align: center;
}

.banner-label {
    color: #666666;
    font-size: 14px;
    margin-bottom: 16px;
}

.banner-slot {
    background: #121212;
    min-height: 250px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
}

/* Galerias */
.gallery {
    margin: 64px 0;
}

.gallery h2 {
    margin-bottom: 32px;
    text-align: center;
}

.gallery-grid {
    display: grid;
    gap: 24px;
}

/* Em Destaque - Grid de logos */
.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.radio-card {
    background: #1E1E1E;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 250ms ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.radio-card:hover {
    transform: translateY(-4px);
    border-color: #007BFF;
}

.radio-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 16px;
    border-radius: 8px;
}

/* Não Deixe de Ouvir - Mosaico */
.mosaic-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.mosaic-card {
    background: #1E1E1E;
    border-radius: 8px;
    padding: 24px;
    transition: all 250ms ease;
    cursor: pointer;
}

.mosaic-card:hover {
    transform: translateY(-4px);
    background: #2A2A2A;
}

.mosaic-card h3 {
    margin-bottom: 16px;
}

.radio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    background: #007BFF;
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.listen-link {
    color: #A5A5A5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 250ms ease;
}

.listen-link:hover {
    color: #007BFF;
}

/* Formulários */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #E4E4E7;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #1E1E1E;
    border: 1px solid #666666;
    border-radius: 8px;
    color: #E4E4E7;
    font-size: 16px;
    transition: border-color 250ms ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.25);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-file {
    padding: 8px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007BFF;
}

/* Player de rádio */
.radio-player {
    background: #1E1E1E;
    padding: 32px;
    border-radius: 12px;
    margin: 32px 0;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: #007BFF;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 250ms ease;
}

.play-btn:hover {
    background: #0056B3;
    transform: scale(1.05);
}

.play-btn.stop-btn {
    background: #DC3545;
}

.play-btn.stop-btn:hover {
    background: #C82333;
}

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

.volume-icon {
    color: #A5A5A5;
}

.volume-slider {
    width: 120px;
    height: 6px;
    background: #666666;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #007BFF;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #0056B3;
    transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #007BFF;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    background: #0056B3;
    transform: scale(1.1);
}

/* Player Avançado - Status e Controles */
.connection-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.progress-container {
    position: relative;
    cursor: pointer;
}

.progress-container:hover {
    background: #1A1A1A;
}

.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    z-index: 1;
}

.player-info {
    font-size: 12px;
    color: #A5A5A5;
    text-align: center;
    margin-top: 8px;
}

/* Estado de carregamento do player */
.player-loading {
    position: relative;
    overflow: hidden;
}

.player-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Botão de instalação PWA */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #007BFF, #0056B3);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    box-shadow: 0 8px 32px rgba(0,123,255,0.3);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(100px);
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,123,255,0.4);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

.pwa-install-btn .icon {
    font-size: 16px;
}

/* Notificações PWA */
.pwa-toast {
    animation: slideInUp 0.3s ease-out;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.4;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notificação de atualização PWA */
#pwa-update-notification {
    animation: slideDown 0.3s ease-out;
    border-left: 4px solid #007BFF;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.update-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-content .icon {
    font-size: 24px;
    color: #007BFF;
}

.update-content strong {
    color: #007BFF;
    font-size: 14px;
}

.update-content p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #A5A5A5;
}

.update-content button {
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
    transition: all 0.2s ease;
}

.update-content button:hover {
    background: #0056B3;
    transform: translateY(-1px);
}

/* PWA específico - Standalone mode */
@media (display-mode: standalone) {
    body.pwa-installed {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    .pwa-install-btn {
        display: none !important;
    }
    
    /* Ocultar elementos não necessários em modo app */
    .header .user-menu {
        /* Manter mas pode ajustar */
    }
}

/* Responsividade do Player */
@media (max-width: 768px) {
    .player-controls {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    
    .volume-control {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .volume-slider {
        width: 150px;
    }
    
    .connection-status {
        order: 2;
        min-width: auto;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .pwa-install-btn {
        bottom: 16px;
        right: 16px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .connection-status {
        display: none;
    }
    
    .player-info {
        font-size: 11px;
    }
    
    .volume-slider {
        width: 120px;
    }
    
    .radio-player {
        padding: 24px 16px;
        margin: 24px 0;
    }
}

/* Estados visuais do player */
.player-state-loading .play-btn {
    background: #FFA500 !important;
    animation: pulse 1s infinite;
}

.player-state-error .play-btn {
    background: #DC3545 !important;
}

.player-state-playing .play-btn {
    background: #28A745 !important;
}

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

/* Acessibilidade */
.play-btn:focus,
.volume-slider:focus {
    outline: 2px solid #007BFF;
    outline-offset: 2px;
}

.volume-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Otimizações para touch */
@media (hover: none) and (pointer: coarse) {
    .play-btn {
        width: 56px;
        height: 56px;
    }
    
    .volume-slider {
        height: 8px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
}

/* Animação de entrada para elementos */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* Hover states para desktop */
@media (hover: hover) {
    .radio-player:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
    }
    
    .connection-status:hover {
        color: #E4E4E7;
    }
}

/* Flash messages */
.flash-message {
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
}

.flash-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28A745;
    border: 1px solid #28A745;
}

.flash-error {
    background: rgba(220, 53, 69, 0.1);
    color: #DC3545;
    border: 1px solid #DC3545;
}

.flash-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
    border: 1px solid #FFC107;
}

/* Footer */
.footer {
    background: #1E1E1E;
    border-top: 1px solid #666666;
    padding: 64px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 32px;
}

.footer-section h3 {
    margin-bottom: 24px;
    color: #E4E4E7;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #A5A5A5;
    text-decoration: none;
    line-height: 2;
    transition: color 250ms ease;
}

.footer-links a:hover {
    color: #007BFF;
}

.footer-bottom {
    border-top: 1px solid #666666;
    padding-top: 32px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

/* Responsivo */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    
    .container {
        padding: 0 24px;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .hero {
        padding: 48px 0;
    }
    
    .auth-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .mosaic-grid {
        grid-template-columns: 1fr;
    }
    
    .player-controls {
        flex-wrap: wrap;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.875rem; }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .radio-card {
        padding: 16px;
    }
    
    .search-input {
        height: 48px;
        padding: 0 16px;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 600ms ease-out;
}

/* Redução de movimento para acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Estilos para páginas administrativas */
.admin-panel {
    background: #1E1E1E;
    border-radius: 12px;
    padding: 32px;
    margin: 32px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #666666;
}

.admin-table th {
    color: #E4E4E7;
    font-weight: 600;
}

.admin-table td {
    color: #A5A5A5;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.status-pendente { background: rgba(255, 193, 7, 0.1); color: #FFC107; }
.status-aprovada { background: rgba(40, 167, 69, 0.1); color: #28A745; }
.status-rejeitada { background: rgba(220, 53, 69, 0.1); color: #DC3545; }

/* Estilos para a página de divulgação */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.banner-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.banner-preview {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.leaderboard-banner {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
}

.medium-rectangle-banner {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.skyscraper-banner {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
}

.standard-banner {
    background: linear-gradient(45deg, #6f42c1, #e83e8c);
}

.banner-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.banner-content {
    text-align: center;
}

.banner-text h3 {
    margin: 0;
    font-size: 18px;
}

.banner-text p {
    margin: 5px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.banner-info {
    padding: 20px;
}

.banner-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 16px;
}

.banner-info p {
    margin: 0 0 15px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.download-buttons {
    display: flex;
    gap: 10px;
}

.audio-vinhetas {
    margin: 30px 0;
}

.vinheta-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.vinheta-player {
    flex-shrink: 0;
}

.vinheta-player audio {
    width: 200px;
    height: 40px;
}

.vinheta-info {
    flex: 1;
}

.vinheta-info h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 18px;
}

.vinheta-info p {
    margin: 5px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.download-all {
    text-align: center;
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.download-all h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 20px;
}

.download-all p {
    margin: 0 0 20px 0;
    color: var(--text-muted);
}

.usage-terms {
    margin: 30px 0;
}

.term-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
}

.term-item i {
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.term-item h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 16px;
}

.term-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .banner-grid {
        grid-template-columns: 1fr;
    }
    
    .vinheta-item {
        flex-direction: column;
        text-align: center;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .term-item {
        flex-direction: column;
        text-align: center;
    }
}