/* ═══════════════════════════════════════════════════════
   COBALT MANGAS — Post Page (Unified CSS)
   Single file. No legacy. No conflicts.
   ═══════════════════════════════════════════════════════ */

/* ── 1. BASE ─────────────────────────────────────────── */
body {
    background: #0a0a14;
    color: #e4e4e7;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0; padding: 0; min-height: 100vh;
}
::selection { background-color: rgba(99,102,241,0.3); }
a { color: inherit; }

/* ── 2. HEADER ───────────────────────────────────────── */
.main-header-structure {
    background: #000; display: flex; flex-direction: column;
    width: 100%; position: relative; z-index: 1000;
}
.top-bar-container {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 20px; max-width: 1200px; margin: 0 auto; width: 100%; min-height: 40px;
}
.top-bar-left { flex: 1; }
.top-bar-right { display: flex; align-items: center; gap: 18px; }
.top-user-badge {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 4px 12px; border-radius: 20px;
    background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.15);
    transition: all 0.2s;
}
.top-user-badge:hover {
    background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3);
}
.user-avatar-circle {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    color: #fff; font-weight: 800; font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center;
}
.user-badge-name { color: #e2e8f0; font-weight: 600; font-size: 0.82rem; }
.user-role-tag {
    font-size: 0.6rem; font-weight: 700; padding: 2px 6px; border-radius: 4px;
    background: linear-gradient(135deg, #818cf8, #4f46e5); color: #fff;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.user-dropdown-menu {
    position: absolute; top: 100%; right: 0; background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
    width: 200px; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000; padding: 6px; margin-top: 5px;
}
.user-dropdown-menu a, .user-dropdown-menu button {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; color: #a1a1aa; text-decoration: none;
    transition: all 0.15s; width: 100%; text-align: left;
    background: none; border: none; cursor: pointer;
    font-size: 0.85rem; border-radius: 8px; font-family: inherit;
}
.user-dropdown-menu a:hover, .user-dropdown-menu button:hover {
    background: rgba(99,102,241,0.1); color: #a5b4fc;
}
.dropdown-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 4px 0; }
.text-gradient-cobalt {
    background: linear-gradient(135deg, #6366f1, #818cf8 50%, #a5b4fc);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── 3. BUTTONS ──────────────────────────────────────── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; background: #6366f1; color: #fff !important;
    border: none; border-radius: 10px; font-weight: 600; font-size: 0.9rem;
    cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary:hover { background: #818cf8; transform: translateY(-1px); }

/* ── 4. COMMENTS ─────────────────────────────────────── */
.comments, .comments-header, .comment-form-container {
    width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto;
}
.comments { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.comments-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding: 0;
}
.comments-count { font-size: 1.3rem; font-weight: 700; color: #fff; margin: 0; }
.comments-sort {
    display: flex; align-items: center; gap: 8px; color: #94a3b8;
    font-size: 0.9rem; cursor: pointer; transition: color 0.2s; position: relative;
}
.comments-sort:hover { color: #e2e8f0; }
.sort-label { opacity: 0.8; }
.sort-value { color: #fff; font-weight: 600; }
.comments-sort i { font-size: 0.8rem; margin-top: 2px; transition: transform 0.2s; }
.comments-sort.open i { transform: rotate(180deg); }
.sort-options {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    background: #1a1a2e; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 8px 0; min-width: 140px;
    display: none; z-index: 100; list-style: none;
}
.comments-sort.open .sort-options { display: block; }
.sort-options li {
    padding: 8px 16px; color: #94a3b8; cursor: pointer; transition: all 0.2s;
}
.sort-options li:hover { background: rgba(99,102,241,0.1); color: #fff; }
.sort-options li.active { color: #fff; font-weight: 600; }
.comment { display: flex; gap: 12px; padding: 0; position: relative; }
.avatar-container {
    display: flex; flex-direction: column; align-items: center;
    position: relative; z-index: 2;
}
.avatar-container img, .avatar {
    width: 40px; height: 40px; min-width: 40px; min-height: 40px;
    border-radius: 50% !important; object-fit: cover; background: #27272a; aspect-ratio: 1/1;
}
.avatar-reply { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
.body { flex: 1; display: flex; flex-direction: column; gap: 0; min-width: 0; align-items: flex-start; }
.meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    font-size: 0.85rem; line-height: 1.3; margin-bottom: 0; width: 100%;
}
.comment-author { font-weight: 600; color: #f1f5f9; font-size: 0.9rem; }
.separator { color: #3f3f46; font-weight: bold; }
.comment-time { color: #6b7280; font-size: 0.8rem; }
.audio-pin-comment {
    color: #818cf8; cursor: pointer; font-size: 0.9rem; margin-left: 4px;
    transition: transform 0.2s, color 0.2s; display: inline-flex; align-items: center;
}
.audio-pin-comment:hover { transform: scale(1.2) rotate(-15deg); color: #a5b4fc; }
.rank-badge {
    padding: 1px 6px; border-radius: 3px; font-size: 0.6rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px; color: #fff;
    background: #3f3f46; display: inline-flex; align-items: center; height: 16px;
}
.rank-admin { background: #f43f5e; }
.rank-7 { background: #ec4899; }
.rank-5 { background: #6366f1; }
.rank-3 { background: #818cf8; }
.rank-helper { background: #14b8a6; }
.rank-moderator { background: #6366f1; }
.comment-text {
    font-size: 0.9rem; color: #d1d5db; line-height: 1.45;
    white-space: pre-wrap; margin: 0; padding: 0; text-align: left; align-self: flex-start;
}
.actions { display: flex; gap: 12px; margin-top: 2px; padding: 0; }
.action-btn {
    background: transparent; border: none; color: #52525b; font-size: 0.8rem;
    font-weight: 600; cursor: pointer; padding: 4px 0;
    display: flex; align-items: center; gap: 6px; transition: color 0.2s;
}
.action-btn:hover { color: #a1a1aa; }
.like-btn.liked { color: #ec4899; }
.comment>.comment-thread-line {
    position: absolute; left: 20px; top: 40px;
    height: var(--thread-line-height, 0); width: 2px;
    background: #27272a; transform: translateX(-50%); z-index: 1;
}
.reply-l-connector {
    position: absolute; left: -62px; top: 0; width: 82px; height: 20px;
    border-left: 2px solid #27272a; border-bottom: 2px solid #27272a;
    border-bottom-left-radius: 12px; pointer-events: none; z-index: 1;
}
.replies-container>*:last-child>.reply-l-connector::after {
    content: ''; position: absolute; left: -2px; top: 30px;
    width: 4px; height: 1000px; background: #0a0a14; z-index: 2;
}
.replies-container { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; width: 100%; }
.comment-form-container { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 40px; }
.comment-input-wrapper { flex: 1; position: relative; padding-top: 5px; }
.comment-input-field {
    width: 100%; background: transparent;
    border: none; border-bottom: 1px solid #27272a;
    border-radius: 0; padding: 0 0 8px 0;
    color: white; font-size: 1rem; transition: border-color 0.2s; font-family: inherit;
}
.comment-input-field::placeholder { color: #52525b; }
.comment-input-field:focus { border-bottom-color: #6366f1; outline: none; }
.comment-send-btn {
    position: absolute; right: 0; bottom: 10px; background: transparent;
    color: #6366f1; border: none; font-weight: 600; cursor: pointer;
    text-transform: uppercase; font-size: 0.8rem;
    opacity: 0; visibility: hidden; transition: all 0.2s;
}
.comment-input-wrapper.has-content .comment-send-btn { opacity: 1; visibility: visible; }
.dropdown { margin-left: auto; position: relative; }
.dropdown-toggle {
    color: #52525b; padding: 4px; background: transparent; border: none; cursor: pointer;
}
.dropdown-menu {
    background: #1a1a2e; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 4px; min-width: 140px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    display: none; position: absolute; right: 0; top: 100%; z-index: 50; list-style: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block; padding: 8px 12px; color: #a1a1aa;
    border-radius: 6px; font-size: 0.85rem; cursor: pointer;
    transition: all 0.15s; text-decoration: none;
}
.dropdown-menu li a:hover { background: rgba(99,102,241,0.1); color: #a5b4fc; }

/* ── 5. JIT PATCHES (missing Tailwind arbitrary values) ── */
/* Widths */
.w-\[90\%\]{width:90%} .w-\[120px\]{width:120px} .w-\[140px\]{width:140px}
.w-\[160px\]{width:160px} .w-\[180px\]{width:180px} .w-\[200px\]{width:200px}
.w-\[340px\]{width:340px} .w-\[380px\]{width:380px}
/* Heights */
.h-\[30px\]{height:30px} .h-\[120px\]{height:120px}
/* Min/Max */
.min-w-\[120px\]{min-width:120px} .min-w-\[140px\]{min-width:140px}
.min-w-\[210px\]{min-width:210px}
.max-w-\[300px\]{max-width:300px} .max-w-\[500px\]{max-width:500px}
.max-w-\[600px\]{max-width:600px} .max-w-\[800px\]{max-width:800px}
.max-w-\[1200px\]{max-width:1200px}
.max-w-\[90vw\]{max-width:90vw} .max-w-\[92vw\]{max-width:92vw}
.max-h-\[70vh\]{max-height:70vh} .max-h-\[90vh\]{max-height:90vh}
/* Aspect */
.aspect-\[3\/4\]{aspect-ratio:3/4}
/* Margins */
.mt-\[30px\]{margin-top:30px} .-mt-\[30px\]{margin-top:-30px}
/* Position */
.left-\[17px\]{left:17px}
/* Font sizes */
.text-\[8px\]{font-size:8px} .text-\[9px\]{font-size:9px}
.text-\[10px\]{font-size:10px} .text-\[11px\]{font-size:11px}
.text-\[12px\]{font-size:12px} .text-\[13px\]{font-size:13px}
.text-\[15px\]{font-size:15px} .text-\[22px\]{font-size:22px}
.text-\[0\.3rem\]{font-size:0.3rem} .text-\[0\.45rem\]{font-size:0.45rem}
.text-\[0\.5rem\]{font-size:0.5rem} .text-\[0\.55rem\]{font-size:0.55rem}
.text-\[0\.65rem\]{font-size:0.65rem} .text-\[0\.7rem\]{font-size:0.7rem}
.text-\[0\.8rem\]{font-size:0.8rem}
/* Exact colors */
.bg-\[\#0a0a14\]{background-color:#0a0a14}
.bg-\[\#0b1622\]{background-color:#0b1622}
.bg-\[\#0f172a\]{background-color:#0f172a}
.bg-\[\#1a1a2e\]{background-color:#1a1a2e}
.bg-\[\#1e293b\]{background-color:#1e293b}
.border-\[\#0d0c15\]{border-color:#0d0c15}
.border-\[\#334155\]{border-color:#334155}
/* Opacity brackets */
.bg-white\/\[0\.02\]{background-color:rgba(255,255,255,0.02)}
.bg-white\/\[0\.03\]{background-color:rgba(255,255,255,0.03)}
.bg-white\/\[0\.04\]{background-color:rgba(255,255,255,0.04)}
.bg-white\/\[0\.06\]{background-color:rgba(255,255,255,0.06)}
.border-white\/\[0\.04\]{border-color:rgba(255,255,255,0.04)}
.border-white\/\[0\.05\]{border-color:rgba(255,255,255,0.05)}
.border-white\/\[0\.06\]{border-color:rgba(255,255,255,0.06)}
.border-white\/\[0\.08\]{border-color:rgba(255,255,255,0.08)}
/* Indigo opacity */
.bg-indigo-500\/10{background-color:rgba(99,102,241,0.1)}
.bg-indigo-500\/15{background-color:rgba(99,102,241,0.15)}
.bg-indigo-500\/20{background-color:rgba(99,102,241,0.2)}
.bg-indigo-500\/25{background-color:rgba(99,102,241,0.25)}
.border-indigo-500\/20{border-color:rgba(99,102,241,0.2)}
.border-indigo-500\/25{border-color:rgba(99,102,241,0.25)}
.border-indigo-500\/40{border-color:rgba(99,102,241,0.4)}
.bg-\[rgba\(99\,102\,241\,0\.04\)\]{background-color:rgba(99,102,241,0.04)}
.bg-emerald-500\/12{background-color:rgba(16,185,129,0.12)}
.bg-pink-500\/12{background-color:rgba(236,72,153,0.12)}
.shadow-\[0_0_15px_rgba\(99\,102\,241\,0\.1\)\]{box-shadow:0 0 15px rgba(99,102,241,0.1)}
/* Line clamp */
.line-clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.line-clamp-3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* Hover states */
.hover\:bg-indigo-500\/10:hover{background-color:rgba(99,102,241,0.1)}
.hover\:bg-indigo-500\/15:hover{background-color:rgba(99,102,241,0.15)}
.hover\:bg-indigo-500\/20:hover{background-color:rgba(99,102,241,0.2)}
.hover\:border-indigo-500\/15:hover{border-color:rgba(99,102,241,0.15)}
.hover\:border-indigo-500\/20:hover{border-color:rgba(99,102,241,0.2)}
.hover\:bg-amber-500\/10:hover{background-color:rgba(245,158,11,0.1)}
.hover\:border-amber-500\/20:hover{border-color:rgba(245,158,11,0.2)}
.hover\:bg-sky-500\/10:hover{background-color:rgba(14,165,233,0.1)}
.hover\:border-sky-500\/20:hover{border-color:rgba(14,165,233,0.2)}
.hover\:bg-pink-500\/10:hover{background-color:rgba(236,72,153,0.1)}
.hover\:border-pink-500\/20:hover{border-color:rgba(236,72,153,0.2)}
.hover\:bg-red-500\/10:hover{background-color:rgba(239,68,68,0.1)}
.hover\:border-red-500\/20:hover{border-color:rgba(239,68,68,0.2)}
.hover\:bg-white\/10:hover{background-color:rgba(255,255,255,0.1)}
.hover\:text-indigo-300:hover{color:#a5b4fc}
/* Scrollbar */
.scrollbar-hide::-webkit-scrollbar{display:none}
.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}

/* ── 6. RESPONSIVE ───────────────────────────────────── */
@media (min-width: 640px) {
    .sm\:w-10{width:2.5rem} .sm\:h-10{height:2.5rem}
    .sm\:w-auto{width:auto}
    .sm\:w-\[150px\]{width:150px} .sm\:h-\[150px\]{height:150px}
    .sm\:flex-row{flex-direction:row}
    .sm\:items-center{align-items:center}
    .sm\:justify-start{justify-content:flex-start}
    .sm\:gap-1\.5{gap:0.375rem} .sm\:gap-3{gap:0.75rem} .sm\:gap-6{gap:1.5rem}
    .sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}
    .sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}
    .sm\:py-8{padding-top:2rem;padding-bottom:2rem}
    .sm\:text-sm{font-size:0.875rem;line-height:1.25rem}
    .sm\:text-base{font-size:1rem;line-height:1.5rem}
    .sm\:text-left{text-align:left}
    .sm\:text-5xl{font-size:3rem;line-height:1}
    .sm\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}
}
@media (min-width: 768px) {
    .md\:flex-row{flex-direction:row}
    .md\:gap-5{gap:1.25rem} .md\:gap-7{gap:1.75rem}
    .md\:mx-0{margin-left:0;margin-right:0}
    .md\:justify-start{justify-content:flex-start}
    .md\:text-left{text-align:left}
    .md\:text-2xl{font-size:1.5rem;line-height:2rem}
    .md\:w-\[155px\]{width:155px} .md\:w-\[180px\]{width:180px}
    .md\:w-\[200px\]{width:200px} .md\:w-\[220px\]{width:220px}
}
@media (max-width: 768px) {
    .top-bar-container { padding: 6px 15px; }
}

/* ── 7. HIDE LEGACY ──────────────────────────────────── */
.header-banner, .header-profile-info, .page-header,
.header-logo, .header-title, .search-wrapper, .brand-wrapper {
    display: none !important;
}
