/* Estilos base - tema claro */
body {
    font-family: 'Merriweather', serif;
    background-color: #ffffff;
    color: #333333;
    margin: 0;
    padding: 10px;
    line-height: 1.6;
}

/* Container principal compacto */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Seletor de API compacto */
.api-selector-container.compact {
    margin: 10px 0;
    padding: 10px;
    background: #2a2a2a;
    border-radius: 4px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.api-selector-container.compact .form-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

/* Lista de feeds compacta */
.feed-list {
    display: block;
    gap: 8px;
    margin: 10px 0;
}

.feed-item.compact {
    float: left;
    width: calc(50% - 10px);
    margin: 5px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    box-sizing: border-box;
}

.feed-list.compact {
    display: block;
    margin: 10px 0;
}

.feed-info {
    overflow: hidden;
}

.feed-info h3 {
    margin: 0 0 3px 0;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-info a {
    color: #64b5f6;
    font-size: 0.85em;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-action {
    display: flex;
    align-items: center;
}

/* Notícias compactas */
.news-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.news-item {
    float: left;
    width: calc(50% - 10px);
    margin: 5px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    box-sizing: border-box;
}

.news-list {
    overflow: hidden;
    margin: 10px 0;
}

.news-item h4 {
    margin: 0 0 3px 0;
    font-size: 0.95em;
}

.news-item p {
    margin: 0 0 5px 0;
    font-size: 0.85em;
    color: #e0e0e0;
    line-height: 1.3;
}

.news-action {
    margin-top: 5px;
}

/* Botões compactos */
.styled-button {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    white-space: nowrap;
}

.styled-button.small {
    padding: 3px 6px;
    font-size: 0.8em;
}

.styled-button.large {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* Títulos */
h1 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
}

h2 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.8rem;
    color: #ffffff;
    margin: 40px 0 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

/* Layout de colunas */
.news-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

.news-grid > * {
    box-sizing: border-box;
}

/* Estilo para cada item de notícia */
.news-item {
    float: left;
    background: #1e1e1e;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #2e2e2e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: calc(100% - 10px);
    margin: 10px;
    
}

.news-item h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0 0 15px;
    line-height: 1.3;
}

.news-item p {
    color: #e0e0e0;
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 15px 0;
}

[data-translate] {
    translate: auto;
}

/* Estilos para fonte e data */
.fonte {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-top: 20px;
    padding: 12px;
    background: #2a2a2a;
    border-radius: 6px;
    border-left: 4px solid #444;
}

.data-info {
    color: #999999;
    font-style: italic;
    margin-left: 10px;
}

/* Estilos para indicadores */
.indicators {
    margin-top: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

/* Formulário */
form {
    margin: 0;
    padding: 10px;
    background: #1e1e1e;
    border-radius: 8px;
}

/* Links */
a {
    color: #64b5f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.api-form .form-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-form label {
    color: #fff;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.95em;
    margin-right: 8px;
}

.styled-select {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #2a2a2a;
    color: #fff;
    font-size: 1em;
    height: 40px;
}

.styled-button.large {
    padding: 10px 25px;
    font-size: 1em;
    height: 40px;
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
    .news-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-item {
        width: 100%;
        padding: 20px;
    }
    
    body {
        padding: 30px 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .news-item h3 {
        font-size: 1.2rem;
    }

    .api-selector-container.compact {
        margin: 8px 0;
        padding: 8px;
        height: 40px !important;
    }
    
    .api-form .form-group {
        gap: 6px;
    }
    
    .styled-select {
        padding: 8px 12px;
        font-size: 0.95em;
    }
    
    .styled-button.large {
        padding: 8px 20px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 10px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .news-item {
        padding: 15px;
    }
    
    .fonte {
        font-size: 0.8rem;
    }
}

/* URL Status Styles */
.url-status {
    margin-bottom: 30px;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 8px;
}

.url-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    border-radius: 4px;
    background: #2a2a2a;
}

.url-item .url {
    color: #e0e0e0;
    font-size: 0.9rem;
    word-break: break-all;
}

.url-item .status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.status-success {
    background: #2e7d32;
    color: white;
}

.status-error {
    background: #c62828;
    color: white;
}

/* Debug Styles */
.debug-wrapper {
  background: rgba(255, 255, 255, 0.95);
  color: #333333;
  padding: 20px;
  margin-top: 30px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dddddd;
}

.debug-container {
  margin: 0 auto;
  max-width: 1200px;
}

.debug-section {
  margin-bottom: 15px;
  padding: 10px;
  background: #f5f5f5;
  border: 1px solid #dddddd;
}

.url-status-table {
  width: 100%;
  border-collapse: collapse;
}

.url-status-table th,
.url-status-table td {
  padding: 8px;
  border: 1px solid #444;
}

.url-status-table th {
  background: #333;
  color: #fff;
  text-align: left;
}

/* Estilos para o modal de notícias */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.news-modal-content {
    background: #ffffff;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 8px;
    overflow: hidden;
    color: #333333;
}

.news-modal-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    border-bottom: 1px solid #dddddd;
}

.news-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.close-modal {
    background: none;
    border: none;
    color: #333333;
    font-size: 24px;
    cursor: pointer;
}

.view-news-container {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 10px;
}

.date-select {
    padding: 5px;
    border-radius: 4px; 
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
}

.date-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 4px;
}

.date-filters label {
    display: block;
    margin-bottom: 10px;
    color: #333333;
    font-weight: 500;
}

.date-inputs { 
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-inputs span {
    color: #333333;
}

/* Estilos da tabela de URLs - Modernizado */
.urls-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.urls-table .header-row {
    background: #e6e6e6;
}

.urls-table .header-row th {
    padding: 15px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #444;
}

.urls-table .data-row {
    transition: background-color 0.2s;
}

.urls-table .data-row:hover {
    background: #252525;
}

.urls-table .data-row td {
    padding: 20px 15px;
    border-bottom: 1px solid #383838;
}

/* Estilo das notícias retornadas */
.news-result {
    padding: 0;
    background: transparent;
    border: none;
}

.news-result .news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
    padding: 20px;
}

.news-result .news-item {
    background: #252525;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #383838;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-result .news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.news-result .news-item p {
    margin: 12px 0;
    line-height: 1.5;
}

.news-result .news-item p strong {
    color: #808080;
    font-weight: 500;
    margin-right: 8px;
}

/* Ajustes na linha de expansão */
.news-result-row {
    background: #1e1e1e;
}

.news-result-row td {
    padding: 0 !important;
    border-bottom: 1px solid #383838;
}

/* Estilo para mensagens de erro/aviso */
.news-result .error-message,
.news-result .warning {
    background: #2a2a2a;
    border: 1px solid #383838;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px;
    color: #e0e0e0;
}