/* NewStuff — Minimal Dark */

* { margin:0; padding:0; box-sizing:border-box; }

:root {
    --bg: #0d0d0d;
    --surface: #161616;
    --surface2: #1c1c1c;
    --border: #252525;
    --text: #e8e8e8;
    --dim: #888;
    --faint: #555;
    --accent: #7c5cfc;
    --accent2: #6347d4;
    --accent-glow: rgba(124,92,252,.15);
    --green: #34d399;
    --yellow: #fbbf24;
    --blue: #60a5fa;
    --red: #f87171;
    --radius: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent2); }

/* Nav */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(8px);
}
.nav-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--accent); }
.nav-by {
    font-weight: 400;
    font-size: .75rem;
    color: var(--faint);
    letter-spacing: 0;
}
.nav-right { display: flex; align-items: center; gap: .6rem; }

.admin-pill {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
    background: var(--accent-glow);
    padding: .15rem .5rem;
    border-radius: 99px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--dim);
    font: inherit;
    font-size: .8rem;
    cursor: pointer;
    transition: color .15s;
}
.link-btn:hover { color: var(--text); }

/* Main */
main {
    flex: 1;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}
h1 a { color: var(--text); }
h1 a:hover { color: var(--accent); }
h1 small { font-weight: 400; font-size: .7em; color: var(--dim); }

.muted { color: var(--dim); font-size: .85rem; }
.small { font-size: .8rem; }
.desc { color: var(--dim); font-size: .85rem; margin-top: .25rem; }

/* Back */
.back {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--dim);
    font-size: .85rem;
    margin-bottom: 1.5rem;
    transition: color .15s;
}
.back:hover { color: var(--text); }

/* Pill */
.pill {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    padding: .15rem .6rem;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
}
.pill-sm { font-size: .7rem; padding: .1rem .5rem; }

/* Site Header */
.site-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: .6rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--dim);
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Admin Form */
.admin-form {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .7rem;
    color: var(--text);
    font: inherit;
    font-size: .875rem;
    width: 100%;
    transition: border-color .15s;
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--accent);
}
.admin-form textarea { resize: vertical; min-height: 48px; }
.admin-form select {
    width: auto;
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: .5rem;
    align-items: center;
}

/* Changelog form items */
.changelog-items {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.changelog-item-row {
    display: flex;
    gap: .4rem;
    align-items: center;
}
.changelog-item-row input {
    flex: 1;
}
.remove-item-btn {
    background: none;
    border: none;
    color: var(--faint);
    font-size: 1.1rem;
    cursor: pointer;
    padding: .2rem .4rem;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s;
}
.remove-item-btn:hover { color: var(--red); }

.add-item-btn {
    background: none;
    border: 1px dashed var(--border);
    border-radius: 6px;
    padding: .35rem .7rem;
    color: var(--dim);
    font: inherit;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
    align-self: flex-start;
}
.add-item-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .45rem 1rem;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.btn:hover { background: var(--accent2); }

/* Items / Features */
.item {
    border-bottom: 1px solid var(--border);
    padding: .85rem 0;
}
.item:last-child { border-bottom: none; }

.item-main {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
}
.item-text {
    flex: 1;
    min-width: 0;
}
.item-text strong {
    font-size: .9rem;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}
.dot-planned { background: var(--yellow); }
.dot-progress { background: var(--blue); }
.dot-completed { background: var(--green); }

.badge {
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-planned { background: rgba(251,191,36,.12); color: var(--yellow); }
.badge-progress { background: rgba(96,165,250,.12); color: var(--blue); }
.badge-completed { background: rgba(52,211,153,.12); color: var(--green); }

.item-admin {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .4rem;
    padding-left: calc(8px + .65rem);
}
.item-admin select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .2rem .4rem;
    color: var(--text);
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
}
.item-admin select:focus { outline: none; border-color: var(--accent); }

.inline { display: inline; }

.del-btn {
    background: none;
    border: none;
    color: var(--faint);
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
    padding: .1rem .3rem;
    transition: color .15s;
}
.del-btn:hover { color: var(--red); }

/* Timeline / Changelog */
.timeline { padding-left: 1.25rem; border-left: 2px solid var(--border); }

.tl-entry {
    position: relative;
    padding: 0 0 1.75rem 1.25rem;
}
.tl-entry:last-child { padding-bottom: 0; }

.tl-marker {
    position: absolute;
    left: -1.25rem;
    top: .35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--faint);
    transform: translateX(-50%);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 2px var(--border);
}
.tl-latest {
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.tl-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}
.tl-body strong { font-size: .9rem; }
.tl-body .desc { margin-top: .2rem; }

/* Changelog items list */
.cl-items {
    margin-top: .4rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.cl-item {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    font-size: .85rem;
    color: var(--text);
    line-height: 1.4;
}
.cl-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    margin-top: 1px;
    opacity: .7;
}
.cl-items-hidden { display: none; }
.cl-items-hidden.show { display: flex; flex-direction: column; gap: .25rem; }

.cl-expand {
    background: none;
    border: none;
    color: var(--dim);
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
    padding: .2rem 0;
    margin-top: .2rem;
    transition: color .15s;
}
.cl-expand:hover { color: var(--accent); }

/* Site List */
.site-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.site-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.site-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow);
    color: var(--text);
}

.site-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .25rem;
}
.site-card-top strong { font-size: .95rem; }

.mini-bar {
    height: 3px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin: .6rem 0 .35rem;
}
.mini-fill {
    height: 100%;
    background: var(--green);
    border-radius: 99px;
    transition: width .3s ease;
}

.site-card-stats {
    display: flex;
    gap: .75rem;
    font-size: .75rem;
    color: var(--dim);
}
.site-card-stats .dot { display: inline-block; width: 6px; height: 6px; margin-right: .25rem; vertical-align: middle; margin-top: 0; }

.site-card-admin {
    margin-top: .6rem;
    padding-top: .5rem;
    border-top: 1px solid var(--border);
}

/* Widget preview */
.widget-preview {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .75rem 1rem;
    font-size: .75rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--dim);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Empty */
.empty {
    text-align: center;
    color: var(--faint);
    padding: 2rem 0;
    font-size: .9rem;
}

/* Landing */
.landing {
    text-align: center;
    padding: 5rem 1rem 4rem;
}
.landing-icon {
    color: var(--faint);
    margin-bottom: 1.5rem;
    opacity: .4;
}
.landing h1 {
    font-size: 1.2rem;
    color: var(--dim);
    margin-bottom: .5rem;
}
.landing p {
    color: var(--faint);
    font-size: .9rem;
}
.landing-actions {
    margin-top: 2rem;
    display: flex;
    gap: .75rem;
    justify-content: center;
}

/* Footer */
footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: .75rem;
    color: var(--faint);
    background: var(--surface);
}
footer a { color: var(--faint); }
footer a:hover { color: var(--text); }

/* Dialog */
dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--text);
    max-width: 340px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
dialog::backdrop { background: rgba(0,0,0,.7); }
dialog h2 { font-size: 1rem; margin-bottom: 1rem; font-weight: 700; }
dialog input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .7rem;
    color: var(--text);
    font: inherit;
    font-size: .875rem;
    width: 100%;
    transition: border-color .15s;
}
dialog input:focus { outline: none; border-color: var(--accent); }

/* Suggest Section */
.suggest-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.suggest-section h3 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dim);
    margin-bottom: .75rem;
}
.suggest-form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.suggest-form input,
.suggest-form textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem .7rem;
    color: var(--text);
    font: inherit;
    font-size: .875rem;
    width: 100%;
    transition: border-color .15s;
}
.suggest-form input:focus,
.suggest-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.suggest-form textarea { resize: vertical; min-height: 48px; }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-sm {
    padding: .3rem .7rem;
    font-size: .8rem;
}

.success-msg {
    color: var(--green);
    font-size: .85rem;
    margin-bottom: .75rem;
    padding: .4rem .6rem;
    background: rgba(52,211,153,.08);
    border-radius: 6px;
}

.suggestion-item {
    border-left: 3px solid var(--yellow);
    padding-left: .75rem;
    margin-bottom: .5rem;
}

/* Responsive */
@media (max-width: 600px) {
    nav { padding: .75rem 1rem; }
    main { padding: 1.5rem 1rem; }
    .form-row { flex-direction: column; }
    .form-row .btn, .form-row select { width: 100%; }
    .site-header { flex-direction: column; }
    .nav-right { gap: .4rem; }
    .landing-actions { flex-direction: column; align-items: center; }
}
