/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Query Buttons */
#queryButtons .btn {
    text-align: left;
    font-size: 0.9rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    white-space: normal;
    word-wrap: break-word;
}

#queryButtons .btn:hover {
    transform: translateX(5px);
    transition: transform 0.2s ease;
}

#queryButtons .btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Results Container */
#resultsContainer {
    max-height: 600px;
    overflow-y: auto;
}

.article-card {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: white;
    transition: box-shadow 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.article-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.article-url {
    font-size: 0.8rem;
    word-break: break-all;
}

.article-tone {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.tone-positive {
    background-color: #d4edda;
    color: #155724;
}

.tone-negative {
    background-color: #f8d7da;
    color: #721c24;
}

.tone-neutral {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Map Styles */
#mapContainer {
    border-radius: 0.25rem;
    overflow: hidden;
}

.leaflet-popup-content {
    font-size: 0.9rem;
}

.leaflet-popup-content h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Network Styles */
#networkContainer {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
    position: relative;
}

.network-node {
    cursor: pointer;
}

.network-node:hover {
    stroke: #0d6efd;
    stroke-width: 3px;
}

.network-link {
    stroke: #999;
    stroke-opacity: 0.6;
}

.network-text {
    font-size: 12px;
    pointer-events: none;
}

/* QA Results */
.qa-item {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: white;
}

.qa-item.success {
    border-left: 4px solid #28a745;
}

.qa-item.error {
    border-left: 4px solid #dc3545;
}

.qa-item.warning {
    border-left: 4px solid #ffc107;
}

.qa-status {
    font-weight: 600;
    margin-right: 0.5rem;
}

.qa-status.success {
    color: #28a745;
}

.qa-status.error {
    color: #dc3545;
}

.qa-status.warning {
    color: #ffc107;
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Status and Error Bars */
#statusBar, #errorBar {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .col-md-3, .col-md-9 {
        margin-bottom: 1rem;
    }
    
    #statusBar, #errorBar {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Card Enhancements */
.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Button Enhancements */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Attribution */
.gdelt-attribution {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

.gdelt-attribution a {
    color: #0d6efd;
    text-decoration: none;
}

.gdelt-attribution a:hover {
    text-decoration: underline;
}

