:root {
    /* Tokyo Night Theme (Default) */
    --bg-primary: #1a1b26;
    --bg-secondary: #16161e;
    --bg-tertiary: #24283b;
    --bg-accent: #32344a;
    --border-color: #414868;
    --text-primary: #a9b1d6;
    --text-secondary: #565f89;
    --accent-primary: #7aa2f7;
    --accent-secondary: #9ece6a;
    --accent-danger: #f7768e;
    --accent-warning: #e0af68;
    --accent-info: #7dcfff;
    --accent-purple: #bb9af7;
}

/* Theme Variants */
body.theme-gruvbox {
    --bg-primary: #282828;
    --bg-secondary: #1d2021;
    --bg-tertiary: #3c3836;
    --bg-accent: #504945;
    --border-color: #665c54;
    --text-primary: #ebdbb2;
    --text-secondary: #a89984;
    --accent-primary: #83a598;
    --accent-secondary: #b8bb26;
    --accent-danger: #fb4934;
    --accent-warning: #fabd2f;
    --accent-info: #8ec07c;
    --accent-purple: #d3869b;
}

body.theme-dracula {
    --bg-primary: #282a36;
    --bg-secondary: #21222c;
    --bg-tertiary: #44475a;
    --bg-accent: #6272a4;
    --border-color: #6272a4;
    --text-primary: #f8f8f2;
    --text-secondary: #6272a4;
    --accent-primary: #bd93f9;
    --accent-secondary: #50fa7b;
    --accent-danger: #ff5555;
    --accent-warning: #f1fa8c;
    --accent-info: #8be9fd;
    --accent-purple: #ff79c6;
}

body.theme-light {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-accent: #dee2e6;
    --border-color: #ced4da;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-primary: #0d6efd;
    --accent-secondary: #198754;
    --accent-danger: #dc3545;
    --accent-warning: #fd7e14;
    --accent-info: #0dcaf0;
    --accent-purple: #6f42c1;
}

body.theme-sunset {
    --bg-primary: #2d1b14;
    --bg-secondary: #1f0f0a;
    --bg-tertiary: #4a2c1d;
    --bg-accent: #6b3e2a;
    --border-color: #8b4513;
    --text-primary: #ffd4a3;
    --text-secondary: #cd853f;
    --accent-primary: #ff6b35;
    --accent-secondary: #f7931e;
    --accent-danger: #ff4757;
    --accent-warning: #ffa502;
    --accent-info: #ff7675;
    --accent-purple: #e17055;
}

body.theme-ocean {
    --bg-primary: #0c1821;
    --bg-secondary: #1e3a5f;
    --bg-tertiary: #2e5984;
    --bg-accent: #4e7ba7;
    --border-color: #6fa8dc;
    --text-primary: #e1f5fe;
    --text-secondary: #81d4fa;
    --accent-primary: #29b6f6;
    --accent-secondary: #26a69a;
    --accent-danger: #ef5350;
    --accent-warning: #ffca28;
    --accent-info: #42a5f5;
    --accent-purple: #ab47bc;
}

body.theme-forest {
    --bg-primary: #1a2f1a;
    --bg-secondary: #0d1f0d;
    --bg-tertiary: #2d4a2d;
    --bg-accent: #3d5a3d;
    --border-color: #4d6a4d;
    --text-primary: #e8f5e8;
    --text-secondary: #a4c2a4;
    --accent-primary: #4caf50;
    --accent-secondary: #66bb6a;
    --accent-danger: #e53935;
    --accent-warning: #ffa726;
    --accent-info: #26c6da;
    --accent-purple: #9c27b0;
}

/* Global Loading Indicator */
.global-loading-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--accent-warning);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.offline-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.offline-icon {
    font-size: 1rem;
}

.offline-text {
    font-size: 0.875rem;
}

/* Button Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
    opacity: 0;
}

/* Enhanced Error States */
.input-error {
    border-color: var(--accent-danger) !important;
    box-shadow: 0 0 0 2px rgba(247, 118, 142, 0.2) !important;
}

.error-message {
    color: var(--accent-danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message::before {
    content: '⚠️';
    font-size: 0.875rem;
}

/* Success States */
.input-success {
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 0 2px rgba(158, 206, 106, 0.2) !important;
}

.success-message {
    color: var(--accent-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message::before {
    content: '✅';
    font-size: 0.875rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
}

.main-content {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 320px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
}


.add-btn {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.add-btn:hover {
    background: var(--accent-secondary);
    opacity: 0.8;
    transform: translateY(-1px);
}

.add-btn.glow-animation {
    animation: glowPulse 0.8s ease-in-out;
}

.add-btn.glow-animation::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #7aa2f7, #9ece6a, #f7768e, #bb9af7, #7aa2f7);
    background-size: 400%;
    border-radius: 8px;
    z-index: -1;
    animation: borderGlow 1.5s linear infinite;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px rgba(154, 206, 106, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(154, 206, 106, 0.8), 0 0 30px rgba(122, 162, 247, 0.4);
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        box-shadow: 0 0 5px rgba(154, 206, 106, 0.5);
        transform: translateY(-1px);
    }
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.search-container {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.search-container input::placeholder {
    color: var(--text-secondary);
}

.search-container input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

.add-btn-icon {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.add-btn-icon:hover {
    background: var(--accent-secondary);
    opacity: 0.8;
    transform: translateY(-1px) scale(1.05);
}

.add-btn-icon.glow-animation {
    animation: glowPulse 0.8s ease-in-out;
}

.add-btn-icon.glow-animation::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #7aa2f7, #9ece6a, #f7768e, #bb9af7, #7aa2f7);
    background-size: 400%;
    border-radius: 8px;
    z-index: -1;
    animation: borderGlow 1.5s linear infinite;
}

.country-list {
    list-style: none;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.country-content {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
}

.country-item:hover {
    background: var(--bg-accent);
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.country-item.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateX(4px);
    border-color: var(--accent-primary);
}

.country-flag {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.country-name {
    font-weight: 500;
}

.country-delete-btn {
    background: transparent;
    border: none;
    color: var(--accent-danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0.6;
}

.country-delete-btn:hover {
    opacity: 1;
    background: var(--accent-danger);
    color: var(--bg-primary);
    transform: scale(1.1);
}

.no-countries {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.content-area {
    flex: 1;
    padding: 2rem;
    background: var(--bg-primary);
    position: relative;
}

/* Save Status Styles */
.save-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.save-btn {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 600;
}

.save-btn:hover {
    transform: translateY(-1px) scale(1.05);
}

.save-btn.saved {
    background: var(--text-secondary);
    cursor: default;
}

.save-btn.saved:hover {
    transform: none;
}

.save-btn.unsaved {
    background: var(--accent-danger);
    animation: pulse 2s infinite;
}

.save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(247, 118, 142, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(247, 118, 142, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(247, 118, 142, 0);
    }
}

.save-status-text {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.save-status-text.saved {
    color: var(--accent-secondary);
}

.save-status-text.unsaved {
    color: var(--accent-danger);
}

.save-status-text.saving {
    color: var(--accent-info);
    animation: savingPulse 1s ease-in-out infinite;
}

@keyframes savingPulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.7;
    }
}

.welcome-message {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.country-details {
    max-width: none;
}

.country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.country-header h2 {
    font-size: 2rem;
    color: var(--accent-primary);
}

.delete-btn {
    background: var(--accent-danger);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: var(--accent-danger);
    opacity: 0.8;
    transform: translateY(-1px);
}

.notes-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.notes-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.format-btn {
    background: var(--bg-accent);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

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

.format-btn:active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.notes-editor {
    min-height: 300px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1.6;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.notes-editor:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.1);
}

.notes-editor[contenteditable]:empty::before {
    content: attr(placeholder);
    color: var(--text-secondary);
    font-style: italic;
}

/* Photo Gallery Styles */
.photos-section {
    margin-top: 2rem;
}

.photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.photos-header h3 {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin: 0;
}

.photos-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.paste-hint {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.paste-icon {
    font-size: 0.9rem;
}

.add-photos-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.add-photos-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.add-photos-btn .btn-icon {
    font-size: 1rem;
}

.photos-gallery {
    min-height: 120px;
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
}

.photos-gallery.paste-active {
    border-color: var(--accent-primary);
    background: rgba(122, 162, 247, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(122, 162, 247, 0.3);
}

.photos-gallery.paste-active::after {
    content: '📋 Pasting image...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--accent-primary);
    z-index: 10;
    animation: pasteIndicator 0.8s ease-out;
}

@keyframes pasteIndicator {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

.photos-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100px;
    color: var(--text-secondary);
    text-align: center;
}

.photos-empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.photos-empty-state p {
    margin: 0.25rem 0;
}

.photos-empty-state .empty-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.photo-thumbnail {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--border-color);
}

.photo-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-thumbnail:hover .photo-overlay {
    opacity: 1;
}

/* Show overlay on touch devices for better mobile experience */
@media (hover: none) and (pointer: coarse) {
    .photo-overlay {
        opacity: 0.8;
    }
}

/* Cities Section Styles */
.cities-section {
    margin-top: 2rem;
}

.cities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cities-header h3 {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin: 0;
}

.cities-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.auto-populate-btn, .add-city-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-accent);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.auto-populate-btn:hover, .add-city-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(122, 162, 247, 0.3);
}

.cities-table {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.cities-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.cities-empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.cities-empty-state p {
    margin: 0.25rem 0;
}

.cities-empty-state .empty-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.city-item {
    border-bottom: 1px solid var(--border-color);
}

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

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: background-color 0.2s;
}

.city-header:hover {
    background: var(--bg-accent);
}

.city-header.expanded {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.city-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.city-name {
    font-weight: 600;
    font-size: 1rem;
}

.city-population {
    font-size: 0.85rem;
    opacity: 0.8;
    color: var(--text-secondary);
}

.city-header.expanded .city-population {
    color: var(--bg-secondary);
}

.city-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expand-arrow {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.city-header.expanded .expand-arrow {
    transform: rotate(180deg);
}

.remove-city-btn {
    background: transparent;
    border: none;
    color: var(--accent-danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-city-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

.city-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.city-content.expanded {
    max-height: 500px;
    padding: 1rem;
}

.city-notes-section {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 1rem;
}

.city-notes-header {
    margin-bottom: 0.75rem;
}

.city-notes-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.city-notes-editor {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.5;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}

.city-notes-editor:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.1);
}

.city-notes-editor::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

/* Roadtrip Mode Styles */
.modal-mode-toggle {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
}

.mode-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mode-switch input[type="checkbox"] {
    position: relative;
    width: 50px;
    height: 24px;
    -webkit-appearance: none;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-switch input[type="checkbox"]:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.mode-switch input[type="checkbox"]:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s;
    transform: translateX(0);
}

.mode-switch input[type="checkbox"]:checked:before {
    transform: translateX(22px);
}

.mode-label {
    font-weight: 500;
    white-space: nowrap;
}

.mode-section {
    transition: opacity 0.3s ease-in-out;
}

/* Roadtrip Multi-Select Styles */
.roadtrip-countries-selector {
    margin-top: 1rem;
}

.selected-countries {
    min-height: 60px;
    max-height: 150px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--bg-secondary);
    overflow-y: auto;
}

.selected-countries-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.selection-hint {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

.selected-country-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 0.3rem 0.6rem;
    border-radius: 14px;
    font-size: 0.8rem;
    animation: chipSlideIn 0.3s ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.selected-country-chip .chip-flag {
    font-size: 0.9rem;
}

.selected-country-chip .chip-name {
    font-weight: 500;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-country-chip .remove-country {
    background: none;
    border: none;
    color: var(--bg-primary);
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: 0.2rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.selected-country-chip .remove-country:hover {
    opacity: 1;
}

@keyframes chipSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.roadtrip-flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    background: var(--bg-secondary);
}

.roadtrip-flag-option {
    width: 45px;
    height: 45px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--bg-tertiary);
}

.roadtrip-flag-option:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.roadtrip-flag-option.selected {
    border-color: var(--accent-primary);
    background: rgba(122, 162, 247, 0.1);
}

.roadtrip-flag-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

/* Roadtrip Details View */
.roadtrip-details {
    padding: 2rem;
    max-width: none;
}

.roadtrip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.roadtrip-header h2 {
    color: var(--accent-primary);
    margin: 0;
}

.roadtrip-actions {
    display: flex;
    gap: 1rem;
}

.map-toggle-btn {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.map-toggle-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-1px);
}

.roadtrip-countries-overview {
    margin-bottom: 2rem;
}

.roadtrip-countries-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.roadtrip-country-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.roadtrip-country-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.roadtrip-country-flag {
    font-size: 1.2rem;
}

.roadtrip-country-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Map Styles */
.roadtrip-map-container {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.map-header {
    margin-bottom: 1rem;
}

.map-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--accent-primary);
}

.map-instructions {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.roadtrip-map {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.map-pins-list {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.map-pins-list h4 {
    margin: 0 0 1rem 0;
    color: var(--accent-primary);
}

.pins-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.no-pins-message {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
    text-align: center;
}

.pin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.pin-info {
    display: flex;
    flex-direction: column;
}

.pin-name {
    font-weight: 500;
    color: var(--text-primary);
}

.pin-coordinates {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pin-actions {
    display: flex;
    gap: 0.25rem;
}

.pin-action-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.pin-action-btn:hover {
    background: var(--bg-secondary);
}

.roadtrip-notes-section,
.roadtrip-photos-section {
    margin-bottom: 2rem;
}

/* Multi-country notice */
.multi-country-notice {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-icon {
    font-size: 1.1rem;
    color: #ffc107;
    flex-shrink: 0;
}

.notice-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

.notice-dismiss {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 3px;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice-dismiss:hover {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    transform: scale(1.1);
}

.multi-country-notice.notice-dismissing {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-out;
}

/* Settings button styles */
.settings-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.settings-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    font-style: italic;
}

/* Sidebar Section Styles */
.sidebar-section {
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0;
}

.section-count {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-section .country-list {
    margin-top: 0;
}

/* Compact Flag Stack for Roadtrips */
.flag-stack {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 24px;
    margin-right: 8px;
}

.flag-stack .flag-layer {
    position: absolute;
    width: 24px;
    height: 18px;
    border-radius: 3px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.flag-stack .flag-layer:nth-child(1) {
    top: 0;
    left: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
}

.flag-stack .flag-layer:nth-child(2) {
    top: 2px;
    left: 4px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(1px);
}

.flag-stack .flag-layer:nth-child(3) {
    top: 4px;
    left: 8px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(1px);
}

.flag-stack .flag-counter {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 0.6rem;
    font-weight: bold;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hover effect to spread out flags with subtle animation */
.country-item:hover .flag-stack .flag-layer:nth-child(1) {
    transform: translate(-3px, -2px) rotate(-2deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.country-item:hover .flag-stack .flag-layer:nth-child(2) {
    transform: translate(0px, 2px) rotate(1deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.country-item:hover .flag-stack .flag-layer:nth-child(3) {
    transform: translate(3px, 4px) rotate(-1deg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.country-item:hover .flag-stack .flag-counter {
    transform: scale(1.1);
    background: var(--accent-secondary);
}

/* Alternative: Circular flag arrangement for roadtrip details */
.flag-circle {
    position: relative;
    display: inline-flex;
    width: 40px;
    height: 40px;
    margin-right: 8px;
}

.flag-circle .flag-orbit {
    position: absolute;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.flag-circle .flag-orbit:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.flag-circle .flag-orbit:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.flag-circle .flag-orbit:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.flag-circle .flag-orbit:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.flag-circle .flag-orbit:nth-child(n+5) {
    top: 12px;
    left: 12px;
    opacity: 0.7;
    transform: scale(0.8);
}

/* Flag ribbon for roadtrip country cards */
.flag-ribbon {
    display: inline-flex;
    position: relative;
    margin-right: 8px;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.flag-ribbon .flag-segment {
    flex: 1;
    min-width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    transition: transform 0.2s ease;
}

.flag-ribbon .flag-segment:last-child {
    border-right: none;
}

.flag-ribbon .flag-segment:hover {
    transform: scale(1.1);
    z-index: 2;
}

/* Mobile Roadtrip Styles */
@media (max-width: 768px) {
    .modal-mode-toggle {
        margin-left: 0;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        order: 3;
    }
    
    .modal-header {
        flex-wrap: wrap;
    }
    
    .roadtrip-flag-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        max-height: 150px;
    }
    
    .selected-countries {
        min-height: 50px;
        max-height: 120px;
    }
    
    .roadtrip-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .roadtrip-actions {
        width: 100%;
        justify-content: center;
    }
    
    .roadtrip-countries-display {
        gap: 0.5rem;
    }
    
    .roadtrip-country-card {
        padding: 0.5rem 0.75rem;
    }
    
    .roadtrip-map {
        height: 300px;
    }
    
    .map-pins-list {
        padding: 0.75rem;
    }
    
    .pin-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pin-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .roadtrip-flag-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        max-height: 120px;
    }
    
    .selected-country-chip {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .roadtrip-map {
        height: 250px;
    }
}

/* Mobile Navigation Styles */

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-sidebar-toggle:hover {
    top: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toggle-arrow {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s;
}

.mobile-sidebar-toggle.active .toggle-arrow {
    transform: rotate(90deg);
}

/* Mobile Top Navigation */
.mobile-nav-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    min-height: 60px;
}

.mobile-menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-radius: 4px;
    transition: background 0.2s;
}

.mobile-menu-toggle-btn:hover {
    background: var(--bg-secondary);
}

.hamburger-line {
    width: 22px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s;
}

.mobile-menu-toggle-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    margin: 0 1rem;
}

.mobile-logo,
.overlay-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.mobile-nav-title span {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.mobile-nav-actions {
    display: flex;
    gap: 0.5rem;
}

.mobile-action-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-action-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

/* Mobile Navigation Content */
.mobile-nav-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.mobile-nav-content.expanded {
    max-height: 70vh;
    padding: 1rem;
    overflow-y: auto;
}

.mobile-search-container {
    margin-bottom: 1rem;
}

.mobile-search-container input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.mobile-sidebar-section {
    margin-bottom: 1.5rem;
}

.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.mobile-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin: 0;
}

.mobile-section-count {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Mobile Menu Actions */
.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mobile-menu-action-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.mobile-menu-action-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-country-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-country-list .country-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-country-list .country-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(2px);
}

.mobile-country-list .country-item.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}


/* Settings Styles for Mobile Navigation */
.settings-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.settings-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    border-radius: 12px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: var(--text-secondary);
    transition: all 0.3s;
    border-radius: 50%;
}

.settings-toggle input:checked + .toggle-slider {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.settings-toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background-color: var(--bg-primary);
}

.photo-view-btn,
.photo-delete-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.photo-view-btn:hover {
    background: var(--accent-info);
}

.photo-delete-btn:hover {
    background: var(--accent-danger);
}

/* Photo Viewer Modal */
.photo-modal .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.photo-modal-body {
    padding: 0;
}

.photo-viewer-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.photo-display {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80vw;
    max-height: 70vh;
}

.photo-viewer-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.photo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-accent);
    border-radius: 6px;
}

.photo-counter {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.delete-photo-btn {
    background: var(--accent-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.delete-photo-btn:hover {
    background: #e53e3e;
}

.photo-nav-btn {
    background: var(--bg-accent);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.2s;
    flex-shrink: 0;
}

.photo-nav-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}

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

/* Upload Progress Styles */
.upload-progress-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.upload-filename {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-status {
    font-size: 0.9rem;
    color: var(--accent-info);
    font-style: italic;
    flex-shrink: 0;
}

.upload-progress-bar {
    height: 8px;
    background: var(--bg-accent);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.3s ease-out;
    position: relative;
}

.upload-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.upload-progress-percent {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-align: center;
    min-width: 40px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-tertiary);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    position: relative;
}

.modal-content.slide-in {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.3rem;
    color: var(--accent-primary);
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body input::placeholder {
    color: var(--text-secondary);
}

.modal-body input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

#cancel-add-country {
    background: var(--text-secondary);
    color: var(--text-primary);
}

#cancel-add-country:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

#confirm-add-country {
    background: var(--accent-secondary);
    color: var(--bg-primary);
}

#confirm-add-country:hover {
    background: var(--accent-secondary);
    opacity: 0.8;
    transform: translateY(-1px);
}

.flag-selector {
    margin-bottom: 1rem;
}

.flag-selector label {
    display: block;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.selected-flag {
    display: inline-block;
    font-size: 2rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.2s;
}

.selected-flag:hover {
    border-color: var(--accent-primary);
}

.flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.flag-option {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    aspect-ratio: 1;
}

.flag-option:hover {
    background: var(--bg-accent);
    transform: scale(1.1);
}

.flag-option.selected {
    background: var(--accent-primary);
}

.flag-grid::-webkit-scrollbar {
    width: 6px;
}

.flag-grid::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.flag-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.flag-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.watermark {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    z-index: 999;
    pointer-events: none;
    background: var(--bg-tertiary);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.watermark:hover {
    opacity: 1;
    background: var(--bg-tertiary);
}

.watermark-logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 50%;
}

.watermark-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Mobile User Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.mobile-user-menu {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-user-menu.collapsed {
    max-height: 0;
    margin-bottom: 0;
    border: none;
}

.mobile-user-menu.expanded {
    max-height: 200px;
}

.mobile-user-info {
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    /* Mobile Top Bar Sidebar Mode */
    body.mobile-sidebar-mode .main-content {
        flex-direction: column;
        padding-top: 50px; /* Space for toggle button */
    }
    
    body.mobile-sidebar-mode .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1001;
        max-height: 60vh;
        background: var(--bg-secondary);
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    body.mobile-sidebar-mode .sidebar.expanded {
        transform: translateY(0);
    }
    
    body.mobile-sidebar-mode .content-area {
        padding-top: 0;
        transition: margin-top 0.3s ease;
    }
    
    body.mobile-sidebar-mode .sidebar.expanded ~ .content-area {
        margin-top: 0;
    }
    
    .content-area {
        padding: 1rem;
        padding-top: 1rem; /* Reduced space since save button is smaller */
    }
    
    .save-status {
        display: none;
    }
    
    .country-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .flag-grid {
        max-height: 150px;
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
    
    .notes-toolbar {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .format-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .notes-editor {
        min-height: 200px;
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Mobile Roadtrip Enhancements */
    .roadtrip-details {
        padding: 0;
        margin: 0;
    }
    
    .roadtrip-header {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
    }
    
    .roadtrip-header h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .roadtrip-actions {
        gap: 0.5rem;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .roadtrip-actions button {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .roadtrip-countries-overview {
        padding: 0 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .roadtrip-countries-overview h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .roadtrip-countries-display {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .roadtrip-country-card {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .roadtrip-notes-section,
    .roadtrip-photos-section {
        padding: 0rem;
        margin-bottom: 1.5rem;
    }
    
    .roadtrip-notes-section h3,
    .roadtrip-photos-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Roadtrip Map Mobile */
    .roadtrip-map-container {
        margin: 1rem 0.75rem;
        padding: 0;
    }
    
    .roadtrip-map {
        height: 250px;
        border-radius: 8px;
    }
    
    .map-pins-list {
        padding: 0.5rem;
        max-height: 150px;
    }
    
    .pin-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Mobile Input Fields for Roadtrips */
    input[type="text"], input[type="search"], textarea {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    /* Roadtrip Modal Mobile Improvements */
    .roadtrip-countries-selector {
        padding: 0.75rem;
    }
    
    .selected-countries {
        min-height: 60px;
        max-height: 120px;
        padding: 0.5rem;
    }
    
    .roadtrip-flag-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 0.5rem;
        max-height: 200px;
        padding: 0.5rem;
    }
    
    .roadtrip-flag-option {
        min-height: 40px;
        font-size: 1.2rem;
    }
    
    /* Mobile Cities Section Styles */
    .cities-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch;
    }
    
    .cities-actions {
        justify-content: center;
        width: 100%;
    }
    
    .auto-populate-btn, .add-city-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .city-header {
        padding: 0.6rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .city-info {
        justify-content: space-between;
        width: 100%;
    }
    
    .city-actions {
        justify-content: center;
        width: 100%;
    }
    
    .city-content.expanded {
        max-height: 400px;
        padding: 0.8rem;
    }
    
    .city-notes-editor {
        min-height: 150px;
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    /* Mobile Photo Gallery Styles */
    .photos-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch;
    }
    
    .photos-actions {
        align-items: center;
    }
    
    .add-photos-btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .paste-hint {
        font-size: 0.75rem;
        justify-content: center;
    }
    
    .photos-gallery {
        padding: 0.8rem;
        gap: 0.8rem;
        justify-content: center;
    }
    
    .photos-gallery.paste-active::after {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .photo-thumbnail {
        width: 100px;
        height: 100px;
    }
    
    .photo-modal .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .photo-viewer-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .photo-display {
        max-width: 100%;
        max-height: 60vh;
    }
    
    .photo-viewer-image {
        max-height: 50vh;
    }
    
    .photo-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .photo-info {
        margin-top: 0.5rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile Upload Progress Styles */
    .upload-progress-container {
        margin-top: 0.8rem;
        padding: 0.8rem;
    }
    
    .upload-progress-info {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }
    
    .upload-filename {
        font-size: 0.9rem;
    }
    
    .upload-status {
        font-size: 0.8rem;
    }
    
    .upload-progress-bar {
        height: 6px;
    }
    
    .upload-progress-percent {
        font-size: 0.8rem;
        margin-top: 0.2rem;
        text-align: left;
    }
    
    /* Mobile Travel Preferences */
    .airport-input {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .airport-examples {
        font-size: 0.75rem;
    }
    
    /* Mobile Find Flights (Toolbar) */
    .find-flights-btn.toolbar-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        margin-left: 0.3rem;
    }
    
    .find-flights-btn.toolbar-btn .btn-icon {
        font-size: 0.8rem;
    }
    
    .toolbar-left {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .watermark {
        bottom: 10px;
        left: 10px;
        padding: 8px 10px;
        gap: 8px;
        border-radius: 6px;
    }
    
    .watermark-logo {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }
    
    .watermark-text {
        font-size: 0.9rem;
    }
    
    .nav-section {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }
    
    #home-btn {
        width: auto;
        flex: 0 0 auto; /* Don't grow, just fit content */
        padding: 8px; /* Exactly 8px padding */
        font-size: 1rem; /* Normal icon size */
        min-width: auto; /* Remove minimum width */
    }
    
    .mobile-menu-toggle {
        display: block !important;
        margin-bottom: 0 !important;
        padding: 11px !important; /* Exactly 8px padding */
        font-size: 0.8rem !important;
        width: auto !important;
    }
    
    .user-info {
        display: none !important; /* Completely hide desktop user info on mobile */
    }
    
    #delete-country-btn {
        display: none !important; /* Hide delete country button on mobile */
    }
    
    .mobile-user-info .user-email {
        font-size: 0.8rem;
        color: var(--accent-primary);
    }
    
    .mobile-user-info .user-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .mobile-user-info .settings-btn {
        padding: 11px; /* 11px padding for settings button */
        width: auto;
        height: auto;
        min-width: auto;
        min-height: auto;
    }
    
    .mobile-user-info .logout-btn {
        padding: 8px; /* Keep 8px padding for logout button */
        width: auto;
        height: auto;
        min-width: auto;
        min-height: auto;
    }
    
    .country-list {
        max-height: 25vh;
        overflow-y: auto;
    }
    
    .country-item {
        padding: 0.6rem;
    }
    
    .country-flag {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }
    
    .search-container {
        margin-bottom: 1rem;
    }
    
    .search-container input {
        font-size: 0.9rem;
    }
    
    .add-btn-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .sidebar {
        padding: 0.75rem;
        max-height: 35vh;
    }
    
    .content-area {
        padding: 0.75rem;
    }
    
    .modal-content {
        width: 98%;
        margin: 0.5rem;
    }
    
    .flag-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 0.25rem;
        max-height: 120px;
    }
    
    .flag-option {
        font-size: 1.2rem;
        padding: 0.3rem;
    }
    
    .selected-flag {
        font-size: 1.5rem;
        padding: 0.4rem;
        min-width: 50px;
    }
    
    .watermark {
        bottom: 5px;
        left: 5px;
        padding: 6px 8px;
    }
    
    .welcome-message {
        padding: 2rem 1rem;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        max-height: 50vh;
    }
    
    .modal-content {
        max-height: 80vh;
    }
    
    .flag-grid {
        max-height: 100px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .country-item {
        min-height: 48px;
        padding: 0.75rem;
    }
    
    .format-btn,
    .settings-btn,
    .logout-btn,
    .save-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .country-delete-btn {
        min-width: 32px;
        min-height: 32px;
        font-size: 1.1rem;
    }
    
    .flag-option {
        min-width: 40px;
        min-height: 40px;
    }
}

/* Authentication Styles */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-tab.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.auth-form {
    display: block;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

.auth-btn {
    width: 100%;
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: none;
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.auth-btn:hover {
    background: var(--accent-secondary);
    opacity: 0.8;
    transform: translateY(-1px);
}

.auth-error {
    color: var(--accent-danger);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
    min-height: 1.2rem;
}

/* User Info Styles */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.user-email {
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.settings-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: var(--accent-primary);
    opacity: 0.8;
    transform: translateY(-1px) scale(1.05);
}

.logout-btn {
    background: var(--accent-danger);
    color: var(--bg-primary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--accent-danger);
    opacity: 0.8;
    transform: translateY(-1px) scale(1.05);
}

/* Settings Modal Styles */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h4 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.settings-row label {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.import-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-filename {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.settings-btn-primary {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn-primary:hover {
    background: var(--accent-secondary);
    opacity: 0.8;
    transform: translateY(-1px);
}

.settings-btn-secondary {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn-secondary:hover {
    background: var(--accent-primary);
    opacity: 0.8;
    transform: translateY(-1px);
}

.settings-btn-danger {
    background: var(--accent-danger);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn-danger:hover {
    background: var(--accent-danger);
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Travel Preferences Styles */
.airport-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.airport-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.airport-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.1);
}

.airport-help {
    display: flex;
    align-items: center;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--accent-info);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: help;
}

.airport-examples {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    font-style: italic;
}

/* Find Flights Button (Toolbar Version) */
.find-flights-btn.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--accent-info);
    color: white;
    border: 1px solid var(--accent-info);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 1rem;
    position: relative;
}

.find-flights-btn.toolbar-btn::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: var(--border-color);
    opacity: 0.3;
}

.find-flights-btn.toolbar-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(125, 220, 255, 0.3);
}

.find-flights-btn.toolbar-btn .btn-icon {
    font-size: 0.9rem;
}

.country-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-selector {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-selector:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

/* Install Prompt Notification */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.install-prompt.show {
    transform: translateY(0);
}

.install-prompt-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.install-prompt-buttons {
    display: flex;
    gap: 0.5rem;
}

.install-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.install-btn:hover {
    opacity: 0.8;
}

.dismiss-btn {
    background: var(--text-secondary);
    color: var(--text-primary);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.dismiss-btn:hover {
    background: var(--border-color);
}

/* Mobile notification adjustments */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }
    
    .install-prompt {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .install-prompt-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .install-btn,
    .dismiss-btn {
        min-width: 80px;
    }
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--accent-secondary);
    color: var(--bg-primary);
}

.notification-error {
    background: var(--accent-danger);
    color: var(--bg-primary);
}

.notification-info {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Navigation Section Styles */
.nav-section {
    margin-bottom: 1rem;
}

.nav-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

.nav-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

/* Home Dashboard Styles */
.home-dashboard {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--accent-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 0;
}

.count-badge {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.countries-preview {
    min-height: 120px;
    margin-bottom: 1rem;
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
    margin: 2rem 0;
}

.country-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.country-chip {
    background: var(--bg-accent);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.2s;
}

.country-chip:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
}

.dashboard-btn {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.2s;
}

.dashboard-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-accent);
    border-radius: 8px;
    transition: all 0.2s;
}

.feature-item:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.feature-item:hover .feature-text {
    color: var(--bg-primary);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    background: var(--bg-accent);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.action-icon {
    font-size: 1.1rem;
}

/* Mobile Responsiveness for Dashboard */
@media (max-width: 768px) {
    .home-dashboard {
        padding: 1rem;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Country Header Styles */
.country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Notes Toolbar with Weather */
.notes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.toolbar-left {
    display: flex;
    gap: 0.5rem;
}

.weather-compact {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    min-width: 140px;
    max-width: 160px;
    flex-shrink: 0;
}

.weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.weather-loader {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.weather-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--accent-danger);
    font-size: 0.8rem;
}

.weather-retry-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.2s;
}

.weather-retry-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.weather-content {
    display: block;
}

#weather-current-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.current-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-icon-compact {
    font-size: 1.5rem;
}

.current-temp-compact {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.current-condition-compact {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.current-stats-compact {
    display: flex;
    gap: 0.5rem;
    font-size: 0.65rem;
    color: var(--text-secondary);
}


/* Mobile Responsiveness for Toolbar Weather */
@media (max-width: 768px) {
    .notes-toolbar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .weather-compact {
        align-self: flex-end;
        min-width: 130px;
        max-width: 150px;
    }
    
    #weather-current-compact {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }
    
    .current-stats-compact {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .weather-compact {
        min-width: 110px;
        max-width: 130px;
        padding: 0.3rem 0.5rem;
    }
    
    .current-temp-compact {
        font-size: 0.9rem;
    }
    
    .current-icon-compact {
        font-size: 1.2rem;
    }
}

/* Country Info Button Styles */
.country-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.country-info-btn {
    background: var(--accent-info);
    color: var(--bg-primary);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.country-info-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-1px) scale(1.1);
}

/* Country Info Modal Styles */
.modal-large {
    max-width: 700px;
    width: 90vw;
}

.country-info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-overview {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.best-time-summary h4 {
    color: var(--accent-primary);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.best-months {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.best-month-chip {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.travel-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.monthly-breakdown h4 {
    color: var(--accent-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.breakdown-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.month-card {
    background: var(--bg-accent);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.month-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.month-card.best-month {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    border-color: var(--accent-secondary);
}

.month-card.best-month:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.month-card.selected {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.month-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.month-temp {
    font-size: 0.75rem;
    opacity: 0.9;
}

.month-rating {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.6rem;
}

.selected-month-details {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.month-info-card h4 {
    color: var(--accent-primary);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.month-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-accent);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex: 1;
}

.stat-value {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.month-recommendation {
    padding: 1rem;
    background: var(--bg-accent);
    border-left: 4px solid var(--accent-primary);
    border-radius: 4px;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Mobile Responsiveness for Country Info */
@media (max-width: 768px) {
    .modal-large {
        width: 95vw;
        max-width: none;
    }
    
    .months-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .month-stats {
        grid-template-columns: 1fr;
    }
    
    .country-info-section {
        gap: 1.5rem;
    }
    
    .info-overview,
    .selected-month-details {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .months-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .month-card {
        padding: 0.5rem;
    }
    
    .best-months {
        justify-content: center;
    }
}