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

:root {
    --panel-bg: #1a1a2e;
    --panel-border: #16213e;
    --accent: #e94560;
    --accent-hover: #d63851;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0a0;
    --dark-bg: #f0f0f5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Map */
#map {
    height: 100vh;
    width: 100vw;
    background: var(--dark-bg);
}

.leaflet-container {
    background: var(--dark-bg);
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    background: var(--panel-bg);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-tip {
    background: var(--panel-bg);
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.leaflet-popup-content .popup-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaflet-popup-content .popup-text {
    margin: 8px 0;
    font-size: 14px;
}

.leaflet-popup-content .popup-meta {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Marker clusters */
.marker-cluster {
    background: rgba(233, 69, 96, 0.3) !important;
}

.marker-cluster div {
    background: rgba(233, 69, 96, 0.8) !important;
    color: white !important;
    font-weight: 600;
    font-size: 13px;
}

/* Header */
.header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    pointer-events: none;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.header p {
    font-size: 13px;
    color: var(--text-secondary);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Filter button */
.filter-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: #222244;
}

/* Filter panel */
.filter-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 1000;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 16px;
    width: 240px;
    max-height: 70vh;
    overflow-y: auto;
}

.filter-panel h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.filter-panel .cat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
    margin-bottom: 2px;
}

.filter-panel .cat-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-panel .cat-btn.active {
    background: var(--accent);
    color: white;
}

.filter-panel .cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Submit button */
.submit-btn {
    position: absolute;
    bottom: 80px;
    right: 24px;
    z-index: 1000;
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(233, 69, 96, 0.5);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

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

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group textarea,
.form-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group select option {
    background: var(--panel-bg);
    color: var(--text-primary);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.location-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.location-label {
    font-size: 13px;
    color: #4ade80;
    margin-top: 4px;
}

.form-error {
    color: #f87171;
    font-size: 13px;
    margin-bottom: 12px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--panel-border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Trending panel */
.trending-panel {
    position: absolute;
    bottom: 24px;
    left: 70px;
    z-index: 1000;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 16px;
    width: 220px;
}

.trending-panel h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item .city-name {
    color: var(--text-primary);
}

.trending-item .complaint-count {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }

    .trending-panel {
        display: none;
    }

    .submit-btn {
        bottom: 16px;
        right: 16px;
        padding: 12px 18px;
        font-size: 14px;
    }

    .filter-panel {
        right: 10px;
        width: 200px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}
