/* =========================================================
   TimeLockedSecrets – MODERN LIGHT UI (Desktop + Mobile)
   Palette: Clean whites, soft slate neutrals, refined blue/pink accents
   ========================================================= */

:root {
    --bg: #f8fafc;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --accent: #3b82f6;
    --border: #e2e8f0;
    --input-bg: #f1f5f9;
    --tag-bg: #f8fafc;
    --heading-accent: #db2777;
    --heading-muted: #be185d;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

/* ================= RESET ================= */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

/* ================= LINKS ================= */

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ================= HEADER / NAV ================= */

header {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo svg {
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-logo:hover svg {
    transform: scale(1.03);
    filter: drop-shadow(0 0 8px rgba(219, 39, 119, 0.25));
}

/* NAV WRAPPER */
.nav {
    width: 100%;
}

/* TOP BAR */
.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* HAMBURGER */
.hamburger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    margin-top: 0;
}

.nav-links a {
    font-weight: 600;
    font-size: 14px;
    padding: 6px 0;
}

/* SEARCH (DESKTOP RIGHT ALIGN) */
.nav-links form {
    margin-left: auto;
}

.nav-links input {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    height: 34px;
    border-radius: 6px;
}

/* ================= MAIN LAYOUT ================= */

main {
    padding: 20px;
}

.layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.content {
    flex: 1;
}

/* ================= POST LIST ================= */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* TITLE + ICON */
.post-title {
    font-size: 20px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.post-title::before {
    content: "✦";
    color: var(--accent);
    font-size: 14px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: .4; }
    50% { opacity: 1; }
    100% { opacity: .4; }
}

.post-meta {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.view-more {
    margin-top: 20px;
    display: inline-block;
    font-weight: 700;
}

/* ================= SIDEBAR ================= */

aside {
    width: 320px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

/* ALIGN SIDEBAR WITH CONTENT TITLE */
.layout > aside {
    margin-top: 52px;
}

/* REMOVE BULLETS */
aside ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside li {
    margin-bottom: 8px;
}

/* RANDOM POSTS */
aside li a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    background: var(--tag-bg);
    border: 1px solid var(--border);
    font-size: 13px;
}

/* TAGS */
aside a {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    border-radius: 999px;
    background: var(--tag-bg);
    border: 1px solid var(--border);
    font-size: 13px;
    transition: all .2s ease;
}

aside a:hover {
    background: var(--accent);
    color: #fff;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag-cloud a {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--tag-bg);
    border: 1px solid var(--border);
    font-size: 13px;
}

.tag-cloud a:hover {
    background: var(--accent);
    color: #fff;
}

.post-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.post-tags strong {
    margin-right: 6px;
    color: var(--muted);
    font-size: 14px;
}

.tag-pill {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 999px;
    background: var(--tag-bg);
    border: 1px solid var(--border);
    color: var(--accent);
    text-decoration: none;
    transition: all .2s ease;
}

.tag-pill:hover {
    background: var(--accent);
    color: #fff;
}

/* AUTH PAGES */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    padding-top: 40px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.auth-card h2 {
    margin-bottom: 16px;
}

.auth-card label {
    display: block;
    margin-top: 14px;
    font-weight: 600;
}

.auth-card input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.auth-card button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.auth-footer {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
}

.error {
    color: var(--error);
    margin-bottom: 10px;
}

.success {
    color: var(--success);
    margin-bottom: 10px;
}

/* ================= FOOTER ================= */

footer {
    margin-top: 40px;
    padding: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ADMIN DASHBOARD */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.admin-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

.admin-card h3 {
    margin-bottom: 6px;
    color: var(--text);
}

.admin-card p {
    color: var(--muted);
    font-size: 14px;
}

.admin-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ADMIN USERS */
.admin-user-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.admin-user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
}

.admin-user-info strong {
    font-size: 16px;
    color: var(--text);
}

.admin-user-meta {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.admin-user-actions {
    display: flex;
    gap: 10px;
}

.admin-user-actions a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.pt-btn{
  display:inline-block;
  padding:10px 16px;
  border-radius:10px;
  background:#2563eb;
  color:#fff;
  text-decoration:none;
  font-weight:600;
}
.pt-btn:hover{ background:#1d4ed8; }
.pt-btn:active{ transform:translateY(1px); }

.btn-approve {
    background: var(--success);
    color: #fff;
}

.btn-reject {
    background: var(--error);
    color: #fff;
}

/* MOBILE */
@media (max-width: 600px) {
    .admin-user-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ADMIN POSTS */
.admin-post-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.admin-post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
}

.admin-post-info strong {
    font-size: 16px;
    color: var(--text);
}

.admin-post-meta {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.status.published { color: var(--success); }
.status.pending   { color: var(--warning); }
.status.rejected  { color: var(--error); }

.admin-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.admin-post-actions a,
.admin-post-actions button {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-approve { background: var(--success); color: #fff; }
.btn-reject  { background: var(--error); color: #fff; }
.btn-edit    { background: var(--accent); color: #fff; }
.btn-delete  { background: #dc2626; color: #fff; }
.btn-quick   { background: var(--muted); color: #fff; }

.admin-quick-edit {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.admin-quick-edit label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

.admin-quick-edit input,
.admin-quick-edit select {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.qe-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* MOBILE */
@media (max-width: 600px) {
    .admin-post-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================
   ADMIN USER STATS
========================= */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
}

.stat-card div {
    font-size: 20px;
    font-weight: bold;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    /* NAV */
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a,
    .nav-links form {
        width: 100%;
    }

    .nav-links form {
        margin-left: 0;
    }

    .nav-links input {
        width: 100%;
    }

    /* LAYOUT */
    .layout {
        flex-direction: column;
    }

    aside {
        width: 100%;
        margin-top: 20px;
    }

    .post-title {
        font-size: 18px;
    }

    .post-card {
        padding: 16px;
    }
}

/* ================= LAZY LOAD SAFE ================= */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================= FORMS (CREATE / EDIT POST) ================= */

form {
    max-width: 720px;
}

label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    color: var(--muted);
}

input[type="text"],
textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

textarea {
    min-height: 220px;
    resize: vertical;
}

button {
    margin-top: 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

/* =========================
   Post Headings (Light + Refined Pink)
========================= */
.post-title,
.post-body h1 {
    color: var(--heading-accent);
}
.post-body h2 {
    color: var(--heading-muted);
    border-bottom: 1px solid rgba(219, 39, 119, 0.15);
    padding-bottom: 4px;
}
.post-body h3 {
    color: #be185d;
}

/* =========================
   Post Blockquote Design
========================= */

.post-body blockquote {
    position: relative;
    margin: 28px 0;
    padding: 18px 22px;
    background: #fdf2f8;
    border-left: 4px solid var(--heading-accent);
    border-radius: 8px;
    color: var(--text);
    font-style: italic;
    line-height: 1.6;
}

/* Optional subtle glow accent */
.post-body blockquote::before {
    content: "“";
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 48px;
    color: rgba(219, 39, 119, 0.15);
    font-family: serif;
}

/* Citation styling */
.post-body blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
    font-style: normal;
}

.post-body blockquote {
    background: linear-gradient(
        90deg,
        rgba(219,39,119,0.04),
        rgba(59,130,246,0.04)
    );
    border-left: 3px solid var(--heading-accent);
}
/* ========= SOFTER POST TITLES ========= */

/* Main post titles on homepage */
.post-title {
    color: #9d174d; /* Softer, muted pink instead of vibrant */
    font-weight: 600; /* Slightly lighter than 800 */
}

.post-title:hover {
    color: #be185d; /* Slightly brighter on hover for interaction */
}

/* Post body headings */
.post-body h1 {
    color: #9d174d;
    font-weight: 600;
}

.post-body h2 {
    color: #be185d;
    border-bottom-color: rgba(157, 23, 77, 0.2);
    font-weight: 600;
}

.post-body h3 {
    color: #db2777;
    font-weight: 600;
}

/* Icon before title - keep it subtle */
.post-title::before {
    color: #3b82f6; /* Blue accent instead of pink for contrast */
    font-size: 14px;
}
/* ========= NAV LINKS - PILL STYLE ========= */
.nav-links a {
    padding: 8px 16px;
    background: transparent;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-links a:hover {
    background: #f1f5f9;
    color: #111827;
    border-color: #e2e8f0;
}

.nav-links a.active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .nav-links a {
        padding: 10px 16px;
        display: block;
        width: 100%;
        text-align: center;
    }
}