/* Shared theme for the "v2" pages (home2, hot2, post-detail2, login2, register2,
   create2, my-posts2). Keep this file additive-only — the original site's
   assets/pages never load it. */

:root{
  --bg-0:#05060a;
  --bg-1:#0c0f16;
  --accent-1:#7c5cff;
  --accent-2:#ff5cae;
  --accent-3:#5cd0ff;
  --text-0:#f5f6fa;
  --text-1:rgba(245,246,250,.68);
  --text-2:rgba(245,246,250,.42);
  --surface:rgba(255,255,255,.055);
  --surface-hover:rgba(255,255,255,.09);
  --border:rgba(255,255,255,.12);
  --border-strong:rgba(255,255,255,.22);
  --success:#2ee6a6;
  --danger:#ff6b7a;
  --radius:18px;
  --radius-sm:12px;
}

*{ box-sizing:border-box; }

html.v2, body.v2{
  margin:0;
  min-height:100%;
  background:var(--bg-1);
  color:var(--text-0);
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,sans-serif;
}

body.v2{
  position:relative;
}
body.v2::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(124,92,255,.28), transparent 60%),
    radial-gradient(50% 45% at 90% 10%, rgba(255,92,174,.22), transparent 60%),
    radial-gradient(60% 60% at 50% 100%, rgba(92,208,255,.16), transparent 60%),
    var(--bg-1);
}

.v2-app{ position:relative; z-index:1; min-height:100vh; display:flex; flex-direction:column; }

::selection{ background:rgba(124,92,255,.35); }
.v2 ::-webkit-scrollbar{ width:10px; height:10px; }
.v2 ::-webkit-scrollbar-track{ background:transparent; }
.v2 ::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.15); border-radius:999px; }
.v2 ::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,.28); }

.v2 a{ color:var(--accent-3); text-decoration:none; }

/* ---------- Top nav ---------- */
.v2-topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px clamp(16px,4vw,48px);
  background:rgba(8,9,14,.7);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--border);
}
.v2-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  font-size:clamp(16px,2vw,20px);
  color:var(--text-0);
  text-decoration:none;
  flex:0 0 auto;
}
.v2-brand-dot{
  width:10px;height:10px;border-radius:50%;
  background:linear-gradient(135deg,var(--accent-1),var(--accent-2));
  box-shadow:0 0 14px rgba(124,92,255,.85);
}
.v2-nav{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
  justify-content:center;
}
.v2-nav a{
  color:var(--text-1);
  text-decoration:none;
  font-size:13.5px;
  font-weight:500;
  padding:8px 14px;
  border-radius:999px;
  transition:color .2s ease, background .2s ease;
  white-space:nowrap;
}
.v2-nav a:hover{ color:var(--text-0); background:rgba(255,255,255,.08); }
.v2-nav a.is-active{ color:#0a0a0f; background:linear-gradient(135deg,var(--accent-3),var(--accent-1)); font-weight:700; }
.v2-nav-side{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.v2-avatar{
  width:32px;height:32px;border-radius:50%;
  background:linear-gradient(135deg,var(--accent-1),var(--accent-2));
  background-size:cover; background-position:center;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:12px; color:#0a0a0f;
  border:1px solid var(--border-strong);
}
.v2-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:9px 18px;
  border-radius:999px;
  font-size:13.5px;
  font-weight:700;
  border:none;
  cursor:pointer;
  font-family:inherit;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
  white-space:nowrap;
}
.v2-btn-primary{ color:#0a0a0f; background:linear-gradient(135deg,var(--accent-3),var(--accent-1)); }
.v2-btn-primary:hover{ transform:translateY(-1px); box-shadow:0 10px 26px rgba(124,92,255,.4); }
.v2-btn-primary:disabled{ opacity:.55; cursor:default; transform:none; box-shadow:none; }
.v2-btn-ghost{ color:var(--text-0); background:rgba(255,255,255,.08); border:1px solid var(--border); }
.v2-btn-ghost:hover{ background:rgba(255,255,255,.14); }
.v2-btn-danger{ color:var(--danger); background:rgba(255,107,122,.13); border:1px solid rgba(255,107,122,.3); }
.v2-btn-danger:hover{ background:rgba(255,107,122,.22); }
.v2-btn-block{ width:100%; }
.v2-btn-lg{ padding:12px 22px; font-size:15px; }

.v2-mobile-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  flex-direction:column;
  gap:5px;
  padding:6px;
}
.v2-mobile-toggle span{ width:22px; height:2px; border-radius:2px; background:var(--text-0); }

/* ---------- Layout shells ---------- */
.v2-main{ position:relative; z-index:1; flex:1 1 auto; padding:clamp(20px,4vh,44px) clamp(16px,4vw,48px) 60px; }
.v2-main-narrow{ max-width:760px; margin:0 auto; width:100%; }
.v2-main-wide{ max-width:1280px; margin:0 auto; width:100%; }

.v2-page-head{ margin-bottom:clamp(18px,3vh,32px); }
.v2-page-head h1{
  margin:0 0 8px;
  font-size:clamp(24px,3.4vw,38px);
  font-weight:800;
  letter-spacing:-.5px;
  line-height:1.1;
}
.v2-page-head h1 span{
  background:linear-gradient(90deg,var(--accent-3),var(--accent-1) 55%,var(--accent-2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.v2-page-head p{ margin:0; color:var(--text-1); font-size:clamp(13px,1.1vw,16px); max-width:640px; }

/* ---------- Panels / cards ---------- */
.v2-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:clamp(18px,3vw,32px);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.v2-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:clamp(12px,1.6vw,20px);
}
.v2-card{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  background:#11141c;
  border:1px solid var(--border);
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  display:block;
  color:inherit;
}
.v2-card:hover{ transform:translateY(-5px); box-shadow:0 16px 40px rgba(124,92,255,.3); border-color:var(--border-strong); }
.v2-card-media-wrap{ position:relative; width:100%; aspect-ratio:1/1; background:#11141c; overflow:hidden; }
.v2-card-media{ width:100%; height:100%; object-fit:cover; display:block; border:0; pointer-events:none; }
.v2-card-body{ padding:12px 14px 14px; }
.v2-card-title{
  font-size:14px; font-weight:600; color:var(--text-0);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.3;
  margin:0 0 6px;
}
.v2-card-meta{ display:flex; align-items:center; gap:10px; font-size:12px; color:var(--text-1); }
.v2-card-like{ display:inline-flex; align-items:center; gap:4px; }

.v2-empty{
  text-align:center;
  padding:60px 20px;
  color:var(--text-1);
}
.v2-empty h3{ color:var(--text-0); margin:0 0 8px; font-size:20px; }

/* ---------- Forms ---------- */
.v2-form-group{ margin-bottom:18px; }
.v2-form-group label{ display:block; font-weight:600; font-size:13.5px; margin-bottom:7px; color:var(--text-0); }
.v2-form-group .v2-hint{ color:var(--text-2); font-size:12px; margin-top:6px; }
.v2-input,
.v2-textarea,
.v2-select{
  width:100%;
  padding:12px 14px;
  background:rgba(255,255,255,.05);
  border:1.5px solid var(--border);
  border-radius:var(--radius-sm);
  font-size:14.5px;
  font-family:inherit;
  color:var(--text-0);
  transition:border-color .2s ease, background .2s ease;
}
.v2-input::placeholder, .v2-textarea::placeholder{ color:var(--text-2); }
.v2-textarea{ resize:vertical; min-height:110px; }
.v2-input:focus, .v2-textarea:focus, .v2-select:focus{
  outline:none; border-color:var(--accent-1); background:rgba(255,255,255,.09);
}
.v2-select option{ background:#12141c; color:var(--text-0); }

.v2-file-drop{
  display:flex; align-items:center; justify-content:center; flex-direction:column; gap:6px;
  border:1.5px dashed var(--border-strong);
  border-radius:var(--radius-sm);
  padding:22px 14px;
  cursor:pointer;
  color:var(--text-1);
  font-size:13px;
  transition:border-color .2s ease, background .2s ease;
  text-align:center;
}
.v2-file-drop:hover{ border-color:var(--accent-1); background:rgba(124,92,255,.06); }
.v2-file-drop input{ display:none; }
.v2-file-preview{ max-width:100%; max-height:160px; border-radius:10px; margin-top:10px; display:none; }

.v2-chip-row{ display:flex; flex-wrap:wrap; gap:8px; }
.v2-chip{
  padding:8px 16px;
  border-radius:999px;
  border:1.5px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text-1);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
}
.v2-chip.is-active{
  color:#0a0a0f;
  background:var(--accent-3);
  border-color:transparent;
}
.v2-chip.is-locked{ opacity:.5; cursor:not-allowed; }
.v2-chip.is-locked::after{ content:" 🔒"; }

.v2-alert{ padding:13px 16px; border-radius:12px; margin-bottom:18px; font-size:13.5px; border:1px solid transparent; }
.v2-alert-error{ background:rgba(255,107,122,.12); color:var(--danger); border-color:rgba(255,107,122,.3); }
.v2-alert-success{ background:rgba(46,230,166,.12); color:var(--success); border-color:rgba(46,230,166,.3); }

.v2-spinner{
  width:16px;height:16px; border-radius:50%;
  border:2px solid rgba(10,10,15,.35); border-top-color:#0a0a0f;
  animation:v2-spin .7s linear infinite; display:none;
}
.v2-btn.is-loading .v2-spinner{ display:inline-block; }
.v2-btn.is-loading .v2-btn-label{ opacity:.7; }
@keyframes v2-spin{ to{ transform:rotate(360deg); } }

.v2-divider{ height:1px; background:var(--border); border:none; margin:24px 0; }

.v2-auth-shell{
  min-height:calc(100vh - 70px);
  display:flex; align-items:center; justify-content:center;
  padding:32px 16px;
}
.v2-auth-box{ width:100%; max-width:420px; }
.v2-auth-switch{ text-align:center; margin-top:18px; color:var(--text-1); font-size:13.5px; }
.v2-auth-switch a{ font-weight:700; }

.v2-footer{
  position:relative; z-index:1;
  text-align:center; color:var(--text-1); font-size:13px;
  padding:18px 16px 24px;
}
.v2-footer a{ color:var(--text-0); font-weight:600; }

@media (max-width:860px){
  .v2-nav{
    position:absolute; top:100%; left:0; right:0;
    flex-direction:column; align-items:stretch; gap:2px;
    background:rgba(8,9,14,.97);
    backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
    border-bottom:1px solid var(--border);
    padding:10px;
    display:none;
  }
  .v2-nav.is-open{ display:flex; }
  .v2-nav a{ padding:12px 14px; }
  .v2-mobile-toggle{ display:flex; }
  .v2-topbar{ position:sticky; flex-wrap:wrap; }
}
