/* ============================================================
   GuitarStory — stil neutru tehnic
   Fara framework. Fara build. Un singur fisier.
   ============================================================ */

/* --- Variabile: schimbi aici, se schimba peste tot --- */
:root {
    --bg:            #f5f6f8;   /* fundalul paginii */
    --surface:       #ffffff;   /* carduri, blocuri */
    --border:        #e1e4e8;
    --border-strong: #d0d7de;

    --text:          #24292f;   /* text principal */
    --text-muted:    #656d76;   /* metadate, timestamp-uri */
    --text-faint:    #8b949e;

    --link:          #0969da;
    --link-hover:    #0550ae;

    --accent:        #1f6feb;
    --accent-soft:   #ddf4ff;

    --add-bg:        #e6ffec;   /* diff: linie adaugata */
    --add-border:    #abf2bc;
    --del-bg:        #ffebe9;   /* diff: linie stearsa */
    --del-border:    #ffc1c0;

    --radius:        6px;
    --shadow:        0 1px 3px rgba(27, 31, 36, 0.04);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --- Reset minimal --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Doua coloane: continut + sidebar. Pe mobil se aliniaza vertical. */
.layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    margin: 24px 0;
    align-items: start;
}

@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; }
}

/* --- Header --- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 56px;
}

.logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
    white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--accent); }
.logo span { color: #3b3c3f; }

.nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    align-items: center;
}

.nav a {
    padding: 6px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}
.nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--bg); }

/* --- Card: blocul de baza --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.card-tight { padding: 14px 16px; }

.sidebar .card { padding: 16px; }
.sidebar h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ============================================================
   COMPONENTE
   ============================================================ */

/* --- Tag-uri --- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    font-size: 12.5px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}
.tag:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.tag .count {
    font-size: 11px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

/* --- Butoane --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--bg); text-decoration: none; }

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

.btn-sm { padding: 3px 10px; font-size: 13px; }

/* --- Metadate: "acum 2 ore · v3 · Admin" --- */
.meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}
.meta .sep { color: var(--border-strong); }

/* --- Formulare --- */
.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.field .hint {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%;
    padding: 7px 11px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea { resize: vertical; min-height: 300px; line-height: 1.7; }

.error { color: #cf222e; font-size: 13px; margin-top: 4px; }

/* --- Alerte --- */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid;
}
.alert-info    { background: var(--accent-soft); border-color: #b6e3ff; color: #0550ae; }
.alert-success { background: var(--add-bg);      border-color: var(--add-border); color: #116329; }
.alert-error   { background: var(--del-bg);      border-color: var(--del-border); color: #a40e26; }

/* ============================================================
   PAGINI
   ============================================================ */

/* --- Lista de articole --- */
.article-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.article-item:last-child { border-bottom: none; }

.article-item h2 { font-size: 18px; margin-bottom: 6px; }
.article-item h2 a { color: var(--text); }
.article-item h2 a:hover { color: var(--accent); text-decoration: none; }

.article-item .excerpt {
    color: var(--text-muted);
    font-size: 14px;
    margin: 6px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Continutul unui articol --- */
.prose { font-size: 16px; line-height: 1.75; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose blockquote {
    margin: 1.2em 0;
    padding: 2px 0 2px 16px;
    border-left: 3px solid var(--border-strong);
    color: var(--text-muted);
}
.prose code {
    font-family: var(--mono);
    font-size: 13.5px;
    background: var(--bg);
    padding: 2px 5px;
    border-radius: 3px;
}

/* --- Fisa chitaristului --- */
.guitarist-header {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 640px) {
    .guitarist-header { grid-template-columns: 1fr; }
}

.guitarist-photo {
    width: 140px;
    height: 140px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg);
    border: 1px solid var(--border);
}
.guitarist-photo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 700;
    color: var(--text-faint);
}

.guitarist-header h1 { margin-bottom: 2px; }
.guitarist-header .real-name {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Tabelul de date structurate (nascut, tara, chitara...) */
.facts {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 14px;
}
.facts th, .facts td {
    text-align: left;
    padding: 7px 0;
    vertical-align: top;
    border-top: 1px solid var(--border);
}
.facts th {
    width: 130px;
    font-weight: 500;
    color: var(--text-muted);
}
.facts tr:first-child th, .facts tr:first-child td { border-top: none; }

/* --- Lista chitaristi --- */
.guitarist-list { display: flex; flex-direction: column; }

.guitarist-row {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.guitarist-row:last-child { border-bottom: none; }

.guitarist-row .avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-faint);
    flex-shrink: 0;
}
.guitarist-row .name { font-weight: 600; }
.guitarist-row .name a { color: var(--text); }
.guitarist-row .name a:hover { color: var(--accent); text-decoration: none; }

/* --- Filtre --- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.filters select, .filters input {
    width: auto;
    min-width: 120px;
    font-size: 13.5px;
    padding: 5px 9px;
}

/* ============================================================
   ISTORIC + DIFF — semnatura proiectului
   ============================================================ */

.revision-list { font-size: 14px; }

.revision-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.revision-row:last-child { border-bottom: none; }

.revision-version {
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 600;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1px 8px;
    color: var(--text-muted);
    flex-shrink: 0;
}
.revision-row.current .revision-version {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.revision-summary { flex: 1; min-width: 0; }
.revision-summary .text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.revision-summary .text.empty { color: var(--text-faint); font-style: italic; }

/* Statisticile "+12 -3", ca pe GitHub */
.diffstat {
    font-family: var(--mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}
.diffstat .add { color: #1a7f37; }
.diffstat .del { color: #cf222e; }

/* --- Diff-ul propriu-zis --- */
.diff {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.6;
    background: var(--surface);
    margin-bottom: 16px;
}

.diff-header {
    padding: 7px 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.diff-line {
    display: flex;
    border-left: 3px solid transparent;
}

.diff-line .marker {
    width: 26px;
    flex-shrink: 0;
    text-align: center;
    color: var(--text-faint);
    user-select: none;
    border-right: 1px solid var(--border);
}

.diff-line .content {
    padding: 1px 10px;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
}

.diff-line.add {
    background: var(--add-bg);
    border-left-color: var(--add-border);
}
.diff-line.add .marker { color: #1a7f37; }

.diff-line.del {
    background: var(--del-bg);
    border-left-color: var(--del-border);
}
.diff-line.del .marker { color: #cf222e; }

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

/* --- Contributori --- */
.contributor {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13.5px;
}
.contributor .edits {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-faint);
}

/* ============================================================
   AUTOCOMPLETE TAG-URI (jQuery)
   ============================================================ */

.tag-input { position: relative; }

.tag-input .chosen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 26px;
}

.tag-input .chosen .tag {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    padding-right: 4px;
}

.tag-input .chosen .remove {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--accent);
    font-size: 15px;
    line-height: 1;
    padding: 0 3px;
    opacity: .6;
}
.tag-input .chosen .remove:hover { opacity: 1; }

.tag-input .suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 3px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(27, 31, 36, .12);
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}

.tag-input .suggestions li {
    list-style: none;
    padding: 7px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.tag-input .suggestions li:hover,
.tag-input .suggestions li.highlighted { background: var(--accent-soft); }

.tag-input .suggestions li .count {
    font-size: 12px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.tag-input .suggestions ul { margin: 0; padding: 0; }

.tag-input .suggestions .new-tag {
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border);
}

/* ============================================================
   PAGINARE
   ============================================================ */

.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin: 24px 0;
    list-style: none;
    padding: 0;
}

.pagination li a, .pagination li span {
    display: block;
    padding: 5px 11px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-muted);
}
.pagination li a:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.pagination li.active span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination li.disabled span { color: var(--text-faint); background: var(--bg); }

/* ============================================================
   FOOTER
   ============================================================ */

/* Footer styling */
.site-footer {
    margin-top: 60px;
    padding: 40px 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

.footer-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-content {
    text-align: center;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    line-height: 1.6;
}

.footer-credit {
    margin-top: 10px;
    font-size: 12px;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .footer-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-credit {
        text-align: center;
    }
}

/* --- Utilitare --- */
.muted  { color: var(--text-muted); }
.faint  { color: var(--text-faint); }
.small  { font-size: 13px; }
.mono   { font-family: var(--mono); }
.mt-0   { margin-top: 0; }
.mb-0   { margin-bottom: 0; }
.mt-16  { margin-top: 16px; }
.mb-16  { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
