/* Quiet — stylesheet
   Dark theme, single-column feed, no external CSS framework.*/

:root {
    --bg: #0f1115;
    --bg-elev: #14171c;
    --bg-input: #0f1115;
    --border: #1f2128;
    --border-strong: #2a2d35;
    --text: #e4e4e7;
    --text-dim: #a1a1aa;
    --text-faint: #71717a;
    --text-muted: #52525b;
    --accent: #7dd3a8;
    --accent-bg: rgba(125, 211, 168, 0.06);
    --accent-border: rgba(125, 211, 168, 0.15);
    --danger: #f87171;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

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

h1 { font-size: 20px; font-weight: 500; margin: 0 0 4px; color: var(--text); }
h2 { font-size: 16px; font-weight: 500; margin: 0 0 6px; color: var(--text); }
h3 { font-size: 14px; font-weight: 500; margin: 20px 0 10px; color: var(--text-dim); }

small { color: var(--text-faint); font-size: 12px; }
strong { font-weight: 500; }


/* -------------Layout------------------ */

/* Feed-width container - narrow on purpose for reading */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

/* Generic card used for upload form, empty states */
.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
}


/* -----------------Top navigation--------------------- */

.app-header {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.app-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 500;
    color: var(--text);
}
.app-nav {
    display: flex; align-items: center; gap: 16px; font-size: 13px;
}
.app-nav .sep { color: var(--text-muted); }
.app-nav .who { color: var(--text-faint); font-size: 12px; }
.app-nav a.active { color: var(--text); }


/* ----------------------Feed + posts--------------------------- */

.feed-head { margin-bottom: 18px; }
.feed-head-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 2px;
}
.feed-head .tagline {
    font-size: 12px; color: var(--text-muted); margin: 0;
}
.feed-head .hint {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--text-faint);
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.post-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}
.post-author { font-size: 13px; font-weight: 500; color: var(--text); }
.post-author a { color: var(--text); }
.post-author a:hover { color: var(--accent); }
.post-time { font-size: 11px; color: var(--text-faint); }

.post-image {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    background: #000;
}

/* Photo as a clickable link to its dedicated comment page */
.post > a {
    display: block;
    line-height: 0;
}
.post > a:hover .post-image {
    opacity: 0.95;
}

.post-body { padding: 12px 14px; }
.post-caption {
    font-size: 14px; color: var(--text);
    word-break: break-word;
    margin: 0 0 6px;
}
.post-caption:empty { display: none; }
.post-actions {
    display: flex; justify-content: flex-end;
    margin-top: 4px;
}

.photo-hint {
    font-size: 11px;
    color: var(--text-faint);
    margin: 6px 0 0;
    font-style: italic;
}


/* ----------------------Forms and buttons----------------------- */

input[type="text"], input[type="email"], input[type="password"],
input[type="file"], textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); }

label {
    display: block;
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: 4px;
}
.field { margin-bottom: 12px; }

/* Small hint text shown under a form field */
.field-hint {
    font-size: 11px;
    color: var(--text-faint);
    margin: 4px 0 0;
}

button, input[type="submit"] {
    background: var(--border-strong);
    color: var(--text);
    border: 1px solid var(--border-strong);
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}
button:hover { background: #34373f; }

button.primary {
    background: var(--accent);
    color: #0f1115;
    border-color: var(--accent);
}
button.primary:hover { background: #6ec595; }

button.link {
    background: transparent; border: none;
    color: var(--text-dim); padding: 2px 6px; font-size: 12px;
}
button.link:hover { color: var(--danger); background: transparent; }


/* ---------------------------Search-------------------------- */

.search-bar {
    display: flex; gap: 8px; align-items: center;
    margin-bottom: 18px;
}
.search-bar input { flex: 1; }

.user-list { list-style: none; padding: 0; margin: 0; }
.user-list li {
    padding: 0;
    margin-bottom: 6px;
    font-size: 13px;
}
.user-list a {
    display: block;
    padding: 10px 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
}
.user-list a:hover {
    border-color: var(--accent-border);
    color: var(--accent);
}


/* ----------------------Auth pages (login / register / index)--------------------------- */

.auth-wrap {
    max-width: 360px;
    margin: 80px auto;
    padding: 0 20px;
}
.auth-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 24px;
}
.auth-card h1 { text-align: center; margin-bottom: 4px; }
.auth-sub {
    text-align: center;
    color: var(--text-faint);
    font-size: 12px;
    margin-bottom: 22px;
}
.auth-foot {
    margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-faint);
}

/* Inline error banner on auth pages */
.auth-error {
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* Inline success banner, same shape as .auth-error but green */
.auth-success {
    background: rgba(125, 211, 168, 0.08);
    border: 1px solid rgba(125, 211, 168, 0.3);
    color: var(--accent);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}


/* ----------------------Likes---------------------------- */

.likes {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.like-form {
    margin: 0;
    display: inline;
}
.like-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    transition: transform 0.1s ease, color 0.15s ease;
}
.like-btn:hover {
    background: transparent;
    color: var(--text);
    transform: scale(1.1);
}
.like-btn:active { transform: scale(0.95); }

.like-btn.liked { color: #f87171; }
.like-btn.liked:hover { color: #fca5a5; }

.like-count {
    font-size: 12px;
    color: var(--text-faint);
}
.like-count.owner-link {
    color: var(--text-dim);
    cursor: pointer;
}
.like-count.owner-link:hover { color: var(--accent); }


/* --------------------------Comments (photo.jsp)----------------------------- */

.comments { margin-top: 24px; }
.comments-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dim);
    margin: 0 0 14px;
}
.comments-count {
    font-size: 12px;
    color: var(--text-faint);
    font-weight: 400;
}

.comment-form {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 18px;
}
.comment-form textarea {
    line-height: 1.5;
    resize: vertical;
    min-height: 50px;
}
.comment-form-actions {
    display: flex; justify-content: flex-end;
    margin-top: 8px;
}

.comment {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.comment-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; margin-bottom: 4px;
}
.comment-author { font-size: 13px; font-weight: 500; color: var(--text); }
.comment-author:hover { color: var(--accent); }
.comment-time { font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.comment-content {
    font-size: 13px; color: var(--text);
    margin: 0 0 4px;
    word-break: break-word;
    white-space: pre-wrap;  /* keep line breaks the user typed */
}

.comments-empty {
    font-size: 13px;
    color: var(--text-faint);
    text-align: center;
    padding: 16px;
    margin: 0;
}
.comments-more {
    text-align: center;
    margin: 12px 0 0;
    font-size: 12px;
}
.comments-more a { color: var(--text-dim); }
.comments-more a:hover { color: var(--accent); }


/* ----------------Privacy footer chips ("no tracking, no ads, no algorithms")-------------------- */

.privacy-footer {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 11px;
    color: var(--text-muted);
}
.privacy-footer .chip {
    display: inline-flex; align-items: center; gap: 5px;
}


/* Lucide icons ---------------------------------------------------------------------------------
   Lucide replaces <i data-lucide="name"> with an <svg class="lucide
---lucide-name">. These rules control the rendered SVG size.-----------------------------------*/

/* Default size for all Lucide icons (chips, inline hints, etc.) */
.lucide {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

/* Smaller variant for the privacy-footer chips */
.privacy-footer .lucide {
    width: 10px;
    height: 10px;
}

/* Even smaller for the "chronological, not algorithmic" feed hint */
.feed-head .hint .lucide {
    width: 11px;
    height: 11px;
}

/* Brand icon in the top nav */
.app-brand .lucide {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* Larger brand icon on the index.jsp splash */
.brand-icon-lg {
    width: 40px;
    height: 40px;
    color: var(--accent);
    display: inline-block;
    margin-bottom: 12px;
    stroke-width: 1.8;
}

/* Heart on the like button: empty by default, fills when liked */
.like-btn .lucide-heart {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
}
.like-btn.liked .lucide-heart {
    fill: currentColor;
}