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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(33, 33, 33, 0.8);
    border-radius: 8px;
    padding: 15px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 26px;
    font-weight: 600;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
}

#lastUpdated {
    font-size: 14px;
    opacity: 0.9;
}

#refreshBtn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

#refreshBtn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(180deg);
}

/* Map Container */
.map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#leafletContainer {
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* Improved Info Panel */
.info-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 360px;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(40, 40, 40, 0.95));
    color: white;
    padding: 24px;
    transition: transform 0.3s ease-out;
    transform: translateX(-100%);
    will-change: transform;
    z-index: 999;
    overflow-y: auto;
    backdrop-filter: blur(15px);
    font-size: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.info-panel.active {
    transform: translateX(0);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
}

.info-panel h2 {
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b35, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.info-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 107, 53, 0.3);
}

.fire-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: status-pulse 2s infinite;
}

.status-text {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

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

#infoPanelContent {
    font-size: 15px;
    line-height: 1.6;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(255, 107, 53, 0.5);
}

.info-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    color: white;
    font-size: 15px;
    font-weight: 500;
}

.info-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-btn {
    background: linear-gradient(45deg, rgba(255, 107, 53, 0.8), rgba(255, 149, 0, 0.8));
    border: 1px solid rgba(255, 107, 53, 0.5);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn:hover {
    background: linear-gradient(45deg, #ff6b35, #ff9500);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

/* Improved Empty State */
.empty-state {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 998;
}

.empty-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(40, 40, 40, 0.95));
    padding: 48px;
    border-radius: 16px;
    color: white;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    min-width: 400px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: gentle-pulse 3s infinite;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.empty-content h2 {
    margin-bottom: 16px;
    font-size: 28px;
    background: linear-gradient(45deg, #ff6b35, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-content p {
    margin-bottom: 28px;
    opacity: 0.9;
    font-size: 16px;
    line-height: 1.5;
}

.get-data-btn {
    background: linear-gradient(45deg, #ff6b35, #ff9500);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.get-data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

/* Error Banner */
.error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #d32f2f;
    color: white;
    padding: 15px 20px;
    text-align: center;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.error-banner button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.error-banner button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Improved Guidance Panel */
.guidance-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(50, 50, 50, 0.95));
    border-radius: 16px;
    padding: 32px;
    color: white;
    z-index: 1002;
    min-width: 420px;
    max-width: 480px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.welcome-header {
    text-align: center;
    margin-bottom: 24px;
}

.welcome-header h3 {
    font-size: 28px;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #ff6b35, #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-header p {
    font-size: 16px;
    opacity: 0.85;
    margin: 0;
}

.how-to-use {
    margin-bottom: 24px;
}

.how-to-use h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #ff9500;
}

.simple-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #ff6b35;
}

.step-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 32px;
    text-align: center;
}

.step-item span:last-child {
    font-size: 15px;
    line-height: 1.4;
}

.guidance-region {
    margin-bottom: 28px;
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.guidance-region label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
}

.guidance-region select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 15px;
    min-width: 180px;
    cursor: pointer;
}

.guidance-region select:focus {
    outline: none;
    border-color: #ff6b35;
}

.close-guidance {
    background: linear-gradient(45deg, #ff6b35, #ff9500);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-guidance:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.loading-content p {
    opacity: 0.8;
    font-size: 14px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Progress Bar */
.progress-container {
    margin-top: 25px;
    width: 100%;
    max-width: 400px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa726);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

#progressPercent {
    font-weight: 600;
    color: #ffa726;
}

#progressStep {
    font-style: italic;
    opacity: 0.8;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Loading spinner animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Simple Fire Markers */
.fire-marker {
    cursor: pointer;
    font-size: 20px;
    text-align: center;
    line-height: 1;
    transition: all 0.3s ease;
    user-select: none;
}

/* Intensity levels with different sizes and glows */
.fire-high {
    font-size: 22px;
    filter: drop-shadow(0 0 6px rgba(255, 61, 0, 0.8));
}

.fire-medium {
    font-size: 20px;
    filter: drop-shadow(0 0 4px rgba(255, 152, 0, 0.7));
}

.fire-low {
    font-size: 18px;
    filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.6));
}

/* Improved prediction rings */
.prediction-ring {
    animation: ring-pulse 3s infinite;
}

@keyframes ring-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.1; }
    100% { opacity: 0.3; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .guidance-panel {
        min-width: 320px;
        margin: 20px;
        padding: 20px;
    }
    
    .header {
        flex-direction: column;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .status {
        font-size: 12px;
    }
} 