/* Amy's Corner — Gothic Romance theme
   Dark, moody chrome (deep plum, ink, antique gold) wrapped around warm,
   candlelit parchment content areas — elegant and a little dramatic,
   but never cold: the reading surface stays soft, warm, and inviting. */

:root {
    /* Chrome (header, nav, page background) — deep, atmospheric */
    --color-ink:        #17121d;
    --color-ink-light:  #241b2c;
    --color-plum:       #3a2140;
    --color-plum-light: #4d2c52;

    /* Content surface — warm parchment, easy to read, welcoming */
    --color-bg:        #17121d;
    --color-surface:   #fbf3e6;
    --color-surface-alt: #f4e9d6;
    --color-text:      #2c2130;
    --color-muted:     #7a6d63;

    /* Accents */
    --color-wine:       #7c2743;
    --color-wine-dark:  #5c1c33;
    --color-gold:       #b8933f;
    --color-gold-light: #d9b869;
    --color-emerald:    #2f5233;
    --color-emerald-light: #e7efe4;

    --color-border:      #ddc9a3;
    --color-border-dark: #4a3a52;

    --shadow-soft: 0 10px 34px rgba(10, 5, 16, 0.45);
    --shadow-glow: 0 0 0 1px rgba(184, 147, 63, 0.35);
    --radius: 10px;

    --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
    --font-body: 'EB Garamond', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    background: var(--color-bg);
    background-image:
        radial-gradient(ellipse at top, #241b2c 0%, #14101a 60%),
        radial-gradient(ellipse at bottom, #1d1522 0%, #0f0c13 70%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.65;
}

h1, h2, h3, .site-title, .post-title {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

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

/* --- Header / chrome: dark, ornamental, gold-lined --- */
.site-header {
    background: linear-gradient(160deg, var(--color-ink) 0%, var(--color-plum) 100%);
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-gold);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.site-header .header-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--color-gold-light);
    margin: 0;
    text-shadow: 0 1px 12px rgba(184, 147, 63, 0.35);
}

.site-title .heart { color: var(--color-wine); text-shadow: 0 0 10px rgba(124, 39, 67, 0.7); }

.nav-links { display: flex; align-items: center; gap: 18px; font-size: 15px; font-family: var(--font-body); }
.nav-links a { color: #e7dcc8; font-weight: 500; }
.nav-links a:hover { color: var(--color-gold-light); }
.nav-links a.admin-link { color: var(--color-gold-light); }

.bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 20px;
}
.bell .badge {
    position: absolute;
    top: -6px; right: -10px;
    background: var(--color-wine);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 6px;
    box-shadow: 0 0 6px rgba(124, 39, 67, 0.8);
}

.page-shell {
    max-width: 1120px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 240px minmax(0, 860px);
    align-items: start;
    gap: 28px;
}

.sidebar { grid-column: 1; width: 100%; }

.sidebar-widget { padding: 20px 22px; margin-bottom: 0; text-align: center; }

.sidebar-heading {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--color-wine-dark);
    font-weight: 600;
}

.mood-display { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mood-emoji { font-size: 40px; line-height: 1; }
.mood-label {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.03em;
    color: var(--color-text);
}

.mood-widget.mood-sick           { box-shadow: var(--shadow-soft), 0 0 0 1px rgba(124, 39, 67, 0.35); }
.mood-widget.mood-open_for_calls { box-shadow: var(--shadow-soft), 0 0 0 1px rgba(47, 82, 51, 0.35); }
.mood-widget.mood-do_not_disturb { box-shadow: var(--shadow-soft), 0 0 0 1px rgba(74, 58, 82, 0.45); }
.mood-widget.mood-hopeful        { box-shadow: var(--shadow-soft), var(--shadow-glow); }
.mood-widget.mood-pissed_off     { box-shadow: var(--shadow-soft), 0 0 0 1px rgba(138, 48, 48, 0.4); }
.mood-widget.mood-stressed_out   { box-shadow: var(--shadow-soft), 0 0 0 1px rgba(184, 147, 63, 0.45); }

.container { grid-column: 2; min-width: 0; max-width: 860px; }

@media (max-width: 760px) {
    .page-shell { grid-template-columns: 1fr; margin: 24px auto; gap: 20px; }
    .sidebar { grid-column: 1; width: 100%; }
    .container { grid-column: 1; }
}

/* --- Cards: warm parchment surface, gold hairline border --- */
.card {
    background: var(--color-surface);
    background-image: linear-gradient(180deg, #fdf7ec 0%, var(--color-surface) 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    padding: 26px 30px;
    margin-bottom: 26px;
    border: 1px solid var(--color-border);
    position: relative;
}

.post-card .post-title { margin: 0 0 6px; font-size: 24px; color: var(--color-wine-dark); }
.post-meta { font-size: 13px; color: var(--color-muted); margin-bottom: 16px; font-style: italic; }
.post-body img { max-width: 100%; border-radius: 6px; margin: 12px 0; box-shadow: 0 6px 20px rgba(44, 33, 48, 0.25); }
.post-body { font-size: 17px; }

.visibility-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
}
.visibility-public { background: var(--color-emerald-light); color: var(--color-emerald); }
.visibility-groups  { background: #f2e2ea; color: var(--color-wine-dark); }

.reactions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.reaction-btn {
    border: 1px solid var(--color-border);
    background: var(--color-surface-alt);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    color: var(--color-text);
    transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.reaction-btn:hover { background: #ecdcc2; }
.reaction-btn.active { background: var(--color-wine); color: #fff; border-color: var(--color-wine-dark); box-shadow: 0 0 10px rgba(124, 39, 67, 0.5); }
.reaction-count { font-size: 12px; color: var(--color-muted); margin-left: 4px; }
.reaction-btn.active .reaction-count { color: #f2dfe6; }

.comments { margin-top: 22px; border-top: 1px solid var(--color-border); padding-top: 18px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: 600; font-size: 14px; color: var(--color-wine-dark); }
.comment-meta { font-size: 12px; color: var(--color-muted); font-style: italic; }
.comment-body { margin-top: 4px; font-size: 16px; }

form.stacked label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; color: var(--color-wine-dark); }
form.stacked input[type=text],
form.stacked input[type=email],
form.stacked input[type=password],
form.stacked textarea,
form.stacked select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-body);
    background: #fffdf8;
    color: var(--color-text);
}
form.stacked input:focus,
form.stacked textarea:focus,
form.stacked select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(184, 147, 63, 0.25);
}
form.stacked textarea { min-height: 90px; resize: vertical; }

.btn {
    display: inline-block;
    border: 1px solid var(--color-wine-dark);
    border-radius: 999px;
    padding: 10px 24px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    background: linear-gradient(180deg, var(--color-wine) 0%, var(--color-wine-dark) 100%);
    color: #fbf3e6;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:hover { box-shadow: 0 0 14px rgba(124, 39, 67, 0.55); text-decoration: none; }
.btn.btn-secondary { background: var(--color-surface-alt); color: var(--color-wine-dark); border-color: var(--color-border); }
.btn.btn-secondary:hover { background: #ecdcc2; box-shadow: none; }
.btn.btn-danger { background: linear-gradient(180deg, #8a3030 0%, #601f1f 100%); border-color: #4a1818; }
.btn.btn-danger:hover { box-shadow: 0 0 14px rgba(138, 48, 48, 0.55); }
.btn.btn-small { padding: 6px 16px; font-size: 13px; }

.flash { padding: 12px 18px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; border: 1px solid transparent; }
.flash-error   { background: #f6e1e1; color: #7a2c2c; border-color: #e0b8b8; }
.flash-success { background: var(--color-emerald-light); color: var(--color-emerald); border-color: #c9dcc4; }
.flash-info    { background: #e6e0ee; color: #4a3a63; border-color: #cdc0dd; }

.checkbox-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.checkbox-list label { display: flex; align-items: center; gap: 8px; font-weight: 500; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; font-family: var(--font-body); }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
table.admin-table th { color: var(--color-wine-dark); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: #eee; color: #666; }
.badge-admin { background: #f2e2ea; color: var(--color-wine-dark); }
.badge-active { background: var(--color-emerald-light); color: var(--color-emerald); }
.badge-invited { background: #f3e6cd; color: #8a6a2a; }

.empty-state { text-align: center; color: var(--color-muted); padding: 44px 20px; font-style: italic; }

.admin-shell { display: flex; gap: 24px; max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.admin-nav { width: 200px; flex-shrink: 0; }
.admin-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #e7dcc8;
    font-weight: 500;
    margin-bottom: 4px;
    font-family: var(--font-body);
}
.admin-nav a.active, .admin-nav a:hover { background: rgba(184, 147, 63, 0.16); color: var(--color-gold-light); text-decoration: none; }
.admin-main { flex: 1; min-width: 0; }

.site-footer { text-align: center; color: #a698ad; font-size: 13px; padding: 34px 20px 56px; font-style: italic; }

/* --- Mobile: admin area (post editor, dashboard, etc.) ---
   Below 760px the fixed 200px sidebar nav was eating most of the
   viewport width, squishing the editor into a thin column. Stack the
   nav above the content and turn it into a horizontally-scrollable
   strip of pills instead of a tall vertical list, so it doesn't push
   the actual content (the part people are there to use) too far down
   the page on a phone. */
@media (max-width: 760px) {
    .admin-shell { flex-direction: column; gap: 14px; margin: 20px auto; padding: 0 14px; }
    .admin-nav {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .admin-nav a {
        flex-shrink: 0;
        white-space: nowrap;
        margin-bottom: 0;
        padding: 8px 12px;
        font-size: 14px;
    }
    .admin-main { width: 100%; }
    .card { padding: 18px 16px; }
    form.stacked { max-width: 100% !important; }
}
