/* ═══════════════════════════════════════════════════════════
   error404zone.ro — stylesheet
   ═══════════════════════════════════════════════════════════ */

:root {
    color-scheme: dark;
    --bg: #08080a;
    --bg-panel: rgba(19,19,23,0.05);
    --bg-panel-2: rgba(26,26,32,0.05);
    --border: #2a2a32;
    --text: #e8e8ec;
    --text-dim: #9a9aa5;
    --red: #ff3b30;
    --red-glow: #ff3b3055;
    --gold: #ffd700;
    --gold-dim: #b8960020;
    --blue: #4a9eff;
}

* { box-sizing: border-box; }
html, body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

/* ── HERO BACKGROUNDS ──
   Încarcă pozele tale în assets/images/ cu aceste nume exacte,
   sau schimbă calea de mai jos dacă preferi alt nume de fișier. */
.hero-error {
    background: linear-gradient(180deg, rgba(8,8,10,0.45), rgba(8,8,10,0.85)),
                url('../images/hero-error404.jpg') center top / cover no-repeat fixed;
}
.hero-market {
    background: linear-gradient(180deg, rgba(8,8,10,0.45), rgba(8,8,10,0.85)),
                url('../images/market-bg.jpg') center top / cover no-repeat fixed;
}
.hero-admin {
    background: linear-gradient(180deg, rgba(8,8,10,0.5), rgba(8,8,10,0.88)),
                url('../images/admin-bg.jpg') center top / cover no-repeat fixed;
}

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

/* ── NAV ── */
.main-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px; background: rgba(10,10,12,0.9); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
.nav-logo { font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: 1px; }
.nav-logo span { color: var(--red); text-shadow: 0 0 12px var(--red-glow); }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; position: relative; }
.nav-links a:hover { color: var(--text); }
.nav-admin-link { color: var(--gold) !important; font-weight: 600; }
.nav-badge {
    background: var(--red); color: #fff; font-size: 0.68rem; font-weight: 700;
    border-radius: 10px; padding: 1px 6px; margin-left: 4px; vertical-align: top;
}
.nav-user { display: flex; align-items: center; gap: 14px; }
.nav-profile { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.owner-label {
    background: var(--gold); color: #5c0000; font-weight: 800; font-size: 0.78rem;
    padding: 3px 10px; border-radius: 10px; letter-spacing: 0.5px;
}
.btn-logout {
    color: var(--red); border: 1px solid var(--red); padding: 6px 14px; border-radius: 6px;
    text-decoration: none; font-size: 0.85rem;
}
.btn-logout:hover { background: var(--red); color: #fff; }

/* ── TITLES / GLITCH STYLE ── */
.glitch-title {
    font-size: 2.4rem; font-weight: 900; letter-spacing: 2px; margin: 0 0 4px;
    text-shadow: 2px 0 var(--red), -2px 0 var(--blue);
}
.glitch-title span { color: var(--red); }
.glitch-title-gold {
    font-size: 2rem; font-weight: 900; letter-spacing: 2px; margin: 0;
    color: var(--gold); text-shadow: 0 0 20px var(--gold-dim);
}
.welcome-banner { margin: 20px 0 30px; }

/* ── RANK BADGE ── */
.rank-badge {
    display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700;
    color: #0a0a0c; background: var(--badge-color, #888);
}

/* ── PANELS / CARDS ── */

.panel {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px;
    padding: 24px; margin-bottom: 28px;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-header h1, .panel-header h2 { margin: 0; }
.link-more { color: var(--red); text-decoration: none; font-size: 0.9rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.listing-card {
    background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px; text-decoration: none; color: var(--text); transition: border-color 0.15s, transform 0.15s;
    display: block;
}
.listing-card:hover { border-color: var(--red); transform: translateY(-2px); }
.listing-card-title { font-weight: 700; margin-bottom: 6px; }
.listing-card-price { color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.listing-card-meta { color: var(--text-dim); font-size: 0.82rem; }

.empty-state { color: var(--text-dim); font-style: italic; }

/* ── DISCUSSIONS ── */
.discussion-list { display: flex; flex-direction: column; gap: 10px; }
.discussion-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 14px 18px; text-decoration: none; color: var(--text);
}
.discussion-row:hover { border-color: var(--blue); }
.discussion-title { font-weight: 600; }
.discussion-meta { color: var(--text-dim); font-size: 0.8rem; }
.tag-resolved { background: #2ecc71; color: #063; padding: 1px 8px; border-radius: 10px; font-size: 0.7rem; font-weight: 700; }
.reply-box { background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; margin-bottom: 8px; }

/* ── FORMS ── */
form label { display: block; margin: 14px 0 6px; font-size: 0.85rem; color: var(--text-dim); }
form input[type="text"], form input[type="email"], form input[type="password"],
form input[type="number"], form textarea, form select {
    width: 100%; padding: 10px 12px; background: var(--bg-panel-2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font-size: 0.95rem; font-family: inherit;
}
select option {
    background-color: #0a0a0c;
    color: #ffffff;
}
select option:hover,
select option:focus,
select option:checked,
select option:active {
    background-color: #0a0a0c;
    color: var(--red);
}
form textarea { resize: vertical; }
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--red); }

.btn-primary {
    margin-top: 18px; padding: 10px 22px; background: var(--red); color: #fff; border: none;
    border-radius: 8px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: #e0281e; }
.btn-secondary {
    margin-top: 18px; padding: 10px 22px; background: transparent; color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; margin-left: 10px;
}

/* ── AUTH PAGES ── */
.page-auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-box {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
    padding: 36px; width: 100%; max-width: 420px; text-align: center;
}
.auth-box h2 { margin-top: 0; }
.auth-box form { text-align: left; }
.auth-box .glitch-title {
    font-size: clamp(1.5rem, 7vw, 2.1rem); letter-spacing: 0.5px; white-space: nowrap;
}
.auth-switch { margin-top: 18px; font-size: 0.85rem; color: var(--text-dim); }
.auth-switch a { color: var(--red); }

.alert { padding: 10px 14px; border-radius: 8px; margin: 12px 0; font-size: 0.88rem; }
.alert-error { background: #ff3b3022; border: 1px solid var(--red); color: #ff9d94; }
.alert-success { background: #2ecc7122; border: 1px solid #2ecc71; color: #8ff0b5; }

/* ── CATEGORY FILTERS ── */
.category-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.category-filters a {
    padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); color: var(--text-dim);
    text-decoration: none; font-size: 0.85rem;
}
.category-filters a.active, .category-filters a:hover { border-color: var(--red); color: var(--text); }

/* ── LISTING DETAIL ── */
.listing-detail h1 { margin-top: 10px; }
.listing-price-big { font-size: 1.6rem; color: var(--gold); font-weight: 800; }
.listing-meta { color: var(--text-dim); font-size: 0.85rem; }
.listing-description { line-height: 1.6; margin: 16px 0; }
.listing-status {
    display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase;
}
.status-activ { background: #2ecc7133; color: #8ff0b5; }
.status-rezervat { background: #ffd70033; color: var(--gold); }
.status-vandut { background: #ff3b3033; color: #ff9d94; }

/* ── PROFILE ── */
.profile-header { text-align: center; margin-bottom: 20px; }
.profile-header h1 { margin: 8px 0 2px; }
.profile-since { color: var(--text-dim); font-size: 0.85rem; }
.stat-row { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-box {
    flex: 1; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 10px;
    padding: 18px; text-align: center;
}
.stat-box.gold { border-color: #4a3c00; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--red); }
.stat-box.gold .stat-num { color: var(--gold); }

/* ── MESSAGES ── */
.messages-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.conversation-list { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.conversation-item { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text-dim); margin-bottom: 4px; }
.conversation-item.active, .conversation-item:hover { background: var(--bg-panel-2); color: var(--text); }
.conversation-thread { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.thread-messages { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; max-height: 50vh; overflow-y: auto; }
.message-bubble { max-width: 70%; padding: 10px 14px; border-radius: 12px; }
.message-bubble.mine { align-self: flex-end; background: var(--red); color: #fff; }
.message-bubble.theirs { align-self: flex-start; background: var(--bg-panel-2); }
.message-time { display: block; font-size: 0.68rem; opacity: 0.7; margin-top: 4px; }
.message-form { display: flex; gap: 10px; }
.message-form textarea { flex: 1; }

/* ── ADMIN (premium/gold) ── */
.admin-title-row { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.owner-tag { color: var(--gold); font-weight: 800; font-size: 0.8rem; letter-spacing: 1px; }
.admin-stats .stat-box { border-color: #4a3c00; background: linear-gradient(160deg, var(--bg-panel), rgba(28,22,8,0.55)); }
.admin-panel { border-color: #3a2f00; }
.admin-panel h2 { color: var(--gold); }
.admin-hint { color: var(--text-dim); font-size: 0.85rem; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.admin-table th { color: var(--text-dim); font-weight: 600; }
.admin-actions { display: flex; gap: 8px; align-items: center; }
.inline-form { display: inline-block; }
.btn-danger-small, .btn-secondary-small {
    padding: 5px 12px; border-radius: 6px; border: none; font-size: 0.78rem; cursor: pointer; font-weight: 600;
}
.btn-danger-small { background: var(--red); color: #fff; }
.btn-secondary-small { background: var(--bg-panel-2); color: var(--text); border: 1px solid var(--border); }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    .main-nav { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
    .nav-links { order: 3; width: 100%; overflow-x: auto; gap: 14px; }
    .messages-layout { grid-template-columns: 1fr; }
    .stat-row { flex-wrap: wrap; }
}

/* ── MEMBERS SIDEBAR (stânga) ── */
body:not(.page-auth) { padding-left: 220px; }
.members-sidebar {
    position: fixed; top: 65px; left: 0; bottom: 0; width: 220px;
    background: var(--bg-panel); border-right: 1px solid var(--border);
    padding: 16px; overflow-y: auto; z-index: 40;
}
.members-sidebar h3 { margin: 0 0 14px; font-size: 0.9rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.members-sidebar details { margin-bottom: 12px; }
.members-sidebar summary { cursor: pointer; font-size: 0.85rem; padding: 4px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
.members-sidebar summary::-webkit-details-marker { display: none; }
.sidebar-count { color: var(--text-dim); font-size: 0.78rem; }
.sidebar-member-list { list-style: none; margin: 6px 0 0; padding-left: 6px; }
.sidebar-member-list li { font-size: 0.82rem; color: var(--text-dim); padding: 3px 0; }
.sidebar-toggle { display: none; }

@media (max-width: 900px) {
    body:not(.page-auth) { padding-left: 0; }
    .members-sidebar {
        transform: translateX(-100%); transition: transform 0.2s ease; top: 0; padding-top: 70px;
    }
    .members-sidebar.open { transform: translateX(0); }
    .sidebar-toggle {
        display: block; position: fixed; bottom: 16px; left: 16px; z-index: 45;
        background: var(--red); color: #fff; border: none; padding: 10px 16px;
        border-radius: 24px; font-weight: 700; cursor: pointer; font-size: 0.85rem;
    }
}
