/* fraunces-100 - latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100;
    src: url('/fonts/fraunces-v37-latin_latin-ext_vietnamese-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fraunces-regular - latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/fraunces-v37-latin_latin-ext_vietnamese-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* fraunces-900 - latin_latin-ext_vietnamese */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 900;
    src: url('/fonts/fraunces-v37-latin_latin-ext_vietnamese-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 100;
    src: url('/fonts/noto-serif-sc-chinese-simplified-200-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/noto-serif-sc-chinese-simplified-400-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Serif SC';
    font-style: normal;
    font-weight: 900;
    src: url('/fonts/noto-serif-sc-chinese-simplified-900-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/noto-sans-sc-chinese-simplified-400-normal.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

:root {
    --color-highlight: #F5DEB3FF;
    --color-background-dark: #3b3b3b;
    --color-background-dark-light: #5c5c5c;
    --color-text-white: #e3e3e3;
    --serif-font: "Fraunces", 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;;
    --memories-header-height: 550px;
    --box-shadow: 0 8px 25px rgba(245, 222, 179, 0.2);
    --sans-serif-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC",  'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

body {
    font-family: var(--sans-serif-font);
    margin: 0;
    padding: 0;
    height: 100vh;
}

/* Main navigation */
.navbar {
    display: inline-flex;
    align-items: baseline;
    padding: 8px;
    border-bottom: 1px black;
    margin-left: 2rem;
    pointer-events: auto;
    position: sticky;
    font-size: 1.4rem;
}

.navbar i {
    font-size: 1.4rem;
}

.navbar .nav-link {
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.navbar .nav-link.active {
    color: var(--color-highlight)
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@media (min-width: 800px) {
    body.auto-update-mode .navbar {
        background: #4446;
        padding: 0;
        border: 1px solid;
        box-shadow: var(--box-shadow);
        margin: 0;
        border-right: 1px solid var(--color-highlight);
        border-bottom: 1px solid var(--color-highlight);
        border-bottom-right-radius: 8px;
        backdrop-filter: blur(10px);
    }
}

header {
    position: absolute;
    top: 0;
    left: 40%;
    z-index: 10;
    background: rgba(59, 59, 59, 0.62);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Map */

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.leaflet-container .visit-popup {
    white-space: preserve-breaks;
    width: 14rem;
    font-family: var(--serif-font);
    font-size: 0.8rem;
    line-height: 1.5rem;
    border-radius: 8px;
    padding: 8px;
    background: #3b3b3bbf;
    color: white;
}

.leaflet-container .visit-popup .visit-title {
    font-size: 1.4rem;
    color: var(--color-highlight);
}

.leaflet-container .visit-popup .visit-description {
    margin-top: 4px;
    font-weight: bold;
}

/* Elements */

.btn {
    background-color: var(--color-background-dark);
    font-family: var(--sans-font);
}

.btn.btn-block {
    width: 100%;
    display: inline-block;
    box-sizing: border-box;}

.btn.btn-danger {
    background: #995353;
    font-weight: bolder;
}

.btn.btn-danger:disabled {
    background: #917575;
    font-weight: normal;
}

fieldset {
    margin-bottom: 16px;
    border-radius: 4px;
    border-color: var(--color-highlight);
}

legend {
    font-weight: bold;
    color: var(--color-highlight);
}

details > div {
    padding: 16px;
}

input:focus {
    outline: 0;
    /* some people use shadows too */
    box-shadow: none;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.toggle-buttons {
    display: inline-flex;
}

.toggle-buttons .btn {
    padding: 0.375rem 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-size: 0.875rem;
    font-weight: 500;
}

.toggle-buttons .btn:not(:last-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.toggle-buttons .btn:not(:first-child) {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

.toggle-buttons .btn.active {
    background: var(--color-background-dark-light);
    box-shadow: var(--box-shadow);
}

input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: var(--color-background-dark-light);
    color: var(--color-text-white);
}


select:active,
textarea:active,
input:active,
select:focus,
textarea:focus,
input:focus {
    border-color: var(--color-highlight);
}

textarea:focus-visible {
    outline: none;
}


select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3e3e3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
    font-family: var(--serif-font);
}

select option {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
}

select:disabled,
input:disabled {
    background-color: #3a3a3a;
    color: #d0d0d0;
    cursor: not-allowed;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    color: var(--color-text-white);
    background-color: var(--color-background-dark-light);

}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    color: var(--color-highlight);
    background-color: var(--color-background-dark-light);
}


/* Alerts */
.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: var(--box-shadow);
    border: 1px solid;
    color: var(--color-highlight);
}

.alert-success {
    border-color: #e5ffeb;
    background: #2c4828;
}

.alert-danger {
    border-color: #ff3434;
    background: #995353;
}

.alert-warning {
    background: #5c4c2f;
    border-color: #ffd38b;
}

.alert-info {
}


.user-row.selected {
    background-color: var(--color-highlight);
    color: var(--color-background-dark);
}

.form-group {
    margin-bottom: 15px;
}
.queue-status {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.queue-description {
    margin-top: 16px;
}

.queue-card {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.queue-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}


.upload-option {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.upload-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.settings-card h3 {
    margin-top: 0;
}

.settings-card {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.queue-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.queue-count {
    font-size: 24px;
    color: var(--color-highlight);
}

.queue-time {
    margin-top: 10px;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--color-highlight);
    width: 0%;
    transition: width 0.5s ease;
}

/* Places Management Styles */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.place-map {
    height: 250px;
    width: 250px;
}

.place-card {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
}

.place-details {
    padding: 15px;
}

.place-info {
    margin: 15px 0;
    font-size: 0.9em;
}

.place-info div {
    margin-bottom: 5px;
}

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

.pagination-buttons {
    display: flex;
    gap: 10px;
}



.timeline::-webkit-scrollbar {
    display: none;
}

.timeline {
    position: fixed;
    top: 0;
    width: 50%;
    bottom: 0;
    background: var(--color-background-dark);
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 21%, rgba(255, 255, 255, 0) 40%);;
    z-index: 5;
    overflow-y: auto;
    pointer-events: none;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.navigation-container {
    position: fixed;
    top: 0;
    width: 50%;
    z-index: 50;
    overflow-y: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.timeline-container {
    font-family: var(--serif-font);
    line-height: 1.5;
    font-weight: 400;
    padding-top: 48px;
    padding-bottom: 110px;
    transition: opacity 0.3s ease;
}

.timeline-entry {
    color: #e1e1e1;
    padding: 0 2rem;
    transition: all 0.25s ease-in-out;
    pointer-events: all;
    cursor: pointer;
    position: relative;
}

.timeline-entry.active {
    color: #e1e1e1;
    transition: all 0.25s ease-in-out;
}

.timeline-entry .entry-description {
    font-size: 3rem;
    font-weight: lighter;
    transition: all 0.25s ease-in-out;
}

.timeline-entry.active .entry-description {
    font-size: 5rem;
    transition: all 0.25s ease-in-out;
}

.timeline-entry .place-name-container {
    text-shadow: 0px 0px 0px white, 2px 2px 0px #24201c, 1px 1px 0 #171414;
}

.htmx-indicator {
    display: none;
}
.htmx-indicator i {
    vertical-align: middle;
}

.htmx-indicator.htmx-request,
.htmx-request .htmx-indicator {
    display: inline;
    height: initial;
}

a.btn,
button {
    font-size: 14px;
    color: var(--color-highlight);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

a.btn:hover,
button:hover {
    background-color: #959595;
}

.upload-options progress {
    display: block;
    width: 100%;
    margin-top: 1rem;
}

/* Language Selection Styles */
.language-selection {
    margin-top: 20px;
}

.language-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 800px;
}

.user-sharing-btn {
    text-align: center;
    justify-content: flex-start;
    padding: 8px 24px;
    background-color: var(--color-background-dark-light);
    color: var(--color-text-white);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    background-color: var(--color-background-dark-light);
    color: var(--color-text-white);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    min-height: 60px;
}

.user-sharing-btn:hover,
.language-btn:hover {
    background-color: var(--color-background-dark);
    border-color: var(--color-highlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.user-sharing-btn.active,
.language-btn.active,
.user-sharing-btn:has(input[type="radio"]:checked),
.language-btn:has(input[type="radio"]:checked) {
    background-color: var(--color-highlight);
    color: var(--color-background-dark);
    border-color: var(--color-highlight);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.4);
}

.language-btn.active:hover,
.user-sharing-btn.active:hover,
.user-sharing-btn:has(input[type="radio"]:checked):hover,
.language-btn:has(input[type="radio"]:checked):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245, 222, 179, 0.5);
}

.language-flag {
    font-size: 1.5rem;
    margin-right: 12px;
    display: inline-block;
}

.language-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.language-btn:has(input[type="radio"]:checked) .language-name {
    font-weight: bold;
}

.language-btn.active .language-name {
    font-weight: bold;
}

@media (max-width: 600px) {
    .language-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .language-btn {
        padding: 12px 16px;
        min-height: 50px;
    }

    .language-flag {
        font-size: 1.3rem;
        margin-right: 10px;
    }

    .language-name {
        font-size: 1rem;
    }
}

/* Collapsible details styling */
details {
    color: var(--color-text-white);
}

details summary {
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    transition: background-color 0.2s ease;
    border: 1px solid;
}

details > div {
    border-bottom: 1px solid;
    border-left: 1px solid;
    border-right: 1px solid;
}

details:first-child > summary {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

details:not([open]):last-child > summary {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
details summary:hover {
    background-color: var(--color-background-dark-light);
}

input[type=file]::file-selector-button {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    border: 1px solid var(--color-highlight);
    padding: 10px 15px;
    margin-right: 20px;
    transition: .5s;
}

input[type=file]::file-selector-button:hover {
    background-color: var(--color-background-dark-light);
}


/* Timeline Scroll Indicator Styles */
.timeline-scroll-indicator {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 30vh;
    width: 8px;
    z-index: 100;
    opacity: 0.7;
    pointer-events: none;
    padding-top: 100px;
    padding-bottom: 250px;
    transition: all 0.3s ease-in-out;
}

.timeline-scroll-indicator:hover {
    opacity: 1;
}

.scroll-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
    rgba(245, 222, 179, 0.3) 0%,
    rgba(245, 222, 179, 0.6) 50%,
    rgba(245, 222, 179, 0.3) 100%);
    border-radius: 3px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.scroll-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-highlight);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease-in-out;
}

.leaflet-container .photo-marker-icon img {
    width: 100%;
}


body.timeline-hidden .timeline-scroll-indicator,
body.timeline-hidden .timeline-container {
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

body.timeline-hidden .timeline-toggle-btn {
    position: fixed;
    right: auto;
}

body.datepicker-hidden .timeline-toggle-btn,
body.timeline-hidden.datepicker-hidden .timeline-toggle-btn {
    bottom: 24px;
}

.datepicker-toggle-btn {
    position: absolute;
    right: 4px;
    z-index: 10;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 1.2rem;
    background: rgba(59, 59, 59, 0.9);
    backdrop-filter: blur(10px);
}

.datepicker-toggle-btn:hover {
    border-color: var(--color-highlight);
    transform: translateY(-2px);
    background: rgba(59, 59, 59, 0.9);
}

.datepicker-toggle-btn i {
    font-size: 1.2rem;
}

.timeline-toggle-btn {
    position: fixed;
    z-index: 10;
    background: transparent;
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    font-size: 1.2rem;
}


.timeline-toggle-btn,
.datepicker-toggle-btn {
    bottom: 114px;

}

.timeline-toggle-btn:hover {
    background: transparent;
    border-color: var(--color-highlight);
    transform: translateY(-2px);
}

.timeline-toggle-btn i {
    font-size: 1.2rem;
}

body.datepicker-hidden #date-picker-container {
    transform: translateY(100%);
    transition: all 0.3s ease-in-out;
}

body.datepicker-hidden .datepicker-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 4px;
    background: rgba(59, 59, 59, 0.9);
    backdrop-filter: blur(10px);
}

body.datepicker-hidden .today-fab {
    display: none !important;
}

body.auto-update-mode .timeline-toggle-btn,
body.auto-update-mode .datepicker-toggle-btn,
body.auto-update-mode .today-fab {
    display: none;
}

.statistics-content {
    margin-left: 30rem;
    color: var(--color-text-white);
    font-family: var(--serif-font);
    background: transparent;
    z-index: 1000;
    position: relative;
    font-weight: 300;
    font-size: 1.4rem;
    max-height: 100vh;
    padding: 2rem;
}

.statistics-content h2 {
    font-weight: 300;
    font-size: 2.4rem;
    margin-bottom: 2rem;
}

.statistics-content h3 {
    font-weight: 300;
    font-size: 2.1rem;
    margin-bottom: 1.5rem;
}

.statistics-section {
    margin-bottom: 3rem;
}

/* Top Places Grid Styles */
.places-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.place-stats-card {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.place-stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.place-map-container {
    width: 240px;
    height: 240px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-highlight);
    position: relative;
}

.place-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.place-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(245, 222, 179, 0.2);
}

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

.place-stat-label {
    font-size: 1rem;
    color: var(--color-text-white);
    opacity: 0.8;
}

.place-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-highlight);
}

/* Transport Statistics Table Styles */
.transport-stats-table {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.transport-table-header {
    background: var(--color-background-dark-light);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--color-highlight);
    border-bottom: 2px solid var(--color-highlight);
}

.transport-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(245, 222, 179, 0.1);
    transition: background-color 0.2s ease;
}

.transport-table-row:hover {
    background: var(--color-background-dark-light);
}

.transport-table-row:last-child {
    border-bottom: none;
}

.transport-mode {
    font-weight: 500;
    color: var(--color-text-white);
    text-transform: capitalize;
}

.transport-distance {
    color: var(--color-highlight);
    font-weight: 600;
}

.transport-trips {
    color: var(--color-text-white);
    opacity: 0.9;
}

/* Transport Charts Styles */
.transport-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(700px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.transport-chart-section {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    padding: 1.5rem;
}

.transport-chart-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-highlight);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.pie-chart-container {
    position: relative;
    height: 250px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1200px) {
    .transport-charts-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.statistics-panel {
}

.background-dark {
    background: var(--color-background-dark);
}

.logo {
    width: auto;
    height: 28px;
    padding: 6px 8px 3px;
    vertical-align: bottom;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

.logo:hover {
    opacity: 1;
}

.settings-card a:visited,
.settings-card a:active,
.settings-card a:hover,
.settings-card a {
    color: var(--color-highlight);
}

.text-align-left {
    text-align: left;
}

/* Settings Page Styles */
.settings-page {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    min-height: 100vh;
    font-family: var(--serif-font);
    font-weight: normal;
}

.settings-header {
    width: 250px;
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 76%, rgba(255, 255, 255, 0) 100%);
    flex-shrink: 0;
    display: block;
    margin-bottom: 0;
    border-bottom: none;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.back-link:hover {
    background-color: var(--color-background-dark);
    color: var(--color-highlight);
}

.settings-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-highlight);
}

.settings-container {
    display: flex;
    min-height: 100%;
}

.settings-page .settings-nav {
    width: 250px;
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 76%, rgba(255, 255, 255, 0) 100%);
    flex-shrink: 0;
    display: block;
    margin-bottom: 0;
    border-bottom: none;
}

.settings-page .navigation-container {
    position: relative;
    /* hack to make the background appear the same as the settings-nav*/
    background: linear-gradient(90deg, rgb(17, 17, 17) 0%, rgba(59, 59, 59, 0.49) 76%, rgba(255, 255, 255, 0) 250px);
    width: 250px;
    overflow-y: visible;
}

.settings-page .settings-nav-item {
    display: block;
    text-decoration: none;
    padding: 15px 25px;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-bottom: none;
    transition: all 0.2s ease;
    color: var(--color-text-white);
}

.settings-page .settings-nav-item:hover {
    background-color: var(--color-background-dark);
    border-left-color: var(--color-highlight);
}

.settings-page .settings-nav-item.active {
    border-bottom: none;
    font-weight: bold;
    color: var(--color-highlight);
}

.settings-content-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 24px;
    padding-right: 24px;
    line-height: 1.4;
}

.settings-page .settings-section {
    display: none;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.settings-page .settings-section.active {
    display: block;
}

.settings-page .settings-section input:focus,
.settings-page .settings-section select:focus {
    border: 2px solid var(--color-highlight);
    outline: none;
}

.settings-page .settings-section code {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-text-white);
}

.settings-page .settings-section .btn {
    border: 1px solid;
}

@media (max-width: 800px) {
    .timeline-entry {
        padding: 1rem 2rem 0 1rem;
    }

    .timeline {
        background: linear-gradient(90deg, rgb(151, 151, 151) 0%, rgba(59, 59, 59, 0.49) 3%, rgba(255, 255, 255, 0) 100%);
        text-shadow: 0 0 0 white, 2px 2px 0 #24201c, 1px 1px 0 #171414;
    }

    .timeline-entry .entry-description {
        font-size: 1rem;
        font-weight: normal;
    }

    .timeline-entry {
        font-size: 1rem;
        color: white;
    }

    .timeline-entry.active {
        color: var(--color-highlight);
        padding: 1rem 2rem 0 1.3rem;
    }

    .timeline-entry.active .entry-description {
        font-size: 1.3rem;
    }

    .timeline-scroll-indicator {
        left: 5px;
        width: 4px;
        height: 50vh;
    }

    .scroll-thumb {
        width: 8px;
        height: 16px;
        border-radius: 4px;
    }

    .scroll-thumb::before {
        width: 4px;
        height: 4px;
    }

    .place-name-container.editing {
        border-radius: 3px;
        font-size: 1rem;
        float: left;
        min-width: 0;
    }

    .navigation-container {
        background-color: rgba(59, 59, 59, 0.68);
        backdrop-filter: blur(10px);

    }
    .navigation-container,
    .settings-page .navigation-container {
        width: 100%;
    }
    .navbar {
        margin-left: initial;
        padding: 4px;
    }
    .settings-container {
        flex-direction: column;
    }

    .settings-page .settings-nav {
        width: 100%;
        display: flex;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-highlight);
    }

    .settings-page .settings-nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 18px 8px;
    }

    .settings-page .settings-nav-item.active {
        border-left: none;
        border-bottom-color: var(--color-highlight);
    }

    .settings-content-area {
        padding: 20px;
    }

    .settings-header {
        padding: 15px;
    }

    .settings-header h1 {
        font-size: 1.5rem;
    }


}

/* Today FAB Styles */
.today-fab {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: var(--color-background-dark);
    color: var(--color-highlight);
    border: 1px solid var(--color-highlight);
    border-radius: 25px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--serif-font);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.today-fab:hover {
    background: var(--color-highlight);
    color: var(--color-background-dark);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 222, 179, 0.4);
}

.today-fab i {
    font-size: 1rem;
}

@media (max-width: 800px) {
    .today-fab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .today-fab i {
        font-size: 0.9rem;
    }
}

a.btn:disabled,
button:disabled {
    background: #9b9b9b;
    cursor: not-allowed;
    color: white;
}

.pulsating-marker {
    animation: pulse 1s infinite;
    z-index: 2000;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.css-icon {

}

.gps_ring {
    border: 3px solid #ff0000;
    -webkit-border-radius: 30px;
    height: 36px;
    width: 36px;
    -webkit-animation: pulsate 1.5s ease-out;
    -webkit-animation-iteration-count: infinite;
}

@-webkit-keyframes pulsate {
    0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;}
    50% {opacity: 1.0;}
    100% {-webkit-transform: scale(1.2, 1.2); opacity: 0.0;}
}
.sr-only {
    display: none;
}

.spinner {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    border: 0.125em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



.connected-account-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.connected-account-row .select {
    flex: 1;
}

.connected-account-row input[type="color"] {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.no-connected-accounts {
    margin-bottom: 8px;
}

.select {
    min-width: 350px;
    position: relative;
}

.select select {
    appearance: none;
    width: 100%;
    padding: 8px 32px 8px 8px;
    background-color: var(--color-background-dark-light);
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--color-text-white);
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3e3e3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.select select option {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
}

.unit-description {
    padding-left: 8px;
}

/* Add to your existing CSS file */
.avatar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.current-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.avatar-input {
    display: none;
}

.avatar-upload-btn {
    cursor: pointer;
    text-align: center;
}

.avatar-delete-btn {
    align-self: flex-start;
}

.avatar-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.avatar-input-row input[type="file"] {
    flex: 1;
}

.avatar-remove-btn {
    flex-shrink: 0;
}

.user-timeline-section {
    display: none;
    grid-template-columns: 1fr;
    justify-items: left;
}

.user-timeline-section.active {
    display: grid;
}

.user-timeline-selection {
    padding-left: 42px;
}

.user-timeline-section .no-entries{
    color: white;
    padding: 48px;
}

.user-timeline-selection .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

.user-header {
    pointer-events: all;
    color: white;
    font-family: var(--serif-font);
    font-weight: normal;
    display: inline-block;
    text-align: center;
}

.user-header .username {
    overflow: hidden;
    white-space: nowrap;
    max-width: 80px;
    text-overflow: ellipsis;
}


.user-header.active .avatar {
    border: 2px solid var(--color-highlight);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
}


.default-avatars-section {
    margin-bottom: 20px;
}

.default-avatars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 15px 0;
    padding: 20px;
    max-width: 400px;
}

.default-avatar-option {
    width: 64px;
    height: 64px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.default-avatar-option:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.default-avatar-option input:checked + .avatar {
    border: 2px solid var(--color-highlight);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.avatar.small {
    width: 32px;
    height: 32px;
}

.avatar::before {
    display: none;
}
.avatar::after {
    content: attr(alt);
    color: white;
    font-size: 2.4rem;
    top: 0;
    position: absolute;
    background: var(--color-background-dark);
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 5px;
    font-weight: initial;
    font-family: var(--serif-font);
}

.avatar.small::after {
    font-size: 1.1rem;
    padding: 6px 3px;
}

.avatar:not(:has(img))::after {
    display: block;
}

.avatar img:not([src]) ~ .avatar::after {
    content: attr(alt);
    display: block;
}

.avatar img:not([src]),
.avatar img:empty {
    display: none;
}

.current-avatar .avatar {
    width: 100px;
    height: 100px;
}

.separator {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #ddd;
    z-index: 1;
}

.separator span {
    background-color: white;
    padding: 0 15px;
    color: #666;
    position: relative;
    z-index: 2;
}

.custom-avatar-section {
    padding-top: 15px;
}

.home-location-inputs {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.coordinate-input {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.coordinate-input label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.coordinate-input input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.home-location-map {
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

#message-container {
    text-align: center;
    position: fixed;
    z-index: 200;
    width: 100%;
    pointer-events: none;
}

#sse-message {
    display: none;
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#sse-message.active {
    display: inline-block;
}

.export-data-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.export-data-table-container table {
    width: 100%;
    border-collapse: collapse;
}


.export-data-table-container table thead tr {
    position: sticky;
    top: 0;
    background-color: var(--color-background-dark);
    z-index: 1;
}

.export-data-table-container table tr th {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.export-data-table-container tbody tr th {
    padding: 8px;
    font-family: monospace;
    font-size: 1.2em;
}

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

 #loading-indicator.htmx-request {
    display: block !important;
}

#data-content.htmx-request  {
    opacity: 0.3;
}

/* Auto-update mode styles */
.auto-update-overlay {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.2rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: var(--serif-font);
    text-align: center;
}

.auto-update-overlay.visible {
    display: block;
    opacity: 1;
}

.auto-update-overlay .date {
    font-weight: bold;
    margin-bottom: 5px;
}

.auto-update-overlay .time {
    font-size: 3rem;
    color: #f1ba63;
}

.auto-update-overlay .overlay-button {
    position: absolute;
    bottom: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
}

.auto-update-overlay .overlay-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.auto-update-overlay .exit-button {
    right: 15px;
}

.auto-update-overlay .fullscreen-button {
    left: 15px;
}

/* Smooth transitions for timeline and date picker */
.timeline, #date-picker-container {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.timeline.hidden {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

#date-picker-container.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

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

@media (max-width: 768px) {
    .home-location-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .coordinate-input {
        min-width: unset;
    }

    .auto-update-overlay {
        width: 80%;
    }
}

.memories-overview {
    margin-left: 30rem;
    color: var(--color-text-white);
    font-family: var(--serif-font);
    background: transparent;
    z-index: 1000;
    position: relative;
    max-height: 100vh;
    padding: 2rem;
}

/* Memories */
.memories-page {
    background-color: var(--color-background-dark);
    color: var(--color-text-white);
    min-height: 100vh;
    font-family: var(--serif-font);
    font-weight: normal;
}

.memories-page .btn {
    border: 1px solid var(--color-highlight);
}

.memories-page .btn i {
    vertical-align: middle;
}


.memories-page .settings-nav-item {
    display: block;
    text-decoration: none;
    padding: 15px 25px;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-bottom: none;
    transition: all 0.2s ease;
    color: var(--color-text-white);
}

.memories-page .settings-nav-item:hover {
    background-color: var(--color-background-dark);
    border-left-color: var(--color-highlight);
}

.memories-page .settings-nav-item.active {
    border-bottom: none;
    font-weight: bold;
    color: var(--color-highlight);
}

.memory-header #edit-fragment {
    margin: var(--memories-header-height) auto;
    margin-top: 0;
    padding: 30px;
    width: 100%;
    max-width: 1280px;
}

.memories-page .memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


.memories-page .memory-card {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.memories-page .memory-card .memory-card-details {
    display: flex;
    flex-direction: column;
    height: 180px;
    padding: 15px;
}

.memories-page .memory-card .memory-card-info {
    margin: 15px 0;
    font-size: 0.9em;
    flex-grow: 2;
}

.memories-page .memory-card .memory-card-info div {
    margin-bottom: 5px;
}

.memories-page .memory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.memories-page .memory-card-map-container {
    height: 400px;
    width: 100%;
}

.memories-page .settings-content-area {
    flex: 1;
    overflow-y: auto;
    font-family: initial;
}

.memories-page .memory-header {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: var(--memories-header-height);
}

.memories-page .memory-header .action-bar {
    z-index: 500;
    position: relative;
    padding: 8px;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #00000008;
    backdrop-filter: blur(4px);
}

.memories-page .memory-header:hover .action-bar {
    opacity: 1;
    pointer-events: all;
    box-shadow: -1px -1px 9px wheat, 1px -1px 9px #6f560d, -1px 1px 5px #24201c, 1px 1px 0 #171414;
}

.memories-page .memory-header .action-bar div:first-child {
    flex-grow: 2;
}

.memories-page .memory-details {
    position: absolute;
    text-align: center;
    font-family: var(--serif-font);
    color: #fbe7c3;
    font-size: 2em;
    text-shadow: -1px -1px 9px wheat, 1px -1px 9px #6f560d, -1px 1px 5px #24201c, 1px 1px 0 #171414;
    width: 100%;
}

.memories-page .memory-map {
    position: absolute;
    height: var(--memories-header-height);
    width: 100%;
    top: 0;
    z-index: 0;
    box-shadow: var(--box-shadow);
}

.memories-page .memory-blocks-container {
    padding: 30px;
    margin: var(--memories-header-height) auto 0;
    width: 100%;
    max-width: 1280px;
}

.memories-page .memory-block {
    position: relative;
    margin-bottom: 16px;
}

.memories-page .memory-block .block-actions {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.memories-page .memory-block:hover .block-actions {
    opacity: 1;
}

.memories-page .memory-block .time::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 1px;
    background-color: #ccc;
    margin-top: 36px;
}

.memories-page .text-block {
    font-size: 1.2em;
}

.memories-page .visit-address,
.memories-page .cluster-block .cluster-duration {
    text-align: center;
}

.memories-page .cluster-block .cluster-duration {
}

.memories-page .cluster-block .block-header,
.memories-page .visit-block .block-header {
    position: relative;
    margin-bottom: 16px;
}

.memories-page .cluster-block .cluster-map {
    height: 550px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
}

.memories-page .visit-block .visit-map {
    height: 200px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(245, 222, 179, 0.3);
}

.memories-page .block-header .time {
    text-align: center;
    font-size: 1.2em;
    font-weight: 300;
    font-family: var(--serif-font);
    color: lightgray;
}

.memories-page .block-form {
    margin-bottom: 16px;
}

.memories-page .add-block-spacer {
    opacity: 0;
    transition: all 0.3s ease-in-out;
    text-align: center;
    margin: 10px 0;
    pointer-events: none;
    height: 1px;
}

.memories-page .empty-blocks .add-block-spacer,
.memories-page .memory-block:hover .add-block-spacer {
    opacity: 1;
    pointer-events: auto;
    height: 36px;
}

.memories-page .block-header .title {
    margin: 0;
    font-size: 1.5em;
    text-align: center;
    color: var(--color-highlight);
    text-shadow: -1px -1px 9px wheat, 1px -1px 9px #6f560d, -1px 1px 5px #24201c, 1px 1px 0 #171414;
}

.memories-page .block-header .visit-title {
    position: absolute;
    bottom: 0;
    text-align: center;
    font-family: var(--serif-font);
    color: #fbe7c3;
    font-size: 1.8em;
    text-shadow: -1px -1px 9px wheat, 1px -1px 9px #6f560d, -1px 1px 5px #24201c, 1px 1px 0 #171414;
    z-index: 500;
    right: 10px;
    font-weight: inherit;
}

.block-type-selection {
    background-color: var(--color-background-dark);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--color-highlight);
    color: var(--color-text-white);
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 15px;
    margin-bottom: 15px;
}

.block-type-selection:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow);
}

.block-type-selection h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.block-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.block-type-option {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.block-type-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.block-type-option span {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.block-type-option p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.3;
}

.empty-blocks {
    text-align: center;
    font-size: 1.4rem;
    color: var(--color-highlight);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Lazy loading styles */
.lazy-image {
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Placeholder styling for lazy images */
.gallery-image-item {
    position: relative;
    min-height: 200px;
    background-color: #2d2d2d;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Loading spinner for images */
.photo-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

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

/* Hide spinner when image is loaded */
.gallery-image-item img.loaded + .photo-loading-spinner {
    display: none;
}

#current-timeline .timeline-entry,
#preview-timeline .timeline-entry {
    cursor: initial;
}

.memory-processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.memory-processing-overlay.htmx-request {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.memory-processing-content {
    background: var(--color-background-dark);
    border: 1px solid var(--color-highlight);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.memory-processing-spinner {
    margin-bottom: 20px;
}

.memory-processing-spinner i {
    font-size: 3rem;
    color: var(--color-highlight);
}

.memory-processing-title {
    color: white;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.memory-processing-steps {
    margin-bottom: 30px;
}

.processing-step {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 0;
    color: #666;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.processing-step.active {
    color: var(--color-highlight);
    opacity: 1;
    transform: translateX(10px);
}

.processing-step i {
    margin-right: 15px;
    font-size: 1.2rem;
    width: 20px;
}

.memory-processing-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-text {
    color: #ccc;
    font-size: 0.9rem;
}

@keyframes indeterminate-progress {
    0% {
        transform: translateX(-100%);
        width: 30%;
    }
    50% {
        transform: translateX(0%);
        width: 30%;
    }
    100% {
        transform: translateX(300%);
        width: 30%;
    }
}


.date-picker {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(59, 59, 59, 0.68);
    backdrop-filter: blur(10px);
    z-index: 50;
    box-shadow: unset;
    color: white;
    height: 110px;
}

.timeband-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.timeband-item .primary-text {
    font-size: 2rem;
    font-weight: lighter;
}

.timeband-item.selected {
    background-color: unset;
    color: var(--color-highlight);
    transform: scale(1.05);
    box-shadow: unset;
}

.timeband-item.in-range {
    background-color: rgba(117, 82, 0, 0.49);
    color: white;
}

.timeband-item.range-start, .timeband-item.range-end {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    background-color: rgba(117, 82, 0, 0.49);
    color: white;
}

.timeband-item.range-start:hover::before, .timeband-item.range-end:hover::before {
    opacity: 1;
}

.timeband-item.selected::before {
    content: "\eb47";
    font-family: 'Lineicons';
    font-weight: 900;
    position: absolute;
    top: 4px;
    left: unset;
    transform: unset;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    right: 4px;
}

.timeband-item.locked::before,
.timeband-item.selected.range-start::before,
.timeband-item.selected.range-end::before{
    content: "\ec2a";
}
.timeband-item.selected:hover::before {
    opacity: 1;
}

.timeband-item.locked {

}

