body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #1a1a2e;
    color: #ffffff;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #16213e;
}

nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#map {
    height: calc(100vh - 70px);
    /* Adjust for header */
    width: 100%;
    z-index: 1;
}

button {
    background-color: #e94560;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a2e;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #e94560;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    color: #e94560;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

input,
select {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #16213e;
    background-color: #0f3460;
    color: #fff;
    font-size: 16px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #e94560;
}

button[type="submit"] {
    background-color: #e94560;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #c0354e;
}

#forgotPasswordLink:hover {
    color: #e94560;
    text-decoration: underline;
}

/* Report Modal - Black & White Theme */
.report-modal-content {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000;
}

.report-modal-title {
    color: #000000 !important;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.report-input,
.report-textarea,
.report-select,
.report-coords {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.report-textarea {
    resize: none;
    font-family: inherit;
}

.report-input:focus,
.report-textarea:focus,
.report-select:focus {
    border-color: #00344d !important;
    outline: none;
}

.report-coords {
    background: #f5f5f5 !important;
    cursor: not-allowed;
    font-size: 12px;
    color: #666 !important;
}

.report-submit-btn {
    width: 100%;
    padding: 12px;
    background: #00344d !important;
    color: #ffffff !important;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* Floating Report Button */
#reportBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e94560;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

#reportBtn:hover {
    background: #c0354e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 69, 96, 0.6);
}

#reportBtn.active {
    background: #ffd700;
    color: #000;
}

.report-submit-btn:hover {
    background: #00243d !important;
}

.image-upload-container {
    margin: 15px 0;
}

.image-label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.report-file-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    background: #ffffff;
    color: #000000;
    font-size: 14px;
}

.image-preview {
    display: none;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 150px;
}

#reportModal .close {
    color: #000000 !important;
}

#reportModal .close:hover {
    color: #e94560 !important;
}

#reportBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #e94560;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    /* Hidden by default, shown when logged in */
    transition: transform 0.2s;
}

#reportBtn:hover {
    transform: scale(1.05);
}

#reportBtn.active {
    background-color: #ffd700;
    /* Gold color to indicate 'Picking Mode' */
    color: #1a1a2e;
}

/* Custom Marker Colors */
.red-marker-icon {
    filter: hue-rotate(140deg) brightness(0.9);
}

/* ============================================
   MOBILE RESPONSIVE DESIGN
   ============================================ */

/* Hamburger Menu (Mobile Only) */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Bottom Sheet (Mobile Only) */
.mobile-bottom-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transform: translateY(calc(100% - 80px));
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow: hidden;
}

.mobile-bottom-sheet.expanded {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 10px auto;
    cursor: pointer;
}

.bottom-sheet-content {
    padding: 0 20px 20px;
    overflow-y: auto;
    max-height: calc(70vh - 40px);
    color: #1a1a2e;
}

.bottom-sheet-header {
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    color: #1a1a2e;
    font-weight: bold;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    padding: 60px 20px 20px;
}

.mobile-nav-overlay.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-overlay .nav-link,
.mobile-nav-overlay button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    text-align: center;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* ============================================
   TABLET (768px - 1200px)
   ============================================ */
@media (max-width: 1200px) {
    header {
        padding: 0.75rem;
    }

    nav {
        gap: 10px;
    }

    .nav-link {
        font-size: 13px;
        padding: 0.4rem 0.8rem;
    }

    button {
        padding: 0.4rem 0.8rem;
        font-size: 14px;
    }
}

/* ============================================
   MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {

    /* Reset body for mobile */
    body {
        font-size: 16px;
        /* Prevent iOS auto-zoom */
    }

    /* Mobile Header */
    header {
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    header h1 {
        font-size: 20px;
        margin: 0;
    }

    /* Hide desktop navigation */
    nav .nav-link {
        display: none;
    }

    nav button {
        display: none;
    }

    /* Show hamburger menu */
    .hamburger-menu {
        display: flex;
    }

    /* Full-screen map */
    #map {
        height: calc(100vh - 60px);
        width: 100%;
    }

    /* Hide footer on mobile */
    footer {
        display: none;
    }

    /* Touch-friendly buttons (minimum 44x44px) */
    button,
    .clickable,
    a.nav-link {
        min-width: 44px;
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Mobile Report Button */
    #reportBtn {
        bottom: 100px;
        /* Above bottom sheet */
        right: 20px;
        padding: 12px 20px;
        font-size: 16px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Show bottom sheet on mobile */
    .mobile-bottom-sheet {
        display: block;
    }

    /* Mobile Modals */
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 20px;
        max-width: none;
    }

    /* Mobile Forms */
    form input,
    form textarea,
    form select {
        font-size: 16px;
        /* Prevent iOS zoom */
        padding: 12px;
        min-height: 44px;
    }

    /* Report Modal - Mobile Optimized */
    #reportModal .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    #reportModal h2 {
        font-size: 20px;
    }

    .report-input,
    .report-textarea,
    .report-select {
        font-size: 16px !important;
        padding: 12px !important;
    }

    .report-submit-btn {
        min-height: 48px;
        font-size: 16px;
    }

    /* Image Preview - Mobile */
    #imagePreview {
        max-width: 100%;
        max-height: 200px;
    }

    /* Leaflet Popup - Mobile Optimized */
    .leaflet-popup-content-wrapper {
        max-width: 250px;
    }

    .leaflet-popup-content {
        font-size: 14px;
        line-height: 1.4;
    }

    /* Map Controls - Mobile */
    .leaflet-control-zoom {
        margin-right: 10px !important;
        margin-bottom: 100px !important;
        /* Above bottom sheet */
    }

    .leaflet-control-zoom a {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 20px !important;
    }

    /* Touch-friendly map markers */
    .leaflet-marker-icon {
        cursor: pointer;
    }
}

/* ============================================
   SMALL MOBILE (<480px)
   ============================================ */
@media (max-width: 480px) {
    header h1 {
        font-size: 18px;
    }

    #reportBtn {
        padding: 10px 16px;
        font-size: 14px;
        bottom: 90px;
        right: 15px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }

    .bottom-sheet-content {
        padding: 0 15px 15px;
    }
}

/* ============================================
   LANDSCAPE MODE (Mobile)
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    #map {
        height: calc(100vh - 50px);
    }

    .mobile-bottom-sheet {
        max-height: 50vh;
        transform: translateY(calc(100% - 60px));
    }

    #reportBtn {
        bottom: 70px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    header,
    footer,
    #reportBtn,
    .mobile-bottom-sheet,
    .hamburger-menu {
        display: none !important;
    }

    #map {
        height: 100vh;
    }
}