/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0e0e12;
    --surface:  #1a1a24;
    --border:   #2a2a3a;
    --accent:   #2dd4bf;
    --accent2:  #14b8a6;
    --text:     #e0dfe4;
    --muted:    #78778a;
    --success:  #3ecf8e;
    --error:    #f87171;
    --radius:   10px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Animated Background ───────────────────────────── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(45,212,191,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45,212,191,.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
    to { background-position: 60px 60px; }
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: .12;
    z-index: 0;
    pointer-events: none;
}
.bg-glow--1 { background: var(--accent);  top: -200px; left: -100px; }
.bg-glow--2 { background: var(--accent2); bottom: -200px; right: -100px; }

/* ── Layout ────────────────────────────────────────── */
.wrapper {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 0 auto;
    padding: 0 3rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrapper > .flash {
    flex-shrink: 0;
    margin-top: 1.5rem;
}

/* ── Two-Column Layout ─────────────────────────────── */
.main-columns {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 3rem;
    align-items: start;
    flex: 1;
    min-height: 0;
}

.col-form {
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem .5rem 2rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.col-form::-webkit-scrollbar { width: 6px; }
.col-form::-webkit-scrollbar-track { background: transparent; }
.col-form::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.col-gripes {
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem .5rem 2rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.col-gripes::-webkit-scrollbar { width: 6px; }
.col-gripes::-webkit-scrollbar-track { background: transparent; }
.col-gripes::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Hero (inside left column) ─────────────────────── */
.hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .5rem;
}

.hero .tagline {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.7;
}

.hero .tagline em {
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

/* ── Section Titles ────────────────────────────────── */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Form ──────────────────────────────────────────── */
.gripe-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: .4rem;
}

.form-group label .private {
    font-size: .65rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: .7;
}

.form-group input,
.form-group textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .7rem .9rem;
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.captcha-row {
    margin: 1.2rem 0;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
}

.btn-submit:hover { opacity: .9; }
.btn-submit:active { transform: scale(.98); }

/* ── Reply Banner ──────────────────────────────────── */
.reply-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(45,212,191,.1);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: .6rem 1rem;
    margin-bottom: 1rem;
    font-size: .9rem;
    color: var(--accent);
}

.reply-cancel {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 .2rem;
    opacity: .7;
    transition: opacity .2s;
}

.reply-cancel:hover { opacity: 1; }

/* ── Trusted Badge ─────────────────────────────────── */
.trusted-badge {
    font-size: .85rem;
    color: var(--success);
    margin: 1rem 0;
    padding: .5rem .8rem;
    background: rgba(62,207,142,.08);
    border-radius: 6px;
    border: 1px solid rgba(62,207,142,.2);
}

/* ── Flash Messages ────────────────────────────────── */
.flash {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: .95rem;
    border: 1px solid;
}
.flash--success { background: rgba(62,207,142,.1); border-color: var(--success); color: var(--success); }
.flash--error   { background: rgba(248,113,113,.1); border-color: var(--error);   color: var(--error); }

/* ── Gripe Cards ───────────────────────────────────── */
.gripes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gripe-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: border-color .2s;
}

.gripe-card:hover {
    border-color: var(--accent);
}

.gripe-card .gripe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.gripe-card .gripe-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
}

.gripe-card .gripe-date {
    font-size: .78rem;
    color: var(--muted);
}

.gripe-card .gripe-text {
    color: var(--text);
    font-size: .95rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Reply Button ──────────────────────────────────── */
.btn-reply {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .8rem;
    padding: .3rem .8rem;
    border-radius: 4px;
    cursor: pointer;
    margin-top: .75rem;
    transition: all .2s;
}

.btn-reply:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Replies ───────────────────────────────────────── */
.replies {
    margin-top: .75rem;
    padding-left: 1.25rem;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.reply-count {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-bottom: .2rem;
}

.reply-card {
    padding: .75rem 1rem;
    background: rgba(255,255,255,.02);
    border-radius: 6px;
}

.reply-card .gripe-name {
    font-weight: 600;
    font-size: .9rem;
    color: var(--accent);
}

.reply-card .gripe-date {
    font-size: .72rem;
    color: var(--muted);
}

.reply-card .gripe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .35rem;
}

.reply-card .gripe-text {
    color: var(--text);
    font-size: .9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Collapsed replies */
.replies-collapsed {
    display: none;
    flex-direction: column;
    gap: .6rem;
}

.replies-collapsed.replies-expanded {
    display: flex;
}

.btn-show-replies {
    background: none;
    border: none;
    color: var(--accent);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: .3rem 0;
    text-align: left;
    transition: opacity .2s;
}

.btn-show-replies:hover {
    opacity: .75;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.empty-state span {
    display: block;
    font-size: 2.5rem;
    margin-bottom: .5rem;
}

/* ── Pagination ────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: .45rem .85rem;
    border-radius: 6px;
    font-size: .9rem;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--muted);
    transition: all .2s;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Footer ────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--muted);
    font-size: .8rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* ── Quote Ticker ──────────────────────────────────── */
.quote-ticker {
    text-align: center;
    margin: -.5rem 0 1.5rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-ticker blockquote {
    font-size: 1rem;
    font-style: italic;
    color: var(--accent);
    opacity: 0;
    max-width: 400px;
    transition: opacity .6s ease;
    line-height: 1.6;
}

.quote-ticker blockquote.visible {
    opacity: 1;
}

.quote-ticker blockquote::before { content: '\201c'; }
.quote-ticker blockquote::after  { content: '\201d'; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
    .wrapper {
        height: auto;
        padding: 2rem 1rem 3rem;
    }
    .main-columns {
        grid-template-columns: 1fr;
    }
    .col-form {
        height: auto;
        overflow-y: visible;
        padding: 0;
    }
    .col-gripes {
        height: auto;
        overflow-y: visible;
        padding: 0;
    }
    .form-row { flex-direction: column; gap: .75rem; }
    .hero { padding: 2.5rem 0 1.5rem; }
}
