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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles for stacked, left-aligned layout */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    position: relative;
    margin-left: 350px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto 1rem auto;
    padding: 0 2rem;
    text-align: left;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.title i {
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* Remove header-flex styles */
.header-flex { display: none !important; }

/* Search Container */
.search-container {
    max-width: 700px;
    min-width: 250px;
    margin: 0 auto 1.5rem auto;
    padding: 0 2rem;
    display: block;
}

.search-box {
    max-width: 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 50px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    background: white;
    height: 3.5rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: #999;
    z-index: 2;
    font-size: 1.25rem;
}

.clear-search {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

@media (max-width: 900px) {
    .header-content, .search-container {
        max-width: 100%;
        min-width: 0;
        padding: 0 1rem;
    }
    .search-container {
        margin-bottom: 1rem;
    }
    .search-input {
        font-size: 1rem;
        height: 2.75rem;
        padding: 1rem 2.5rem 1rem 2rem;
    }
    .search-icon, .clear-search {
        font-size: 1rem;
        left: 1rem;
        right: 1rem;
    }
    .header {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
        left: 0;
        width: 100vw;
    }
    .stories-sidebar {
        width: 100vw;
        height: 40vh;
        position: fixed;
        left: 0;
        top: 0;
        border-right: none;
        border-top: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
        z-index: 2000;
        transform: translateY(0);
        border-radius: 0;
    }
    .map-style-selector {
        top: 13rem;
        right: 1rem;
    }
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 120px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 120px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    margin-left: 350px;
}

/* Map Container */
.map-container {
    flex: 1 1 0%;
    margin-left: 0;
    height: 100%;
    position: relative;
    border-radius: 0;
    overflow: visible;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* Map Style Selector */
.map-style-selector {
    position: absolute;
    top: 14rem;
    right: 1.5rem;
    z-index: 3500;
    display: flex;
    align-items: center;
    pointer-events: auto;
    margin: 0;
}

.map-style-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #333;
}

.map-style-btn:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.map-style-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    min-width: 180px;
    display: none;
    overflow: hidden;
}

.map-style-menu.show {
    display: block;
}

.map-style-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.map-style-option:last-child {
    border-bottom: none;
}

.map-style-option:hover {
    background-color: #f8f9fa;
}

.map-style-option i {
    color: #e74c3c;
    font-size: 0.8rem;
    min-width: 12px;
}

/* Add Story Button */
.add-story-btn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-story-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
}

/* Stories Panel */
.stories-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    transition: transform 0.3s ease;
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0,0,0,0.04);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    display: flex;
    flex-direction: column;
}

.stories-sidebar .stories-list {
    flex: 1 1 auto;
    overflow-y: auto;
    height: 100%;
    padding: 1rem;
}

.panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    color: #333;
    font-weight: 600;
}

.close-panel {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-panel:hover {
    background: #f8f9fa;
    color: #666;
}

.story-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #e74c3c;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.story-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.story-preview {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

.story-song-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1DB954;
}

.story-song-album-art {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.story-song-info {
    flex: 1;
    min-width: 0;
}

.story-song-title {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-song-artist {
    color: #666;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.story-location, .story-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #333;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f8f9fa;
    color: #666;
}

/* Form Styles */
.story-form {
    padding: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group label[for="storyAnonymous"] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Location Search Styles */
.location-search-container {
    position: relative;
}

.location-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
}

.location-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.location-result-item:hover {
    background-color: #f8f9fa;
}

.location-result-item.selected {
    background-color: #e74c3c;
    color: white;
}

.location-result-icon {
    color: #999;
    font-size: 0.9rem;
    min-width: 16px;
}

.location-result-text {
    flex: 1;
    font-size: 0.9rem;
}

.location-result-type {
    font-size: 0.8rem;
    color: #999;
    background: #f8f9fa;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

.selected-location {
    background: #f8f9fa;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
}

.selected-location i {
    color: #e74c3c;
}

.change-location-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.change-location-btn:hover {
    background: #e9ecef;
    color: #666;
}

.location-loading {
    padding: 0.75rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.location-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Location Preview */
.location-preview {
    margin-top: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.location-preview-header {
    background: #e74c3c;
    color: white;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.location-preview-map {
    height: 150px;
    width: 100%;
    background: #f8f9fa;
    position: relative;
}

.location-preview-info {
    background: #f8f9fa;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #e1e5e9;
}

.location-preview-info i {
    color: #e74c3c;
}

.coordinates-display {
    margin-left: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: #666;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Spotify Song Styles */
.spotify-search-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.spotify-search-btn {
    background: #1DB954;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.spotify-search-btn:hover {
    background: #1ed760;
    transform: translateY(-1px);
}

.spotify-search-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.spotify-results {
    display: block !important;
    position: relative;
    z-index: 2000;
    background: white;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
}

.song-result-item {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.song-result-item:hover {
    background-color: #f8f9fa;
}

.song-result-album-art {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}

.song-result-info {
    flex: 1;
}

.song-result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.song-result-artist {
    font-size: 0.9rem;
    color: #666;
}

.song-result-album {
    font-size: 0.8rem;
    color: #999;
}

.selected-song {
    background: #f8f9fa;
    border: 2px solid #1DB954;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.song-album-art {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.song-details {
    flex: 1;
}

.song-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.song-artist {
    font-size: 0.9rem;
    color: #666;
}

.remove-song-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-song-btn:hover {
    background: #e9ecef;
    color: #666;
}

.spotify-loading {
    padding: 1rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.spotify-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.spotify-help-text {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spotify-help-text i {
    color: #1DB954;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Story Detail Modal */
.story-detail-content {
    max-width: 700px;
}

.story-detail-body {
    padding: 2rem;
}

.story-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.location-badge, .date-badge {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.story-content {
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
}

/* Story Song Display */
.story-song {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.story-song h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.song-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.song-display-album-art {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.song-display-info {
    flex: 1;
}

.song-display-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.song-display-artist {
    color: #666;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.spotify-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1DB954;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.spotify-link:hover {
    background: #1ed760;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}

/* Custom Map Markers */
.custom-marker {
    background: #e74c3c;
    border: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Draggable marker styles */
.custom-marker.draggable {
    cursor: grab;
}

.custom-marker.draggable:active {
    cursor: grabbing;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .stories-sidebar {
        width: 100vw;
        height: 40vh;
        position: fixed;
        left: 0;
        top: 0;
        border-right: none;
        border-top: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
        z-index: 2000;
        transform: translateY(0);
        border-radius: 0;
    }
    
    .main-content {
        flex-direction: column;
        top: 120px;
        height: calc(100vh - 120px);
    }
    
    .map-container {
        margin-left: 0;
        height: 60vh;
        border-radius: 0;
    }
    
    .add-story-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .add-story-btn span {
        display: none;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    #map {
        height: 60vh;
        border-radius: 0 !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #666;
}

.empty-state p {
    font-size: 0.9rem;
}

/* Fix header at the top */
header, .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 2001;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Header flex row: title left, explanation/search right, more left-aligned */
.header-flex-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: 1100px;
    margin: 0 0 0 30px;
    padding: 0 1rem;
    gap: 2.5rem;
}

.header-explain-search {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 700px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
    min-width: 220px;
    flex: 0 0 auto;
    padding-left: 0.5rem;
}

.subtitle, .usage-caption {
    text-align: left;
    margin: 0;
}

.search-container {
    width: 100%;
    max-width: 700px;
    min-width: 250px;
    margin-top: 1rem;
    padding: 0;
}

/* Main content and map account for sidebar */
.main-content {
    display: flex;
    flex-direction: row;
    position: absolute;
    top: 120px;
    left: 350px;
    width: calc(100vw - 350px);
    height: calc(100vh - 120px);
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.map-container {
    flex: 1 1 0%;
    height: 100%;
    position: relative;
    border-radius: 0;
    overflow: visible;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    margin: 0 !important;
}

@media (max-width: 900px) {
    .header-flex-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin: 0;
        padding: 0 1rem;
        max-width: 100%;
    }
    .header-explain-search {
        max-width: 100%;
    }
    .title {
        padding-left: 0;
    }
    .main-content {
        flex-direction: column;
        top: 120px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 120px);
    }
    .stories-sidebar {
        width: 100vw;
        height: 40vh;
        position: fixed;
        left: 0;
        top: 0;
        border-right: none;
        border-top: 1px solid rgba(0,0,0,0.1);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
        z-index: 2000;
        transform: translateY(0);
        border-radius: 0;
    }
    .map-container {
        margin-left: 0;
        height: 60vh;
        border-radius: 0;
    }
    #map {
        height: 60vh;
        border-radius: 0 !important;
    }
} 