/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #000000;
    color: #e7e9ea;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #2f3336;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: flame 2s ease-in-out infinite alternate;
}

@keyframes flame {
    0% { transform: scale(1) rotate(-2deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #e7e9ea;
}

.header-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1d9bf0;
}

.stat-label {
    font-size: 0.875rem;
    color: #8b98a5;
    font-weight: 500;
}

.header-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: #8b98a5;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e7e9ea;
}

.lang-btn.active {
    background: #1d9bf0;
    color: white;
    box-shadow: 0 2px 8px rgba(29, 155, 240, 0.3);
}

/* Beta Disclaimer Styles */
.beta-disclaimer {
    background: linear-gradient(135deg, #ff4444, #ff6b35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 999;
    animation: betaPulse 2s ease-in-out infinite;
}

@keyframes betaPulse {
    0%, 100% { background: linear-gradient(135deg, #ff4444, #ff6b35); }
    50% { background: linear-gradient(135deg, #ff6b35, #ff4444); }
}

.beta-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.beta-icon {
    font-size: 1.2rem;
    color: #ffffff;
    animation: shake 1s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.beta-text {
    flex: 1;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.beta-text strong {
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.beta-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.beta-close:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

.beta-disclaimer.hidden {
    display: none;
}

/* Beta Warning in About Section */
.beta-warning {
    border: 2px solid #ff6b35 !important;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 68, 68, 0.1)) !important;
    border-radius: 12px !important;
    margin-bottom: 2rem !important;
}

.beta-warning h2 {
    color: #ff6b35 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.beta-card {
    background: rgba(255, 107, 53, 0.05) !important;
    border: 1px solid rgba(255, 107, 53, 0.2) !important;
}

.beta-note {
    margin-top: 1rem !important;
    padding: 0.75rem !important;
    background: rgba(255, 107, 53, 0.1) !important;
    border-radius: 8px !important;
    border-left: 4px solid #ff6b35 !important;
    color: #e7e9ea !important;
}

.beta-note i {
    color: #ff6b35 !important;
    margin-right: 0.5rem !important;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.update-schedule-indicator {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.update-schedule-indicator i {
    font-size: 0.8rem;
    color: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Update info section styling */
.update-info {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.update-info ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.update-info li {
    margin: 0.5rem 0;
    color: #e7e9ea;
    line-height: 1.5;
}

.update-note {
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid #22c55e;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    color: #e7e9ea;
    font-size: 0.9rem;
    line-height: 1.5;
}

.update-note i {
    color: #22c55e;
    margin-right: 0.5rem;
}

.btn-settings {
    background: rgba(255, 255, 255, 0.2);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-primary {
    background: #1d9bf0;
    color: white;
}

.btn-primary:hover {
    background: #1a8cd8;
}

/* Navigation Tabs */
.nav-tabs {
    background: #000000;
    border-bottom: 1px solid #2f3336;
    padding: 0 2rem;
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #8b98a5;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 4px solid transparent;
    position: relative;
}

.tab-btn.active {
    color: #e7e9ea;
    border-bottom-color: #1d9bf0;
}

.tab-btn:hover {
    color: #e7e9ea;
    background: rgba(255, 255, 255, 0.03);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    position: relative;
    background: #000000;
    height: calc(100vh - 120px); /* Account for header and tabs */
}

.tab-content {
    display: none;
    height: calc(100vh - 180px);
    position: relative;
}

.tab-content.active {
    display: block;
}

/* Disclaimer Banner */
.disclaimer-banner {
    background: #1a1a1a;
    border-bottom: 1px solid #2f3336;
    padding: 0.75rem 2rem;
}

.disclaimer-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 1400px;
    margin: 0 auto;
    color: #8b98a5;
    font-size: 0.875rem;
}

.disclaimer-content i {
    color: #f7931a;
    flex-shrink: 0;
}

/* Map Styles */
.map-container {
    height: 100%;
    position: relative;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(22, 24, 28, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid #2f3336;
    z-index: 1000;
    width: 240px;
    transition: all 0.3s ease;
}

.controls-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2f3336;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-header h3 {
    color: #e7e9ea;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
}

.controls-toggle {
    background: none;
    border: none;
    color: #8b98a5;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none; /* Hidden by default, shown on mobile */
}

.controls-toggle:hover {
    color: #e7e9ea;
    background: rgba(255, 255, 255, 0.1);
}

.controls-content {
    transition: all 0.3s ease;
}

.map-controls.collapsed .controls-content {
    display: none;
}

.map-controls.collapsed {
    min-width: auto;
    width: auto;
}

.data-source-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2f3336;
}

.source-badge {
    background: linear-gradient(135deg, #1d9bf0, #0f7cc9);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.375rem;
}

.source-description {
    font-size: 0.625rem;
    color: #8b98a5;
    line-height: 1.3;
    margin: 0;
    text-align: center;
}

.control-group {
    margin-bottom: 0.75rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 500;
    color: #8b98a5;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #2f3336;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #16181c;
    color: #e7e9ea;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: #1d9bf0;
}

/* Fire List Sidebar Styles */
.map-wrapper {
    display: flex;
    flex: 1;
    height: 100%;
    min-height: calc(100vh - 180px);
}

.fire-list-sidebar {
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    border-right: 1px solid #2f3336;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #2f3336;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sidebar-header h3 {
    color: #e7e9ea;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header i {
    color: #ff6b35;
}

.fire-count-badge {
    background: #ff6b35;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.fire-list {
    display: flex;
    flex-direction: column;
}

.fire-list-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fire-list-item:hover {
    background: rgba(255, 107, 53, 0.1);
}

.fire-list-item.selected {
    background: rgba(255, 107, 53, 0.2);
    border-left: 3px solid #ff6b35;
}

.fire-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.fire-item-location {
    color: #e7e9ea;
    font-weight: 500;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fire-item-time {
    color: #8b98a5;
    font-size: 0.8rem;
    white-space: nowrap;
}

.fire-item-details {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}

.fire-item-confidence {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.fire-item-intensity {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #8b98a5;
}

.fire-item-satellite {
    color: #8b98a5;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Ensure map container takes remaining space */
.map-container {
    flex: 1;
    position: relative;
}

/* Fire Info Panel */
.fire-info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 350px;
    background: rgba(22, 24, 28, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid #2f3336;
    z-index: 1000;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    transform: translateX(-400px);
    transition: transform 0.3s ease;
}

.fire-info-panel.active {
    transform: translateX(0);
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid #2f3336;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e7e9ea;
    flex: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #8b98a5;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e7e9ea;
}

.panel-content {
    padding: 1.5rem;
}

.fire-detail {
    margin-bottom: 1rem;
}

.fire-detail:last-child {
    margin-bottom: 0;
}

.fire-detail label {
    display: block;
    font-weight: 600;
    color: #8b98a5;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.fire-detail span {
    display: block;
    font-size: 1rem;
    color: #e7e9ea;
    font-weight: 500;
}

.confidence-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confidence-high {
    background: #ff6b6b;
    color: white;
}

.confidence-medium {
    background: #ffa500;
    color: white;
}

.confidence-low {
    background: #4ecdc4;
    color: white;
}

/* Weather Section */
.weather-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.weather-icon {
    font-size: 2rem;
}

.weather-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.weather-info p {
    font-size: 0.875rem;
    color: #666;
}

.weather-forecast {
    background: rgba(102, 126, 234, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.weather-forecast h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.forecast-item:last-child {
    margin-bottom: 0;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(22, 24, 28, 0.9);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #2f3336;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.map-legend:hover {
    opacity: 1;
}

.legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.legend-header h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b98a5;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-close {
    background: none;
    border: none;
    color: #8b98a5;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.legend-close:hover {
    color: #e7e9ea;
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.map-legend.hidden {
    display: none;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-marker {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.legend-marker img {
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.6));
}

.legend-section {
    margin-bottom: 1rem;
}

.legend-section:last-child {
    margin-bottom: 0;
}

.legend-section h5 {
    color: #e7e9ea;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item span {
    font-size: 0.7rem;
    color: #8b98a5;
    font-weight: 500;
}

/* Historical Tab Styles */
.historical-container {
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
    background: #000000;
}

.historical-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.historical-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #e7e9ea;
    margin-bottom: 0;
}

.historical-disclaimer {
    color: #8b98a5;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.historical-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-input {
    padding: 0.75rem;
    border: 1px solid #2f3336;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #16181c;
    color: #e7e9ea;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #1d9bf0;
}

.historical-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #16181c;
    border: 1px solid #2f3336;
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #1d9bf0;
}

.stat-card i {
    font-size: 2rem;
    color: #1d9bf0;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e7e9ea;
}

.stat-title {
    font-size: 0.875rem;
    color: #8b98a5;
    font-weight: 500;
}

.historical-table-container {
    background: #16181c;
    border: 1px solid #2f3336;
    border-radius: 16px;
    overflow: hidden;
}

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

.historical-table th,
.historical-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #2f3336;
}

.historical-table th {
    background: #1a1a1a;
    font-weight: 600;
    color: #e7e9ea;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.historical-table td {
    color: #8b98a5;
}

.historical-table tbody tr:hover {
    background: #1a1a1a;
}

/* Analytics Tab Styles */
.analytics-container {
    padding: 2rem;
    height: 100%;
    overflow-y: auto;
    background: #000000;
}

.analytics-container h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #e7e9ea;
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-container {
    background: #16181c;
    border: 1px solid #2f3336;
    padding: 1.5rem;
    border-radius: 16px;
}

/* About Tab Styles */
.about-container {
    height: 100%;
    overflow-y: auto;
    background: #000000;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    color: #e7e9ea;
}

.about-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #e7e9ea;
}

.about-subtitle {
    font-size: 1.25rem;
    color: #8b98a5;
    margin-bottom: 3rem;
    font-weight: 400;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #e7e9ea;
}

.disclaimer-card, .attribution-card, .tech-card {
    background: #16181c;
    border: 1px solid #2f3336;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.disclaimer-card p, .attribution-card p, .tech-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.disclaimer-card ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.disclaimer-card li {
    margin-bottom: 0.5rem;
    color: #8b98a5;
}

.emergency-numbers {
    background: #1a1a1a;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid #f7931a;
}

.emergency-numbers h3 {
    margin-bottom: 0.5rem;
    color: #f7931a;
    font-size: 1rem;
}

.source-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2f3336;
}

.source-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.source-item h3 {
    color: #1d9bf0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.source-item a {
    color: #1d9bf0;
    text-decoration: none;
}

.source-item a:hover {
    text-decoration: underline;
}

.confidence-levels {
    margin-top: 1rem;
}

.confidence-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #1a1a1a;
    border-radius: 8px;
}

.confidence-item .emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.confidence-item strong {
    color: #e7e9ea;
}

.confidence-item p {
    margin: 0.25rem 0 0 0;
    color: #8b98a5;
    font-size: 0.9rem;
}

.tech-details {
    background: #16181c;
    border: 1px solid #2f3336;
    border-radius: 16px;
    padding: 1.5rem;
}

.tech-details p {
    margin-bottom: 0.75rem;
    color: #8b98a5;
}

.tech-details strong {
    color: #e7e9ea;
}

.legal-text {
    background: #16181c;
    border: 1px solid #2f3336;
    border-radius: 16px;
    padding: 1.5rem;
    color: #8b98a5;
    font-size: 0.9rem;
    line-height: 1.6;
}

.legal-text p {
    margin-bottom: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(22, 24, 28, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid #2f3336;
    padding: 1.5rem;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text h3 {
    color: #e7e9ea;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cookie-text p {
    color: #8b98a5;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    max-width: 600px;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-accept {
    background: #1d9bf0;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-accept:hover {
    background: #1a8cd8;
}

.btn-reject {
    background: transparent;
    color: #8b98a5;
    padding: 0.75rem 1.5rem;
    border: 1px solid #2f3336;
    border-radius: 9999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e7e9ea;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loading-spinner p {
    margin-top: 1rem;
    font-weight: 600;
    color: #333;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: right;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.setting-group input,
.setting-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.3s ease;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: #667eea;
}

.setting-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #666;
}

.setting-group small a {
    color: #667eea;
    text-decoration: none;
}

.setting-group small a:hover {
    text-decoration: underline;
}

/* Fire Emoji Markers */
.fire-emoji-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
}

.fire-emoji-marker:hover {
    background: transparent !important;
    border: none !important;
}

.fire-emoji-marker span {
    background: transparent !important;
    border: none !important;
    display: block !important;
}

/* Override any Leaflet default marker styling */
.leaflet-div-icon {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

.leaflet-marker-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Specifically target fire emoji markers */
.leaflet-div-icon.fire-emoji-marker {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}



/* Responsive Design - Mobile First */
@media screen and (max-width: 768px), 
       screen and (max-device-width: 768px),
       screen and (max-width: 480px),
       screen and (max-device-width: 480px) {
    /* FORCE HIDE ALL overlays and UI elements on mobile (except fire-info-panel which works as bottom sheet) */
    .beta-disclaimer,
    .disclaimer-banner,
    .map-controls,
    .map-legend,
    .fire-list-sidebar,
    .time-range-banner,
    #time-range-banner,
    .notification,
    .banner,
    .cookie-consent-banner,
    .loading-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    
    /* Mobile map takes full width without sidebar */
    .map-wrapper {
        flex-direction: column;
    }
    
    .map-container {
        width: 100% !important;
        flex: 1;
    }
    
    /* Simplify header for mobile - keep only active fires count */
    .header-stats .stat-item:not(:first-child) {
        display: none;
    }
    
    /* Hide header controls (update schedule) on mobile */
    .header-controls {
        display: none !important;
    }
    
    /* Hide site title text, keep only icon and short name */
    .logo h1 {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .header {
        position: relative;
        padding: 0.5rem 0;
    }
    
    .header-content {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0 1rem;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-stats {
        gap: 1rem;
    }
    
    .header-stats .stat-item .stat-number {
        font-size: 1.25rem;
    }
    
    .header-stats .stat-item .stat-label {
        font-size: 0.75rem;
    }
    
    /* Maximize map area on mobile */
    .main-content {
        flex: 1;
        padding: 0;
    }
    
    .map-container {
        height: calc(100vh - 120px); /* Account for header and tabs */
        margin: 0;
        padding: 0;
    }
    
    #map {
        height: 100% !important;
        border-radius: 0;
    }
    
    
    
    .nav-tabs {
        flex-wrap: nowrap;
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .tab-content {
        height: calc(100vh - 220px);
    }
    
    .beta-disclaimer {
        position: relative;
    }
    
    /* Mobile-friendly map controls - move to bottom */
    .map-controls {
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: auto;
        margin: 0;
        width: calc(100% - 20px);
        max-width: 350px;
        min-width: auto;
        padding: 0.75rem;
        z-index: 1001;
    }
    
    /* Start collapsed by default on mobile */
    .map-controls:not(.user-expanded) {
        bottom: 10px;
    }
    
    .map-controls:not(.user-expanded) .controls-content {
        display: none;
    }
    
    .map-controls:not(.user-expanded) .controls-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .controls-toggle {
        display: block !important;
    }
    
    .map-controls.collapsed {
        bottom: 10px;
        width: auto;
        min-width: auto;
        transform: translateX(-50%);
        left: 50%;
    }
    
    .map-controls.collapsed .controls-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
    
    .controls-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .controls-header h3 {
        font-size: 0.85rem;
    }
    
    .control-group {
        margin-bottom: 0.75rem;
    }
    
    .data-source-info {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    .source-description {
        font-size: 0.65rem;
    }
    
    /* Mobile fire info panel - make it a bottom sheet */
    .fire-info-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        transform: translateY(100%);
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        z-index: 1002;
    }
    
    .fire-info-panel.active {
        transform: translateY(0);
    }
    
    /* Mobile legend - move to top */
    .map-legend {
        position: fixed;
        top: 10px;
        right: 10px;
        bottom: auto;
        left: auto;
        margin: 0;
        width: auto;
        max-width: calc(100vw - 20px);
        opacity: 0.9;
    }
    
    .historical-container,
    .analytics-container {
        padding: 1rem;
    }
    
    .historical-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .historical-controls {
        flex-wrap: wrap;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .header-stats {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-around;
    }
    
    .stat-item {
        flex: 1;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .tab-content {
        height: calc(100vh - 250px);
    }
    
    .update-schedule-indicator {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .tab-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        min-width: 0;
    }
    
    /* Smaller controls on very small screens */
    .map-controls {
        max-width: calc(100% - 10px);
        padding: 0.5rem;
    }
    
    .controls-header h3 {
        font-size: 0.8rem;
    }
    
    .control-group select {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
    
    .fire-info-panel {
        max-height: 80vh;
    }
    
    .historical-stats {
        grid-template-columns: 1fr;
    }
    
    .historical-table {
        font-size: 0.875rem;
    }
    
    .historical-table th,
    .historical-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .nav-tabs {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .map-controls,
    .fire-info-panel,
    .map-legend,
    .stat-card,
    .historical-table-container,
    .chart-container {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
    }
    
    .modal-content {
        background: #1e1e1e;
        color: #fff;
    }
    
    .setting-group input,
    .setting-group select,
    .control-group select,
    .date-input {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
}

/* Fire Icon Styles */
.fire-modis-icon, .fire-viirs-icon {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8)) 
            drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
    cursor: pointer;
    transition: all 0.2s ease;
}

.fire-modis-icon {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8)) 
            drop-shadow(0 0 8px rgba(255, 0, 0, 0.5));
}

.fire-viirs-icon {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8)) 
            drop-shadow(0 0 8px rgba(255, 255, 0, 0.5));
}

.fire-modis-icon:hover, .fire-viirs-icon:hover {
    filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, 0.9)) 
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
    transform: scale(1.1);
}

/* FORCE MOBILE CLEAN INTERFACE - OVERRIDE ALL */
@media (max-width: 768px) {
    body .beta-disclaimer,
    body .disclaimer-banner,
    body .map-controls,
    body .map-legend,
    body .time-range-banner,
    body #time-range-banner,
    body .notification,
    body .banner,
    body .cookie-consent-banner,
    body .loading-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        position: absolute !important;
        top: -10000px !important;
        left: -10000px !important;
        z-index: -999999 !important;
    }
}
