* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    touch-action: manipulation; /* Odpravi 300ms zakasnitev klika na mobilnih napravah */
}

body, .app-container {
    background-color: #000000;
    color: #f1f5f9;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    user-select: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.hidden {
    display: none !important;
}

.text-emerald { color: #2b2622 !important; }
.text-light { color: #e3d7c5; }
.text-slate { color: #e3d7c5; }
.text-bold { font-weight: 700; }
.font-bold { font-weight: 700; }
.font-mono { font-family: monospace; }

.marker-pulse {
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(var(--zoom-scale, 1));
        opacity: 1;
    }
}

.app-header {
    height: 3.5rem;
    background-color: black;
    border-bottom: 1px solid #1F1C1A;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 30;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-title {
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-subtitle {
    font-size: 11px;
    color: #94a3b8;
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#switch-map-btn,
#help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 6px 12px;
    background-color: #e3d7c5;
    color: #2b2622;
    border: 2px solid #2b2622;
    border-radius: 5px;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

#switch-map-btn:hover,
#help-btn:hover {
    background-color: #d6c8b1;
}

#switch-map-btn:active,
#help-btn:active {
    transform: scale(0.98);
}

.btn {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.btn-slate {
    background-color: #e3d7c5 !important;
    color: #2b2622 !important;
    font-weight: 700;
    padding: 0.5rem;
}

.btn-slate:hover {
    background-color: #d6c8b1 !important;
}

.btn-emerald {
    background-color: #e3d7c5 !important;
    color: #2b2622 !important;
    font-weight: 700;
    padding: 0.5rem 1.125rem;
}

.btn-emerald:hover {
    background-color: #d6c8b1 !important;
    color: #2b2622 !important;
}

.btn-danger-soft {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.btn-danger-soft:hover {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.btn-text {
    display: none;
}

.btn-link {
    background: none;
    border: none;
    font-size: 11px;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-circle-add {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #e3d7c5;
    color: rgba(25, 25, 25, 0.85);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.btn-circle-add:hover {
    background-color: #f1d8b4;
    transform: scale(1.1);
}

.btn-icon-close {
    background: transparent;
    border: none;
    color: #e3d7c5;
    padding: 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.btn-icon-close:hover {
    color: #ffffff;
    background: transparent;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
}

.btn-row {
    display: flex;
    gap: 0.5rem;
}

.justify-end {
    justify-content: flex-end;
}

.main-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #000000;
    display: flex;
}

.filter-dropdown-wrapper {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    width: 45px;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    transition: none;
    box-sizing: border-box;
}

.filter-dropdown-wrapper.open {
    width: 280px;
}

.btn-filter-toggle {
    position: relative;
    background-color: transparent;
    border: 2px solid #2b2622;
    padding: 0;
    display: flex;
    border-radius: 2px 2px 0 0;
    align-items: center;
    cursor: pointer;
    width: 100%;
    height: 45px;
    box-sizing: border-box;
}

.key-cap-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 41px;
    height: 41px;
    background-color: #e3d7c5;
    border-radius: 2px 2px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: 2;
    flex-shrink: 0;
    transition: border-radius 0.1s ease;
}

.key-cap-inner {
    width: 24px;
    height: 24px;
    background-color: #38322e;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#active-filter-badge {
    color: #e3d7c5;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: sans-serif;
    line-height: 1;
    background: transparent;
    border: none;
    padding: 0;
}

#filter-btn-text,
.filter-btn-text {
    display: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #2b2622;
    white-space: nowrap;
}

.filter-dropdown-wrapper.open .btn-filter-toggle {
    background-color: #e3d7c5;
    border-color: #2b2622;
    border-radius: 4px 4px 0 0;
    height: 45px;
    padding: 0;
    box-sizing: border-box;
}

.filter-dropdown-wrapper.open .key-cap-outer {
    background-color: transparent;
    border: none; 
    border-radius: 0;
}

.filter-dropdown-wrapper.open #filter-btn-text,
.filter-dropdown-wrapper.open .filter-btn-text {
    display: inline-block;
    position: absolute;
    left: 50px; 
    top: 50%;
    transform: translateY(-50%);
}

.filter-panel {
    position: relative;
    width: 45px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(8px);
    margin-top: 0;
    padding: 8px 0;
    border-radius: 0 0 4px 4px;
    z-index: 30;
    display: flex !important;
    flex-direction: column;
    max-height: calc(100vh - 100px);
    box-sizing: border-box;
}

.filter-dropdown-wrapper.open .filter-panel {
    width: 100%; 
}

.animal-filter-list {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.filter-item {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 10px;
    cursor: pointer;
    background-color: transparent !important;
    color: #64748b;
    width: 100%;
    box-sizing: border-box;
    transition: color 0.15s ease;
}

.filter-item-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
}

.filter-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.filter-item-icon img,
.filter-item-icon i,
.filter-item-icon svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.filter-item-name,
.filter-item-checkbox,
.filter-item input[type="checkbox"] {
    display: none;
}

.filter-dropdown-wrapper.open .filter-item-name {
    display: inline-block !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.filter-item:hover {
    background-color: transparent !important;
}

.filter-dropdown-wrapper.open .filter-item.active,
.filter-dropdown-wrapper.open .filter-item:has(input:checked) {
    background-color: transparent !important;
}

.filter-dropdown-wrapper.open .filter-item.active .filter-item-name,
.filter-dropdown-wrapper.open .filter-item:has(input:checked) .filter-item-name {
    color: #ffffff !important;
}

.h-divider {
    height: 1px;
    background-color: #1e293b;
}

.form-select {
    background-color: #2b2622;
    font-size: 0.75rem;
    border-radius: 0.75rem;
    padding: 0.25rem 0.625rem;
    color: #ffffff;
    outline: none;
}

.form-select:focus {
    border-color: #0c0c0c;
}

.zoom-controls {
    position: absolute;
    bottom: 5rem;
    right: 1.5rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    background-color: #2b2622;
    padding: 0.375rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.btn-zoom {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e3d7c5;
    color: #2b2622;
    border: 2px solid #2b2622;
    border-radius: 4px;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}

.btn-zoom:hover {
    background-color: #d6c8b1;
    color: #2b2622;
}

.btn-zoom:active {
    transform: scale(0.95);
}

.btn-zoom i {
    font-size: 0.9rem;
    font-weight: bold;
}

.map-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: grab;
    touch-action: none; /* Omogoča krmiljenje gest na telefonu brez odloga */
}

.map-viewport:active {
    cursor: grabbing;
}

#map-canvas-container {
    position: absolute;
    transform-origin: 0 0;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.map-background {
    position: relative;
    display: inline-block;
    background-color: black !important;
    user-select: none;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.markers-layer {
    position: absolute;
    inset: 0;
    pointer-events: auto;
}

.map-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(calc(var(--zoom-scale, 1) * 1.3)) !important;
    filter: none !important;
    z-index: 10000 !important;
}

.marker-struct {
    width: 2.5rem;
    height: 2.5rem;
    z-index: 10;
    cursor: default;
}

.marker-zone {
    width: 1.25rem;
    height: 1.25rem;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    transform: translate(-50%, -50%) scale(var(--zoom-scale, 1));
    animation: zonePopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.marker-animal {
    width: 2rem;
    height: 2rem;
    z-index: 20;
}

.marker-tooltip {
    position: absolute;
    bottom: 100%;
    margin-bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 18, 0.98) !important;
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.6rem;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #2b2622;
    box-shadow: none !important;
    filter: none !important;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999 !important;
    pointer-events: none;
    width: max-content;
    max-width: min(170px, 60vw);
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
}

.badge-fur {
    font-size: 7px;
    padding: 1px 3px;
    background-color: #2b2622;
    border-radius: 2px;
    color: #e3d7c5;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background-color: #121212;
    border: 2px solid #2b2622;
    width: 100%;
    max-width: 32rem;
    border-radius: 6px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-card-sm {
    max-width: 28rem;
}

.modal-header {
    background-color: rgba(25, 25, 25, 0.85);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #2b2622;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    padding-right: 0.5rem;
}

.modal-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 4px;
    background-color: rgba(43, 38, 34, 0.1);
    border: 1px solid #2b2622;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2b2622;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.modal-icon-wrapper img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.modal-header-title {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #2b2622;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    background-color: #121212;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #2b2622;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.subtext {
    font-size: 10px;
    color: #64748b;
}

.form-input {
    background-color: rgba(25, 25, 25, 0.85);
    border: 1px black solid;
    border-radius: 0.75rem;
    padding: 0.25rem 0.75rem;
    color: #ffffff;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
}

.form-input:focus {
    border-color: #050505;
}

.form-textarea {
    width: 100%;
    background-color: rgba(25, 25, 25, 0.85);
    border: 2px solid #2b2622;
    border-radius: 1rem;
    padding: 0.75rem;
    font-size: 0.75rem;
    color: #e3d7c5;
    outline: none;
    transition: border-color 0.2s ease;
    resize: none;
    font-family: inherit;
}

.form-textarea::placeholder {
    color: #475569;
}

.form-textarea:focus {
    border-color: #bfbfbf;
}

.herd-animals-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 12rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.empty-herd-msg {
    font-size: 0.75rem;
    color: #c2c2c2;
    font-style: italic;
    padding: 0.75rem 0;
    text-align: center;
    background-color: rgba(25, 25, 25, 0.85);
    border-radius: 0.75rem;
    border: 1px solid rgba(30, 41, 59, 0.5);
}

.herd-animal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(25, 25, 25, 0.85);
    border: 2px solid #2b2622;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
}

.herd-animal-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.herd-stars-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
}

.herd-star-icon {
    color: #94a3b8;
    font-size: 0.65rem;
}

.herd-animal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon-action {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.25rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-icon-action:hover {
    color: #34d399;
}

.btn-icon-action.delete:hover {
    color: #f87171;
}

.add-animal-card {
    background-color: rgba(25, 25, 25, 0.85);
    border: 1px solid #000000;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.border-bottom {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1e293b;
}

.card-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.full-width {
    width: 100%;
}

.form-label {
    font-size: 11px;
    color: #94a3b8;
    display: block;
    margin-bottom: 0.25rem;
}

.slider-box {
    background-color: rgba(25, 25, 25, 0.85);
    padding: 0.625rem;
    border-radius: 0.75rem;
    border: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.range-slider {
    width: 100%;
    height: 0.375rem;
    background-color: #080808;
    border-radius: 0.5rem;
    appearance: none;
    cursor: pointer;
    accent-color: #e3e2ae;
}

.badge-fitness {
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: 700;
    color: #e3d7c5;
}

.input-with-unit {
    position: relative;
    display: flex;
    background-color: (25, 25, 25, 0.85);
    align-items: center;
    padding-top: 0.25rem;
}

.input-with-unit input {
    padding-right: 2rem;
    font-size: 0.75rem;
    background-color: (25, 25, 25, 0.85);
}

.unit-symbol {
    position: absolute;
    right: 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
}

.color-preset-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: rgba(25, 25, 25, 0.85);
    padding: 0.875rem;
    border-radius: 1rem;
    border: 1px solid #1e293b;
}

.color-presets-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.25rem;
}

.color-buttons {
    display: flex;
    gap: 0.75rem;
}

.color-preset-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.color-preset-btn:hover {
    transform: scale(1.1);
}

.color-preset-btn.active {
    box-shadow: 0 0 0 2px #ffffff;
    transform: scale(1.1);
}

.bg-red { background-color: #ef4444; }
.bg-orange { background-color: #f97316; }
.bg-yellow { background-color: #eab308; }
.bg-green { background-color: #22c55e; }
.bg-blue { background-color: #3b82f6; }
.bg-white { background-color: #ffffff; }

.color-hex-text {
    font-size: 0.75rem;
    font-family: monospace;
    color: #94a3b8;
}

.guide-body {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-box {
    background-color: rgba(25, 25, 25, 0.85);
    padding: 0.875rem;
    border-radius: 4px;
    border: 1px solid #2b2622;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.guide-title {
    color: #e3d7c5 !important;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-card-map-select {
    max-width: 48rem;
}

.map-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.map-card-item {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.map-card-item:hover {
    transform: translateY(-4px);
    border-color: #10b981;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
}

.map-card-img-wrapper {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background-color: #020617;
}

.map-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-card-info {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.map-card-info h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
}

.map-card-info p {
    font-size: 0.75rem;
    color: #94a3b8;
}

.map-card-badge {
    margin-top: 0.5rem;
    align-self: flex-start;
    font-size: 10px;
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.custom-context-menu {
    position: fixed;
    z-index: 9999;
    background-color: rgba(25, 25, 25, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 180px;
}

.custom-context-menu button {
    background: transparent;
    border: none;
    color: #d6c8b1 !important;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s ease;
}

.custom-context-menu button:hover {
    background-color: rgba(25, 25, 25, 0.9);
    color: #dec9a6 !important;
}

@keyframes zonePopIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(calc(var(--zoom-scale, 1) * 1.15));
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(var(--zoom-scale, 1));
        opacity: 1;
    }
}

.modal-card-lg.codex-card {
    max-width: 56rem;
    padding: 1rem;
    background-color: #121212;
    border: 2px solid #2b2622;
    border-radius: 6px;
}

.codex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #e3d7c5;
    border: 2px solid #2b2622;
    border-radius: 4px;
    margin-bottom: 1.25rem;
}

.codex-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.codex-tier-badge {
    background: #2b2622;
    color: #e3d7c5;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #2b2622;
    letter-spacing: 0.05em;
}

.codex-main-title {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2b2622;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.codex-latin-name {
    font-size: 0.8rem;
    color: #5c534c;
    font-style: italic;
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.codex-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 200px;
    gap: 1.5rem;
}

.codex-section {
    margin-bottom: 1.25rem;
    background-color: rgba(25, 25, 25, 0.85);
    padding: 0.875rem;
    border-radius: 4px;
    border: 1px solid #2b2622;
}

.codex-section h4 {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e3d7c5;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.375rem;
}

.codex-section p {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.codex-list {
    list-style-type: disc;
    padding-left: 1.25rem;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.stat-box {
    background-color: rgba(25, 25, 25, 0.85);
    border: 2px solid #2b2622;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
}

.stat-box span {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 0.75rem;
    color: #e3d7c5;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stat-box strong {
    font-family: 'Oswald', 'Arial Narrow', sans-serif;
    font-size: 1.125rem;
    color: #ffffff;
    font-weight: 700;
    margin-top: 0.25rem;
    letter-spacing: 0.03em;
}

/* ODZIVNOST ZA MOBILNE NAPRAVE (<768px) */
@media (max-width: 768px) {
    .header-title {
        font-size: 0.8rem;
    }

    .modal-card,
    .modal-card-sm,
    .modal-card-lg.codex-card {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0;
        max-height: 100vh;
    }

    .codex-grid-layout {
        grid-template-columns: 1fr;
    }

    .grid-2-cols {
        grid-template-columns: 1fr;
    }

    .filter-dropdown-wrapper.open {
        width: calc(100vw - 2rem);
    }
}

@media (min-width: 640px) {
    .header-title {
        font-size: 1rem;
    }

    .header-subtitle {
        display: block;
    }

    .btn-text {
        display: inline;
    }
}

.marker-star-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 18, 0.85);
    border-radius: 9999px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 25;
    white-space: nowrap;
}

.marker-star-badge i {
    color: #facc15 !important;
    font-size: 0.55rem !important;
}