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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a0a0a;
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2a1515 0%, #3d1f1f 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.logo h1 {
    font-size: 1.8rem;
    color: #ff6b6b;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #d6b8b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #ff6b6b;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: linear-gradient(180deg, #2a1515 0%, #1a0a0a 100%);
    border-right: 1px solid #4d2626;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar.collapsed {
    transform: translateX(-320px);
}

.sidebar-header {
    padding: 1.5rem;
    background: #3d1f1f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #5d2f2f;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    color: #ff6b6b;
}

.toggle-btn {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: #ff6b6b;
    color: #1a0a0a;
}

.sidebar-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

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

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #d6b8b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.control-input {
    width: 100%;
    padding: 0.7rem;
    background: #1a0a0a;
    border: 1px solid #4d2626;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.control-input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.control-input option {
    background: #1a0a0a;
    color: #e0e0e0;
}

.apply-btn,
.reset-btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0.8rem;
}

.apply-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #cc4444 100%);
    color: #1a0a0a;
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.reset-btn {
    background: transparent;
    color: #d6b8b8;
    border: 1px solid #4d2626;
}

.reset-btn:hover {
    background: #4d2626;
    color: #e0e0e0;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    background: #1a0a0a;
}

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

.map-info {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(42, 21, 21, 0.95);
    padding: 0.7rem 1.2rem;
    border-radius: 6px;
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #d6b8b8;
    border: 1px solid #4d2626;
    z-index: 500;
}

.map-info span {
    font-family: 'Courier New', monospace;
}

/* Footer */
.footer {
    background: #2a1515;
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid #4d2626;
    font-size: 0.85rem;
    color: #a37a7a;
}

/* Scrollbar Styling */
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #1a0a0a;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #4d2626;
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #5d2f2f;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 0.8rem 1rem;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .sidebar {
        position: absolute;
        height: calc(100vh - 60px);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .map-info {
        flex-direction: column;
        gap: 0.3rem;
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }
}

/* Leaflet Custom Styles */
.leaflet-container {
    background: #1a0a0a;
}

.leaflet-control-zoom {
    border: 1px solid #4d2626 !important;
    background: #2a1515 !important;
}

.leaflet-control-zoom a {
    background-color: #2a1515 !important;
    color: #ff6b6b !important;
    border-bottom: 1px solid #4d2626 !important;
}

.leaflet-control-zoom a:hover {
    background-color: #3d1f1f !important;
}

/* SAR Panel (Right Slide) */
.sar-panel {
    position: fixed;
    right: -450px;
    top: 0;
    width: 450px;
    height: 100vh;
    background: linear-gradient(180deg, #2a1515 0%, #1a0a0a 100%);
    border-left: 1px solid #4d2626;
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
    z-index: 1001;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.sar-panel.open {
    right: 0;
}

.sar-panel-header {
    padding: 1.5rem;
    background: #3d1f1f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #5d2f2f;
}

.sar-panel-header h2 {
    font-size: 1.4rem;
    color: #ff6b6b;
}

.close-btn {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #ff6b6b;
    color: #1a0a0a;
}

.sar-panel-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.location-info {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(61, 31, 31, 0.5);
    border-radius: 8px;
    border: 1px solid #4d2626;
}

.location-info h3 {
    color: #ff6b6b;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.location-info p {
    color: #d6b8b8;
    font-size: 0.9rem;
}

.sar-images-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sar-image-item {
    background: rgba(26, 10, 10, 0.8);
    border: 1px solid #4d2626;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.3s;
}

.sar-image-item:hover {
    transform: translateY(-2px);
    border-color: #ff6b6b;
}

.sar-preview {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #4d2626;
}

.sar-image-info {
    margin-bottom: 1rem;
}

.sar-image-info p {
    color: #d6b8b8;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.sar-image-info strong {
    color: #ff6b6b;
}

.download-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #cc4444 100%);
    color: #1a0a0a;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Scrollbar for SAR Panel */
.sar-panel-content::-webkit-scrollbar {
    width: 8px;
}

.sar-panel-content::-webkit-scrollbar-track {
    background: #1a0a0a;
}

.sar-panel-content::-webkit-scrollbar-thumb {
    background: #4d2626;
    border-radius: 4px;
}

.sar-panel-content::-webkit-scrollbar-thumb:hover {
    background: #5d2f2f;
}
