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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0b1a2e;
    color: #d4d9e4;
}

#app {
    max-width: 900px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #0f2238;
    padding: 12px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

header h1 {
    font-family: "Story Script", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
}

#status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

#status-text {
    color: #7a8ba6;
}

.badge {
    background: #e74c3c;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.badge.active {
    background: #27ae60;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#map {
    flex: 1;
    min-height: 300px;
    z-index: 1;
    position: relative;
}

/* Map control button (center on me) */
.map-control {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 35px;
    color: #333;
    font-weight: bold;
    transition: background 0.2s, box-shadow 0.2s;
}

.map-control:hover:not(:disabled) {
    background: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.map-control:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}



footer {
    padding: 8px 20px;
    background: #0f2238;
    text-align: center;
    font-size: 0.8rem;
    color: #4a5c73;
    border-top: 1px solid #152a40;
}

#coords {
    font-family: monospace;
}

/* Status panel (replaces tweet panel) */
.status-panel {
    display: none;
    align-items: center;
    gap: 8px;
    background: #0f2238;
    padding: 8px 12px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.status-panel.open {
    display: flex;
}

#status-input {
    width: 240px;
    padding: 10px 16px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 20px;
    color: #d4d9e4;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#status-input:focus {
    border-color: #4a90d9;
}

#status-input::placeholder {
    color: #4a5c73;
}

#status-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status text in popups */
.status-text {
    margin-top: 4px;
    color: #d4d9e4;
    line-height: 1.3;
    word-wrap: break-word;
}

.status-time {
    color: #4a5c73;
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Tweet bubble on map */
.tweet-bubble {
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 200px;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
}

.tweet-bubble .tweet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.tweet-bubble .tweet-user {
    font-weight: 600;
    color: #4a90d9;
}

.tweet-bubble .tweet-time {
    color: #4a5c73;
    font-size: 0.65rem;
}

.tweet-bubble .tweet-text {
    color: #d4d9e4;
    line-height: 1.3;
    word-wrap: break-word;
}

/* FAB container */
#fab-container {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 1001;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
}

/* Material Design FAB */
.fab {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #1a5276;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* transition: opacity 0.15s ease, transform 0.15s ease, background 0.2s, box-shadow 0.2s; */
}

.fab.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.fab:hover {
    background: #1f6b99;
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    width: 28px;
    height: 28px;
}

/* Tweet panel */
.tweet-panel {
    display: none;
    align-items: center;
    gap: 8px;
    background: #0f2238;
    padding: 8px 12px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.tweet-panel.open {
    display: flex;
    /* animation: slideUp 0.2s ease forwards; */
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#tweet-input {
    width: 240px;
    padding: 10px 16px;
    background: #152a40;
    border: 1px solid #1a3350;
    border-radius: 20px;
    color: #d4d9e4;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#tweet-input:focus {
    border-color: #4a90d9;
}

#tweet-input::placeholder {
    color: #4a5c73;
}

#tweet-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fab-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a5276;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* transition: background 0.2s, opacity 0.2s; */
    flex-shrink: 0;
}

.fab-send:hover:not(:disabled) {
    background: #1f6b99;
}

.fab-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* MarkerCluster dark theme */
.marker-cluster-small {
    background-color: rgba(21, 42, 64, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(26, 82, 118, 0.8);
    color: #d4d9e4;
}

.marker-cluster-medium {
    background-color: rgba(21, 42, 64, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(26, 82, 118, 0.8);
    color: #d4d9e4;
}

.marker-cluster-large {
    background-color: rgba(21, 42, 64, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(26, 82, 118, 0.8);
    color: #d4d9e4;
}

/* Leaflet overrides */
.leaflet-control-attribution {
    font-size: 10px !important;
}

.leaflet-container {
    background: #38435c;
}

@font-face {
    font-family: "Story Script";
    src: url("StoryScript-Regular.ttf");
}

.story-script-regular {
  font-family: "Story Script", sans-serif;
  font-weight: 400;
  font-style: normal;
}
