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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #161b22;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #30363d;
}

header h1 {
    color: #58a6ff;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.news-stats {
    color: #8b949e;
    font-size: 1.1rem;
}

.controls {
    background-color: #161b22;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #30363d;
}

/* Date Slider Styles */
.date-slider-container {
    margin-bottom: 2rem;
}

.date-slider-container label {
    display: block;
    color: #8b949e;
    margin-bottom: 1rem;
    font-weight: 600;
}

.date-slider-wrapper {
    position: relative;
    padding: 20px 0;
}

.date-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #30363d 0%, #58a6ff 50%, #30363d 100%);
    border-radius: 5px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    cursor: pointer;
}

.date-slider:hover {
    opacity: 1;
}

.date-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #58a6ff;
    border: 3px solid #0d1117;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
    transition: all 0.2s;
}

.date-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.8);
}

.date-slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #58a6ff;
    border: 3px solid #0d1117;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
    transition: all 0.2s;
}

.date-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    position: relative;
}

.date-label {
    color: #8b949e;
    font-size: 0.9rem;
}

.date-label.current {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #58a6ff;
    font-weight: 600;
    background-color: #161b22;
    padding: 0 10px;
    border: 1px solid #58a6ff;
    border-radius: 4px;
    top: -35px;
}

.date-label.current::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #58a6ff;
}

/* Quick Date Buttons */
.quick-dates {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.quick-dates button {
    padding: 0.5rem 1rem;
    background-color: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.quick-dates button:hover {
    background-color: #30363d;
    border-color: #58a6ff;
    color: #58a6ff;
}

/* Filters Container */
.filters-container {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #30363d;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    color: #8b949e;
    font-weight: 600;
    white-space: nowrap;
}

.filter-group select {
    padding: 0.5rem 1rem;
    background-color: #0d1117;
    border: 1px solid #30363d;
    color: #c9d1d9;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 200px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}

.filter-group select:hover {
    border-color: #484f58;
}

/* News Table */
.news-table-container {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
}

.news-table thead {
    background-color: #1c2128;
    border-bottom: 2px solid #58a6ff;
}

.news-table th {
    padding: 1rem;
    text-align: left;
    color: #58a6ff;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-table tbody tr {
    border-bottom: 1px solid #30363d;
    transition: background-color 0.2s;
}

.news-table tbody tr:hover {
    background-color: #1c2128;
}

.news-table tbody tr.even {
    background-color: rgba(22, 27, 34, 0.5);
}

.news-table td {
    padding: 0.75rem 1rem;
    color: #c9d1d9;
    font-size: 0.9rem;
}

.row-number {
    text-align: center;
    color: #6e7681;
    font-weight: 500;
}

.title-cell {
    font-weight: 500;
}

.title-cell a {
    color: #58a6ff;
    text-decoration: none;
    transition: color 0.2s;
}

.title-cell a:hover {
    color: #79c0ff;
    text-decoration: underline;
}

.datetime-cell {
    color: #7ee83f;
    white-space: nowrap;
    font-size: 0.85rem;
    text-align: right;
    padding-right: 1.5rem !important;
}

.category-cell {
    text-align: center;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 166, 87, 0.1);
    color: #ffa657;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.source-cell {
    color: #8b949e;
    font-style: italic;
    font-size: 0.85rem;
}

.no-news {
    text-align: center;
    padding: 3rem;
    color: #8b949e;
    font-size: 1.2rem;
}

/* Loading State */
.ajax-loading {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #161b22;
    border: 1px solid #58a6ff;
    color: #58a6ff;
    padding: 10px 20px;
    border-radius: 6px;
    display: none;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.3);
}

/* Load More Button */
.load-more {
    text-align: center;
    margin: 2rem 0;
}

.load-more button {
    padding: 0.75rem 2rem;
    background-color: #238636;
    border: 1px solid #2ea043;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.load-more button:hover {
    background-color: #2ea043;
    box-shadow: 0 0 10px rgba(46, 160, 67, 0.5);
}

.load-more button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 10px;
    }
    
    .news-table {
        font-size: 0.85rem;
    }
    
    .news-table th,
    .news-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .date-labels {
        font-size: 0.8rem;
    }
    
    .quick-dates {
        justify-content: space-between;
    }
    
    .quick-dates button {
        flex: 1;
        min-width: 80px;
    }
    
    /* Stack filters vertically on mobile */
    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    /* Hide datetime column on mobile to save space */
    .news-table th:last-child,
    .news-table td:last-child {
        display: none;
    }
    
    /* Adjust column widths for mobile */
    .news-table th:nth-child(2) {
        width: 50%;
    }
    
    .news-table th:nth-child(3) {
        width: 20%;
    }
    
    .news-table th:nth-child(4) {
        width: 25%;
    }
}