/* ==========================================================================
   1. SREDIŠČNE SPREMENLJIVKE IN TEMELJNI STILI
   ========================================================================== */
:root {
    --bg-black: #000000;
    --bg: #0d0d10;
    --panel: #141b29;
    --amber: #f2cc5a;
    --text: #e8e0d0;
    --green: #4cdb7a;
    --border-color: #2a2a35;
    --text-muted: #888999;
    --danger-color: #a32a2a;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-black);
    color: var(--text);
    font-family: 'Segoe UI', -apple-system, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Grafična podoba ozadja */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('ozadje.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-black);
    opacity: 0.85;
    z-index: -1;
}

h1, h2, h3, h4 {
    font-family: "Georgia", serif;
    color: var(--amber);
    margin-top: 0;
    font-weight: 700;
}

/* ==========================================================================
   2. STRANSKA VRSTICA (SIDEBAR) IN ISKALNIK
   ========================================================================== */
#sidebar {
    width: 350px;
    min-width: 320px;
    background: var(--panel);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    z-index: 10;
}

#sidebar h2 {
    font-size: 1.4rem;
    border-bottom: 2px solid var(--amber);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.search-row {
    display: flex;
    gap: 8px;
}

.search-container input, .search-container select {
    flex: 1;
    padding: 10px;
    border: 1px solid #445;
    border-radius: 6px;
    background: var(--bg);
    color: var(--amber);
    font-family: inherit;
    font-weight: bold;
    outline: none;
}

#musician-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

#musician-list li {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 12px;
}

#musician-list li:hover {
    background-color: var(--bg);
    color: var(--amber);
}

/* ==========================================================================
   3. OSREDNJI DEL (MAIN CONTENT) IN PROFIL
   ========================================================================== */
#main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#placeholder-text {
    margin: auto;
    text-align: center;
    background: var(--panel);
    padding: 40px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    max-width: 500px;
}

.content-panel {
    background: var(--panel);
    padding: 35px;
    border-radius: 35px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Glava profila s poravnavo gumba Možnosti na skrajno desno */
.header-with-avatar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    width: 100%;
}

#profile-settings-container {
    margin-left: auto; /* Poravna celoten vsebnik gumba vedno skrajno desno */
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--amber);
    object-fit: cover;
    background: #252e42;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-with-avatar .avatar-large {
    width: 80px;
    height: 80px;
    border: 3px solid var(--amber);
    box-shadow: 0 0 15px rgba(242, 204, 90, 0.3);
}

.avatar-placeholder {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.meta-dates {
    font-family: "Georgia", serif;
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.summary-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
    color: var(--text);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

/* ==========================================================================
   4. ELEMENTI ČASOVNICE (TIMELINE)
   ========================================================================== */
.timeline-container {
    margin-top: 24px;
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #334;
    text-align: left;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-right: 100px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--amber);
    border: 2px solid var(--panel);
    box-shadow: 0 0 8px var(--amber);
}

.timeline-header {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.timeline-year {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--amber);
}

.timeline-location {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    cursor: pointer;
}

.timeline-location:hover {
    color: var(--amber);
}

.timeline-age {
    font-size: 0.8rem;
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--green);
    font-weight: 600;
    border: 1px solid #223;
}

.timeline-author {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--amber);
    margin-right: 6px;
}

.timeline-actions {
    position: absolute;
    right: 0;
    top: 2px;
    display: flex;
    gap: 4px;
}

.person-link {
    color: var(--amber);
    text-decoration: none;
    border-bottom: 1px dashed var(--amber);
    font-weight: 600;
    cursor: pointer;
}

.person-link:hover {
    background-color: var(--bg);
    border-bottom-style: solid;
}

/* ==========================================================================
   5. GUMBI IN SPLOŠNI OBRAZCI
   ========================================================================== */
button {
    font-family: inherit;
    background-color: var(--amber);
    color: #000;
    border: none;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
}

button:hover { 
    opacity: 0.9;
    box-shadow: 0 0 10px var(--amber);
}

button.secondary { 
    background-color: var(--bg); 
    color: var(--amber); 
    border: 1px solid #445; 
}

button.secondary:hover { 
    background-color: #141b29; 
    box-shadow: none;
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 5px; }

.btn-action {
    background: none;
    color: var(--text-muted);
    padding: 4px 8px;
    font-size: 0.85rem;
    border-radius: 5px;
    border: none;
}

.btn-action:hover { background: var(--bg); color: var(--amber); box-shadow: none; }
.btn-delete:hover { color: var(--danger-color); }

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

label {
    display: block;
    font-size: 10px;
    color: #889;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: bold;
}

input, textarea, select { 
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box; 
    border: 1px solid #445; 
    border-radius: 6px; 
    background: var(--bg);
    color: var(--text);
    font-family: inherit; 
    outline: none;
}

textarea {
    line-height: 1.5;
    resize: vertical;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--amber);
}

.backup-zone {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   6. MODALNA OKNA IN SPUSTNA ORODJA
   ========================================================================== */
.modal-bg { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 100; overflow-y: auto; }
.modal-content { background: var(--panel); padding: 24px; border-radius: 20px; width: 90%; max-width: 580px; border: 1px solid var(--border-color); margin: 20px auto; }
.link-tool-container { display: flex; gap: 8px; background: var(--bg); padding: 10px; border: 1px solid #445; border-radius: 8px; margin-bottom: 12px; align-items: center;}

.modal-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.modal-tab { background: none; color: var(--text-muted); border: none; padding: 6px 12px; font-size: 0.9rem; border-radius: 4px; }
.modal-tab.active { background: var(--bg); color: var(--amber); font-weight: bold; }

.extracted-row { background: var(--bg); padding: 10px; border-radius: 6px; margin-bottom: 8px; border: 1px solid #334; display: flex; gap: 8px; align-items: center; }
.extracted-row input[type="text"] { padding: 6px; font-size: 0.85rem; }

/* ==========================================================================
   7. NAPREDNI MOBILNI STILI - PREKLOP STRANI NA TELEFONU
   ========================================================================== */
@media (max-width: 768px) {
    body { 
        flex-direction: column; 
        height: auto; 
        overflow: auto; 
    }

    #sidebar, #main-content { 
        width: 100% !important; 
        height: auto; 
        border: none; 
    }

    #main-content {
        display: none;
    }

    #sidebar.mobilno-skrij {
        display: none !important;
    }

    #main-content.mobilno-prikaži {
        display: block !important;
        padding: 16px 8px;
    }

    .content-panel { 
        padding: 20px 12px; 
        border-radius: 20px; 
    }
    .timeline-item { 
        padding-right: 0; 
    }
    .timeline-actions { 
        position: relative; 
        margin-top: 6px; 
        justify-content: flex-start; 
    }
    .form-group-row {
        flex-direction: column;
        gap: 12px;
    }
}

/* ==========================================================================
   8. ELEGANTEN SPUSTNI MENI PROFILA - PC IN TELEFON
   ========================================================================== */
.dropdown-container {
    position: relative;
    display: inline-block;
}

#profile-settings-btn {
    background-color: var(--bg);
    color: var(--amber);
    border: 1px solid #445;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

#profile-settings-btn:hover {
    background-color: var(--panel);
    box-shadow: 0 0 8px rgba(242, 204, 90, 0.2);
}

.dropdown-menu {
    display: none !important; 
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--panel) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7) !important;
    z-index: 9999 !important;
    min-width: 220px;
    padding: 8px 0 !important;
}

.dropdown-menu.prikazi-meni {
    display: flex !important;
    flex-direction: column !important;
}

.dropdown-menu button {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    background: none !important;
    color: var(--text) !important;
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
    font-weight: normal !important;
    cursor: pointer;
    border-radius: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu button:hover {
    background-color: var(--bg) !important;
    color: var(--amber) !important;
}

.dropdown-menu button.delete-option {
    color: #ff5555 !important;
    border-top: 1px solid var(--border-color) !important;
    margin-top: 4px !important;
}

.dropdown-menu button.delete-option:hover {
    background-color: rgba(255, 85, 85, 0.15) !important;
    color: #ff8888 !important;
}

/* ==========================================================================
   9. POMOŽNI RAZREDI
   ========================================================================== */
.hidden { display: none !important; }

#back-btn {
    display: none; 
}

#journey-map {
    height: 350px !important;
    width: 100% !important;
    background: #111827; /* Temno ozadje, da vidiš, če je sploh tam */
}

/* Stil za diskretne ocene in avtorja na časovnici */
.event-meta-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Skrita informacija o avtorju, ki se pojavi ob kliku/hoverju */
.event-author-hidden {
    cursor: help;
    border-bottom: 1px dotted var(--text-muted);
}
.event-author-hidden:hover {
    color: var(--amber);
}

/* Diskretni gumbi za ocenjevanje */
.rating-buttons {
    display: flex;
    gap: 6px;
}
.btn-rate {
    background: none;
    border: 1px solid #334;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-rate:hover {
    box-shadow: none;
}

/* Vizualni indikatorji glede na trenutno oceno dogodka */
.status-resnicno { color: var(--green); border-color: rgba(76, 219, 122, 0.3); }
.status-vprasljivo { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.status-napacno { color: var(--danger-color); border-color: rgba(163, 42, 42, 0.3); }