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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    overflow: hidden;
}

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#header h1 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

#stats {
    color: #fff;
    font-size: 14px;
}

#stats span {
    font-weight: 600;
    color: #00d4aa;
    margin-right: 4px;
}

#stats span:last-of-type {
    margin-left: 16px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sync {
    background: #00d4aa;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-sync:hover {
    background: #00f5c4;
    transform: translateY(-1px);
}

.btn-sync.syncing {
    opacity: 0.7;
    pointer-events: none;
}

.btn-sync.syncing .sync-icon {
    animation: spin 1s linear infinite;
}

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

.btn-primary {
    background: #00d4aa;
    color: #1a1a2e;
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.btn-primary:hover:not(:disabled) {
    background: #00f5c4;
}

.btn-primary:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.btn-icon {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.btn-icon:hover {
    color: #fff;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 170px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #00d4aa;
    color: #1a1a2e;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
    z-index: 1000;
    transition: all 0.2s;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 170, 0.5);
}

.fab.hidden {
    display: none;
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 60px;
    right: -360px;
    width: 360px;
    height: calc(100vh - 60px);
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

#sidebar.open {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: #fff;
    font-size: 18px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.form-group label {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="month"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #00d4aa;
}

/* Suggestions dropdown */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a4e;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

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

.suggestion-item:hover {
    background: rgba(0, 212, 170, 0.1);
}

.suggestion-item .city-name {
    font-weight: 500;
}

.suggestion-item .country-name {
    color: #888;
    font-size: 12px;
    margin-top: 2px;
}

/* City info */
.city-info {
    background: rgba(0, 212, 170, 0.1);
    border-radius: 8px;
    padding: 16px;
}

.city-info.hidden {
    display: none;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.info-row .label {
    color: #888;
}

.info-row span:last-child {
    color: #fff;
}

/* Drop zone */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #00d4aa;
    background: rgba(0, 212, 170, 0.05);
}

.drop-zone-text {
    color: #888;
}

.drop-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.drop-zone-text p {
    margin: 4px 0;
}

.drop-zone-text .small {
    font-size: 12px;
    color: #666;
}

/* Photo preview */
.photo-preview.hidden {
    display: none;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Photo Viewer - left side */
.photo-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 60%;
    bottom: 130px;
    background: #0a0a15;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-viewer-empty {
    color: #444;
    font-size: 16px;
    text-align: center;
}

.photo-viewer-empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.photo-viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.photo-viewer-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.photo-viewer-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease-out;
}

.photo-viewer-info {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.photo-viewer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-viewer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.photo-viewer-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.photo-viewer-date {
    color: #888;
    font-size: 12px;
}

.photo-viewer-counter {
    color: #aaa;
    font-size: 12px;
    min-width: 45px;
    text-align: right;
}

.photo-viewer-nav {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer-nav:hover:not([disabled]) {
    background: rgba(255, 255, 255, 0.25);
}

.photo-viewer-nav[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Autoplay button */
.autoplay-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(0, 212, 170, 0.5);
    border-radius: 6px;
    background: transparent;
    color: #00d4aa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autoplay-btn:hover {
    background: rgba(0, 212, 170, 0.2);
    border-color: #00d4aa;
}

.autoplay-btn.playing {
    background: rgba(0, 212, 170, 0.3);
    border-color: #00d4aa;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #00d4aa; }
    50% { border-color: rgba(0, 212, 170, 0.4); }
}

/* Map - right side */
#map {
    position: fixed;
    top: 0;
    left: 60%;
    right: 0;
    bottom: 130px;
}

.map-title {
    position: absolute;
    top: 12px;
    left: 15px;
    text-align: left;
    z-index: 10;
    pointer-events: none;
}

.map-title-main {
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.map-title-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
    max-width: calc(100vw - 50% - 30px);
    line-height: 1.5;
}

.map-title-flags {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
    max-width: calc(100vw - 50% - 30px);
    pointer-events: auto;
}

.map-title-flags img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.map-title-flags img:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* D3 SVG Map Styling */
#map svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#map svg:active {
    cursor: grabbing;
}

/* Country paths */
.country {
    fill: #2a2a4e;
    stroke: #3a3a5e;
    stroke-width: 0.5px;
    transition: fill 0.2s ease;
}

.country:hover {
    fill: #3a3a6e;
}

.country.visited {
    fill: rgba(0, 212, 170, 0.4);
}

.country.visited:hover {
    fill: rgba(0, 212, 170, 0.55);
}

/* City markers */
.city-marker {
    fill: #00d4aa;
    stroke: #fff;
    stroke-width: 2px;
    cursor: pointer;
    transition: fill 0.3s, stroke 0.3s;
}

.city-marker.active-marker {
    fill: #ff6b6b;
    stroke: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.8));
}

/* Ocean background */
.ocean {
    fill: #1a1a2e;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox.hidden {
    display: none;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-header {
    text-align: center;
    margin-bottom: 16px;
    color: #fff;
}

.lightbox-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lightbox-header span {
    font-size: 14px;
    opacity: 0.7;
}

.lightbox-gallery {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lightbox-nav {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-image-container {
    max-width: 70vw;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    margin-top: 16px;
    color: #fff;
    opacity: 0.7;
    font-size: 14px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 170px;
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a4e;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.toast.hidden {
    display: none;
}

.toast.success {
    border-left: 4px solid #00d4aa;
}

.toast.error {
    border-left: 4px solid #ff4757;
}

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

/* Hover Preview Box */
.hover-preview {
    position: absolute;
    background: rgba(26, 26, 46, 0.98);
    border-radius: 12px;
    padding: 12px;
    z-index: 1500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.hover-preview.visible {
    opacity: 1;
}

.hover-preview.pinned {
    pointer-events: auto;
}

.hover-preview-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hover-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.hover-preview-grid img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.hover-preview-more {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
}

/* Blurred +N overlay for hover preview */
.hover-preview-more-blur {
    width: 60px;
    height: 60px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.hover-preview-more-blur img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transform: scale(1.1);
}

.hover-preview-more-blur .plus-n-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Multi-city hover preview */
.hover-multi-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hover-city-block {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.hover-city-block:last-child {
    border-bottom: none;
}

.hover-preview.pinned .hover-city-block {
    cursor: pointer;
}

.hover-preview.pinned .hover-city-block:hover {
    background: rgba(0, 212, 170, 0.15);
}

.hover-preview-header {
    color: #00d4aa;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.hover-city-title {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.hover-city-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.hover-city-grid img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
}

.hover-city-grid .hover-preview-more-blur {
    width: 50px;
    height: 50px;
}

/* iPhone-style Gallery */
.gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.gallery.hidden {
    display: none;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.8);
}

.gallery-header h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.gallery-header span {
    color: #888;
    font-size: 14px;
}

.gallery-close {
    background: none;
    border: none;
    color: #00d4aa;
    font-size: 16px;
    cursor: pointer;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.8);
}

.gallery-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    border: 2px solid transparent;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: #00d4aa;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient fade effect on edge thumbnails to indicate more photos */
.gallery-thumb.thumb-fade-1 {
    opacity: 0.35 !important;
    transform: scale(0.92);
}

.gallery-thumb.thumb-fade-2 {
    opacity: 0.15 !important;
    transform: scale(0.85);
}

.gallery-thumb.thumb-fade-1.active,
.gallery-thumb.thumb-fade-2.active {
    opacity: 1 !important;
    transform: scale(1);
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.6);
}

.btn-photo-action {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-photo-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-photo-delete {
    background: rgba(220, 53, 69, 0.3);
}

.btn-photo-delete:hover {
    background: rgba(220, 53, 69, 0.5);
}

/* Timeline - horizontal bottom bar */
.timeline {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 130px;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.timeline::-webkit-scrollbar {
    height: 8px;
}

.timeline::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.timeline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.timeline-entry {
    flex-shrink: 0;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-entry:hover {
    background: rgba(255, 255, 255, 0.08);
}

.timeline-entry.active {
    background: rgba(0, 212, 170, 0.15);
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.timeline-entry-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
}

.timeline-flag {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.timeline-entry-city {
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.timeline-entry-date {
    color: #666;
    font-size: 10px;
    white-space: nowrap;
}

.timeline-photos {
    display: flex;
    gap: 3px;
    align-items: center;
}

.timeline-photo {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    image-rendering: -webkit-optimize-contrast;
    will-change: transform;
}

.timeline-photo:hover img {
    transform: scale(1.08);
}

.timeline-photo.playing {
    box-shadow: 0 0 0 3px #00d4aa;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 3px #00d4aa, 0 0 10px rgba(0, 212, 170, 0.5);
    }
    50% {
        box-shadow: 0 0 0 3px #00d4aa, 0 0 20px rgba(0, 212, 170, 0.8);
    }
}

.timeline-photo-more {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4aa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.timeline-photo-more:hover {
    background: rgba(0, 212, 170, 0.2);
}

/* Blurred +N overlay for timeline */
.timeline-photo-more-blur {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.timeline-photo-more-blur img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    transform: scale(1.1);
}

.timeline-photo-more-blur .plus-n-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.timeline-photo-more-blur:hover .plus-n-overlay {
    background: rgba(0, 212, 170, 0.3);
}

/* Admin city list */
.city-list {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.city-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.city-list-header h3 {
    color: #fff;
    font-size: 14px;
}

.city-list-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.city-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.city-list-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.city-list-item-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
}

.city-list-item-text {
    color: #fff;
    font-size: 13px;
}

.city-list-item-date {
    color: #888;
    font-size: 11px;
}

.city-list-item-actions {
    display: flex;
    gap: 8px;
}

.city-list-item-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.city-list-item-actions button:hover {
    color: #fff;
}

.city-list-item-actions .delete-btn:hover {
    color: #ff4757;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #2a2a4e;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
}

.modal-title {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
}

.modal-body {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.modal-actions .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-actions .btn-danger {
    background: #ff4757;
    color: #fff;
}

.modal-actions .btn-confirm {
    background: #00d4aa;
    color: #1a1a2e;
}

/* Zoom Controls */
.zoom-controls {
    position: fixed;
    bottom: 150px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 500;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.9);
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: rgba(0, 212, 170, 0.3);
    border-color: #00d4aa;
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Photo Viewer - top section */
    .photo-viewer {
        position: relative;
        width: 100%;
        height: 45vh;
        min-height: 280px;
        bottom: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .photo-viewer-main img {
        max-height: calc(45vh - 50px);
    }

    .photo-viewer-info {
        padding: 8px 12px;
    }

    .photo-viewer-title {
        font-size: 12px;
    }

    .photo-viewer-date {
        font-size: 11px;
    }

    .photo-viewer-nav {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .autoplay-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    /* Map - middle section */
    #map {
        position: relative;
        left: 0;
        width: 100%;
        height: 35vh;
        min-height: 200px;
        bottom: auto;
    }

    .map-title {
        top: 6px;
        left: 8px;
        right: 8px;
    }

    .map-title-main {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .map-title-sub {
        display: none;
    }

    .map-title-flags {
        margin-top: 4px;
        gap: 3px;
        max-width: 100%;
    }

    .map-title-flags img {
        width: 14px;
        height: 10px;
    }

    /* Zoom Controls - hide on mobile, use pinch to zoom */
    .zoom-controls {
        display: none;
    }

    /* Timeline - bottom section */
    .timeline {
        position: relative;
        height: auto;
        min-height: 120px;
        padding: 6px 8px;
    }

    .timeline-entry {
        padding: 4px 6px;
    }

    .timeline-entry-header {
        gap: 4px;
    }

    .timeline-flag {
        width: 14px;
        height: 10px;
    }

    .timeline-entry-city {
        font-size: 9px;
    }

    .timeline-entry-date {
        font-size: 9px;
    }

    .timeline-photo {
        width: 70px;
        height: 70px;
    }

    .timeline-photo-more,
    .timeline-photo-more-blur {
        width: 70px;
        height: 70px;
    }

    /* Hover Preview - adjust for mobile */
    .hover-preview {
        max-width: 90vw;
        left: 5vw !important;
        right: 5vw !important;
    }

    .hover-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hover-preview-grid img {
        width: 60px;
        height: 60px;
    }

    /* Gallery Modal */
    .gallery {
        padding: 10px;
    }

    .gallery-header h2 {
        font-size: 16px;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .gallery-thumbnails {
        height: 60px;
        gap: 6px;
        padding: 0 10px;
    }

    .gallery-thumb {
        width: 50px;
        height: 50px;
    }

    /* Photo viewer empty state */
    .photo-viewer-empty .icon {
        font-size: 40px;
    }

    .photo-viewer-empty div:last-child {
        font-size: 12px;
    }
}
