:root {
    --bg: #111;
    --surface: #222;
    --surface-hover: #333;
    --text: #eee;
    --text-muted: #aaa;
    --accent: #3498db;
    --danger: #e74c3c;
    --border: #444;
    --fav: #e74c3c;
    --overlay: rgba(0, 0, 0, 0.85);
    --shadow: rgba(0, 0, 0, 0.5);
    --surface-glass: rgba(34, 34, 34, 0.8);
}

[data-theme="light"] {
    --bg: #e2e5e9;
    --surface: #f1f3f6;
    --surface-hover: #e8eaed;
    --text: #2c3e50;
    --text-muted: #6c7a89;
    --border: #d1d5da;
    --overlay: rgba(0, 0, 0, 0.85);
    --shadow: rgba(0, 0, 0, 0.08);
    --surface-glass: rgba(241, 243, 246, 0.85);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 6px;
    border: 2px solid var(--surface);
    cursor: pointer;
    background-repeat: no-repeat;
}

@media (hover: hover) {
    ::-webkit-scrollbar-thumb:hover {
        background-color: var(--text-muted);
    }
}

.is-scrolling-down::-webkit-scrollbar-thumb {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSI2IDkgMTIgMTUgMTggOSI+PC9wb2x5bGluZT48L3N2Zz4=");
    background-position: bottom 2px center;
    background-size: 8px;
}

.is-scrolling-up::-webkit-scrollbar-thumb {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSIxOCAxNSAxMiA5IDYgMTUiPjwvcG9seWxpbmU+PC9zdmc+");
    background-position: top 2px center;
    background-size: 8px;
}

[data-theme="light"] .is-scrolling-down::-webkit-scrollbar-thumb {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM1NTU1NTUiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSI2IDkgMTIgMTUgMTggOSI+PC9wb2x5bGluZT48L3N2Zz4=");
}

[data-theme="light"] .is-scrolling-up::-webkit-scrollbar-thumb {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM1NTU1NTUiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSIxOCAxNSAxMiA5IDYgMTUiPjwvcG9seWxpbmU+PC9zdmc+");
}

.hidden-default {
    display: none;
}

.visible-default {
    display: block;
}

.contents-display {
    display: contents;
}

.m-0 {
    margin: 0;
}

.mb-10 {
    margin-bottom: 10px;
}

.flex-grow-1 {
    flex-grow: 1;
}

.position-relative {
    position: relative;
}

.text-muted {
    color: var(--text-muted);
}

.dir-ltr {
    direction: ltr;
}

.dir-rtl {
    direction: rtl;
}

.ml-5 {
    margin-left: 5px;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 899;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.mobile-divider-wrapper {
    display: none;
}

.mobile-nav-item {
    display: contents;
}

.stats-text-mobile-only,
.mobile-text-only,
.hide-desktop {
    display: none !important;
}

.topbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    height: 66px;
    box-sizing: border-box;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 900;
    gap: 15px;
    overflow: visible;
    view-transition-name: topbar;
}

::view-transition-group(topbar) {
    animation: none;
    z-index: 2147483647;
}

.topbar-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    min-width: max-content;
}

.topbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 250px;
}

.topbar-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    min-width: max-content;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.hamburger-btn .bar {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (hover: hover) {
    .hamburger-btn:hover {
        background: var(--surface-hover);
    }
}

.gallery-title {
    width: 75px;
    margin: -15px 0;
    white-space: nowrap;
    cursor: pointer;
}

.user-area-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 10px;
    min-height: 42px;
}

input:focus,
textarea:focus {
    background: var(--bg) !important;
    color: var(--text) !important;
    outline: none !important;
    border-color: var(--accent) !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.input-wrapper input[type="text"],
.input-wrapper input[type="tel"],
.input-wrapper input[type="email"],
.input-wrapper textarea {
    width: 100%;
    padding: 10px 35px 10px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}

.input-wrapper textarea {
    resize: vertical;
    overflow: hidden;
    min-height: 42px;
}

.clear-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    user-select: none;
    line-height: 1;
    z-index: 2;
    padding: 5px;
    transition: left 0.3s;
}

@media (hover: hover) {
    .clear-btn:hover {
        color: var(--danger);
    }
}

.input-wrapper textarea+.clear-btn {
    top: 10px;
    transform: none;
}

.input-wrapper.floating-wrap input::placeholder,
.input-wrapper.floating-wrap textarea::placeholder {
    color: transparent;
    transition: color 0.2s;
}

.input-wrapper.floating-wrap label {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0 5px;
    font-size: 14px;
    z-index: 1;
}

.input-wrapper.floating-wrap textarea~label {
    top: 21px;
}

.input-wrapper.floating-wrap input:not(:placeholder-shown)~label,
.input-wrapper.floating-wrap textarea:not(:placeholder-shown)~label,
.input-wrapper.floating-wrap input.show-placeholder~label {
    top: 0;
    font-size: 12px;
    background: linear-gradient(to bottom, var(--surface) 50%, var(--bg) 50%);
    border-radius: 4px;
    color: var(--text-muted);
}

.input-wrapper.floating-wrap input.show-placeholder::placeholder {
    color: var(--text-muted);
}

.input-wrapper.floating-wrap input:focus~label,
.input-wrapper.floating-wrap textarea:focus~label {
    top: 0;
    font-size: 12px;
    color: var(--accent);
    background: linear-gradient(to bottom, var(--surface) 50%, var(--bg) 50%);
    border-radius: 4px;
}

.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    min-height: 42px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: 0.3s;
    cursor: text;
    position: relative;
}

.tags-wrapper:focus-within {
    border-color: var(--accent);
}

.tags-wrapper-outer:focus-within {
    z-index: 100000;
}

.tags-wrapper-outer.floating-wrap input::placeholder {
    color: transparent;
    transition: color 0.2s;
}

.tags-wrapper-outer.floating-wrap input:disabled::placeholder {
    color: var(--text-muted);
}

.tags-wrapper-outer.floating-wrap label {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0 5px;
    font-size: 14px;
    z-index: 10;
}

.tags-wrapper-outer.floating-wrap:has(input:not(:placeholder-shown)) label,
.tags-wrapper-outer.floating-wrap:has(.tag-pill) label {
    top: 0;
    font-size: 12px;
    background: linear-gradient(to bottom, var(--surface) 50%, var(--bg) 50%);
    border-radius: 4px;
    color: var(--text-muted);
}

.tags-wrapper-outer.floating-wrap:has(input:focus) label,
.tags-wrapper-outer.floating-wrap:focus-within label {
    top: 0;
    font-size: 12px;
    color: var(--accent);
    background: linear-gradient(to bottom, var(--surface) 50%, var(--bg) 50%);
    border-radius: 4px;
}

.tag-pill {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.25) 0%, rgba(52, 152, 219, 0.05) 100%);
    border: 1px solid rgba(52, 152, 219, 0.4);
    border-radius: 15px;
    padding: 4px 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    backdrop-filter: blur(4px);
}

.tag-pill .remove-tag {
    cursor: pointer;
    color: var(--text-muted);
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    transition: 0.2s;
}

@media (hover: hover) {
    .tag-pill .remove-tag:hover {
        color: var(--danger);
    }
}

.tag-input-field {
    border: none;
    background: transparent;
    color: var(--text);
    outline: none;
    flex-grow: 1;
    min-width: 80px;
    padding: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.tag-input-field:focus {
    outline: none !important;
}

.autocomplete-list {
    position: absolute;
    background: var(--surface);
    margin-bottom: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: calc(100% - 20px);
    max-height: 150px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    z-index: 1000;
    box-shadow: 0 4px 15px var(--shadow);
    top: 100%;
    left: 10px;
    display: none;
}

.autocomplete-list.open-upwards {
    top: auto;
    bottom: 100%;
    box-shadow: 0 -4px 15px var(--shadow);
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text);
    font-size: 13px;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

@media (hover: hover) {
    .autocomplete-item:hover {
        background: var(--surface-hover);
        color: var(--accent);
    }
}

.autocomplete-active {
    background: var(--surface-hover);
    color: var(--accent);
}

button {
    cursor: pointer;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (hover: hover) {
    button:hover {
        background: var(--surface-hover);
    }
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

@media (hover: hover) {
    button:disabled:hover {
        background: var(--surface);
    }
}

button:not(.gallery-nav-btn):not(.fav-btn):not(.mobile-nav-item):not(.inat-w-card-nav):active,
.btn-google-nav:active,
.custom-dropdown-header:active,
.btn-accent:active,
.btn-danger:active,
.btn-stats:active,
.delete-btn:active,
.mark-btn:active,
.btn-csv:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

.btn-accent {
    background: linear-gradient(to bottom, #4faae7, var(--accent));
    color: white;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@media (hover: hover) {
    .btn-accent:hover {
        background: linear-gradient(to bottom, var(--accent), #2980b9);
    }
}

@media (max-width: 768px) {
    .desktop-only-placeholder {
        display: none !important;
    }
}

.btn-accent:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    border: none;
}

.multi-select-delete-btn {
    background: var(--danger);
    color: white;
    padding: 10px 25px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    border: none;
}

@media (hover: hover) {
    .multi-select-delete-btn:hover {
        background: #c0392b !important;
    }
}

.submit-add-btn {
    width: 100%;
    justify-content: center;
}

.submit-add-btn.uploading:disabled {
    color: white !important;
    cursor: wait !important;
}

.btn-google-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--surface);
}

@media (hover: hover) {
    .btn-google-nav:hover {
        background: var(--surface-hover);
    }
}

.btn-google-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    height: 100%;
    width: 100%;
    padding: 0 10px;
    margin: 0 -10px;
}

.custom-dropdown {
    position: relative;
    user-select: none;
}

.custom-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    color: var(--text);
    transition: 0.3s;
    white-space: nowrap;
}

.custom-dropdown-header svg {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.custom-dropdown.open .custom-dropdown-header svg {
    transform: rotate(180deg);
}

.custom-dropdown-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateY(-5px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, visibility 0.3s;
    transform-origin: top;
    min-width: 100%;
    white-space: nowrap;
}

.custom-dropdown.open .custom-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-dropdown-options div {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 14px;
}

@media (hover: hover) {
    .custom-dropdown-options div:hover {
        background: var(--surface-hover);
        color: var(--accent);
    }
}

.custom-dropdown-options div.active {
    font-weight: 600;
    background: var(--surface-hover);
    color: var(--accent);
}

.search-bar-integrated {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 42px;
    position: relative;
    width: 100%;
    max-width: 380px;
    transition: 0.3s;
    flex-shrink: 1;
}

.search-bar-integrated:focus-within {
    border-color: var(--accent);
}

.search-bar-integrated .custom-dropdown-header {
    height: 100%;
    padding: 0 10px 0 15px;
    border-left: 1px solid var(--border);
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: max-content;
    box-sizing: border-box;
}

.search-bar-integrated .custom-dropdown-options {
    right: 0;
    min-width: 123px;
}

.search-bar-integrated input[type="text"],
.search-bar-integrated input[type="number"] {
    border: none;
    background: transparent;
    height: 100%;
    flex-grow: 1;
    color: var(--text);
    outline: none !important;
    padding: 0 15px 0 35px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    transition: padding 0.3s;
}

.search-bar-integrated input[type="text"]:focus,
.search-bar-integrated input[type="number"]:focus {
    outline: none !important;
    background: transparent !important;
}

.search-bar-integrated input[type="number"]::-webkit-outer-spin-button,
.search-bar-integrated input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.search-bar-integrated input[type="number"] {
    -moz-appearance: textfield;
}

.styled-select-header {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    height: 42px;
    box-sizing: border-box;
    font-size: 14px;
    white-space: nowrap;
}

.size-controls {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    height: 39px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.size-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    height: 100%;
    border-radius: 5px;
    color: var(--text-muted);
    transition: 0.2s;
}

@media (hover: hover) {
    .size-btn:hover {
        background: var(--surface-hover);
        color: var(--text);
    }
}

.size-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.size-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.icon-action {
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: 0.3s;
    margin: 0 5px;
    flex-shrink: 0;
}

@media (hover: hover) {
    .icon-action:hover {
        color: var(--accent);
        transform: scale(1.07);
    }
}

.icon-action svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: 0.3s;
}

.fav-filter-icon {
    margin: 0;
}

@media (hover: hover) {
    .fav-filter-icon:hover {
        color: var(--fav);
    }
}

.fav-filter-icon.active {
    color: var(--fav);
}

.fav-filter-icon.active svg {
    fill: currentColor;
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 10px var(--shadow);
}

#backToTop.visible {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: hover) {
    #backToTop:hover {
        transform: translateY(-3px);
        background: #555;
    }
}

::view-transition-group(*) {
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(lightbox-hero),
::view-transition-new(lightbox-hero) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 1150px) {
    .topbar {
        padding: 10px 15px;
        gap: 10px;
    }

    .topbar-right,
    .topbar-left {
        min-width: auto;
        gap: 8px;
    }

    .search-bar-integrated {
        max-width: 320px;
    }

    button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .topbar {
        flex-wrap: wrap;
    }

    .topbar-center {
        order: 3;
        flex: 100%;
        min-width: 100%;
        margin-top: 5px;
    }

    .search-bar-integrated {
        max-width: 100%;
    }
}

.fav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 16px;
    min-height: 16px;
    aspect-ratio: 1/1;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    border: 1px solid var(--surface);
}

@media (hover: hover) {
    .fav-filter-icon:hover .fav-badge:not([data-count="0"]) {
        opacity: 1;
    }
}

.fav-badge.show:not([data-count="0"]) {
    opacity: 1;
}

.lb-share-wrapper {
    position: relative;
    display: inline-flex;
}

.lb-share-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateY(-5px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, visibility 0.3s;
    transform-origin: top right;
    z-index: 1001;
}

@media (hover: hover) {
    .lb-share-wrapper:hover .lb-share-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
}

.lb-share-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.lb-share-item svg {
    flex-shrink: 0;
}

@media (hover: hover) {
    .lb-share-item:hover {
        background: var(--surface-hover);
        color: var(--accent);
    }
}

@keyframes colorTooltipPop {
    0% {
        top: -20px;
        transform: translateX(-50%) scale(0.5);
        opacity: 0;
    }

    20% {
        top: -45px;
        transform: translateX(-50%) scale(1.1);
        opacity: 1;
    }

    30% {
        top: -40px;
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    80% {
        top: -40px;
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    100% {
        top: -50px;
        transform: translateX(-50%) scale(0.8);
        opacity: 0;
    }
}

.color-click-tooltip {
    position: absolute;
    left: 50%;
    pointer-events: none;
    background: var(--surface);
    color: var(--text);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 10px var(--shadow);
    border: 1px solid var(--border);
    z-index: 1000;
    white-space: nowrap;
    animation: colorTooltipPop 0.8s forwards;
}

.color-swatch {
    position: relative;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-pulse {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: skeleton-shimmer 2s infinite linear;
}

.skeleton-circle {
    border-radius: 50% !important;
}

@keyframes skeleton-pulse {
    0% {
        background: var(--surface);
    }

    50% {
        background: var(--surface-hover);
    }

    100% {
        background: var(--surface);
    }
}

[data-theme="light"] .skeleton-pulse,
[data-theme="light"] .skeleton-card,
[data-theme="light"] .skel-icon,
[data-theme="light"] .skel-logo,
[data-theme="light"] .skel-btn,
[data-theme="light"] .skel-search {
    background: linear-gradient(90deg, #e0e5ea 25%, #f4f6f8 50%, #e0e5ea 75%);
    background-size: 200% 100%;
}

.skel-icon {
    width: 40px;
    height: 40px;
}

.skel-logo {
    width: 100px;
    height: 35px;
    border-radius: 8px;
}

.skel-btn {
    width: 100px;
    height: 35px;
    border-radius: 8px;
}

.skel-search {
    width: 380px;
    height: 42px;
    border-radius: 8px;
}

[data-theme="light"] .image-container.skeleton-bg,
[data-theme="light"] .map-skeleton-text,
[data-theme="light"] .stats-skel-card,
[data-theme="light"] .stats-skel-chart {
    background: linear-gradient(90deg, #e0e5ea 25%, #f4f6f8 50%, #e0e5ea 75%) !important;
    background-size: 200% 100% !important;
    animation: skeleton-shimmer 2s infinite linear !important;
}

@keyframes skeleton-pulse-light {
    0% {
        background: #e0e5ea;
    }

    50% {
        background: #f4f6f8;
    }

    100% {
        background: #e0e5ea;
    }
}

.image-container.skeleton-bg {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite linear;
}

.toast-circular-timer {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s;
    flex-shrink: 0;
}

@media (hover: hover) {
    .toast-circular-timer:hover {
        color: var(--text);
    }
}

.toast-circular-timer svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.toast-circular-timer .bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.1);
    stroke-width: 3;
}

[data-theme="dark"] .toast-circular-timer .bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.toast-circular-timer .progress {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dashoffset: 0;
}

.toast-circular-timer .close-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
    z-index: 1;
    margin-top: -1px;
}

@keyframes circleProgress {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 100;
    }
}

.driver-popover {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    direction: rtl;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
}

.driver-popover-title {
    color: var(--accent) !important;
    font-size: 1.25rem !important;
    margin-bottom: 10px !important;
    font-weight: bold !important;
}

.driver-popover-description {
    color: var(--text-muted) !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

.driver-popover-footer button {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    text-shadow: none !important;
    padding: 6px 12px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

@media (hover: hover) {
    .driver-popover-footer button:hover {
        background-color: var(--surface-hover) !important;
    }
}

.driver-popover-navigation-btns {
    gap: 10px !important;
}

.driver-popover-footer button.driver-popover-next-btn {
    background-color: var(--accent) !important;
    color: white !important;
    border-color: var(--accent) !important;
    margin: 0 !important;
}

@media (hover: hover) {
    .driver-popover-footer button.driver-popover-next-btn:hover {
        opacity: 0.9 !important;
    }
}

.driver-popover-progress-text {
    color: var(--text-muted) !important;
}

.driver-step-one .driver-popover-prev-btn {
    display: none !important;
}

html.gallery-transitioning::view-transition-group(root) {
    animation: none;
}

html.gallery-transitioning::view-transition-old(root) {
    animation: none;
    opacity: 1;
}

html.gallery-transitioning::view-transition-new(root) {
    animation: none;
    opacity: 1;
}

img[src*="iNatLogo.png"] {
    filter: brightness(0) invert(0.93);
    transition: filter 0.3s;
}

[data-theme="light"] img[src*="iNatLogo.png"] {
    filter: brightness(0) invert(0.2);
}

.user-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    user-select: none;
    line-height: 1;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 2px 5px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar-initials.small {
    width: 24px;
    height: 24px;
    font-size: 11px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

.user-avatar-initials.large {
    width: 56px;
    height: 56px;
    font-size: 20px;
    box-shadow: 
        inset 0 1.5px 0 rgba(255, 255, 255, 0.22),
        0 3px 8px rgba(0, 0, 0, 0.25);
}