:root{
  --gold:#d4af37;
  --ink:#121212;
  --parchment:#f7f1e1;
  --parchment-2:#efe5c7;
  --blood:#b22222;
  --jade:#3fa47a;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

.fix-modal{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;z-index:9999}
.fix-modal.shown{display:flex}
.fix-card{width:min(680px,92vw);background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(0,0,0,.35));border:1px solid rgba(212,175,55,.35);border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.5);backdrop-filter:blur(8px);color:#f1e9cf}
.fix-title{padding:14px 16px;border-bottom:1px solid rgba(212,175,55,.2);font-weight:800;letter-spacing:.3px}
.fix-body{padding:14px 16px}
.fix-body code{color:#ffe08a}
.fix-body pre{background:rgba(0,0,0,.4);border:1px solid rgba(212,175,55,.25);padding:10px;border-radius:12px;overflow:auto}
.fix-close{margin:0 16px 16px auto;display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:12px;border:1px solid #a88b2a;background:linear-gradient(180deg,#ffd56a,#d4af37);color:#111;font-weight:700;cursor:pointer}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:#fff;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  overflow-x:hidden;
  background:#000;
}

/* Video nền + lớp phủ */
#background-video{
  position:fixed; inset:0;
  width:100%; height:100%;
  object-fit:cover; z-index:-2;
  filter:brightness(.35) saturate(1.1);
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(1200px 600px at 70% 10%, rgba(212, 175, 55, .12), transparent 60%),
              linear-gradient(to bottom, rgba(0, 0, 0, .5), rgb(0 0 0 / 13%) 60%, rgb(28 28 28 / 15%));
  pointer-events: none;
}

/* Sương mù */
.fog{
  position:fixed; inset:-10% -10% auto -10%; height:60%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="800" height="200"><defs><radialGradient id="g" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="white" stop-opacity=".15"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><circle cx="100" cy="100" r="100" fill="url(%23g)"/><circle cx="400" cy="80" r="120" fill="url(%23g)"/><circle cx="700" cy="120" r="100" fill="url(%23g)"/></svg>') repeat-x;
  background-size:1200px 300px;
  animation:fogMove 70s linear infinite;
  opacity:.6; filter:blur(8px); z-index:-1;
}
@keyframes fogMove{
  from{transform:translateX(0)}
  to{transform:translateX(-1200px)}
}

/* Cánh hoa rơi */
.petal::before, .petal::after{
  content:"";
  position:fixed; top:-10vh; width:12px; height:18px; border-radius:12px 12px 12px 12px/14px 14px 4px 4px;
  background:rgba(255,192,203,.75);
  box-shadow: 0 0 10px rgba(255,182,193,.5);
  animation:fall 12s linear infinite;
  transform:rotate(20deg);
  z-index:0;
}
.petal::after{ left:75%; animation-delay:2s; opacity:.7 }
.petal::before{ left:25%; animation-delay:6s; opacity:.9 }
@keyframes fall{
  0%{ transform:translateY(-10vh) rotate(10deg) }
  100%{ transform:translateY(120vh) rotate(360deg) }
}

/* Container trung tâm */
.wrap{
  min-height:100dvh;
  display:grid; place-items:center;
  padding:48px 16px;
}

/* Tiêu đề kiểu thư pháp vàng */
.brand{
  text-align:center; margin-bottom:18px;
}
.brand h1{
  margin:0;
  font-weight:800;
  letter-spacing:.5px;
  font-size: clamp(28px, 4vw, 44px);
  background:linear-gradient(180deg, #fff, var(--gold) 40%, #8a6d1d 80%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  text-shadow: 0 2px 14px rgba(212,175,55,.25);
}
.brand p{
  margin:6px 0 0; color:#e9e2c8; opacity:.9;
  font-size:14px;
}

/* Thẻ đăng ký giấy cổ */
.card{
  width: min(1100px, 100%);
  background:
    linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.55)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"><g fill="%23ffffff" fill-opacity=".04"><rect width="12" height="12"/></g></svg>');
  border:1px solid rgba(212,175,55,.28);
  box-shadow: var(--shadow);
  border-radius: 18px;
  overflow:hidden;
  backdrop-filter: blur(8px);
}

.card__head{
  padding:22px 22px 10px;
  display:flex; align-items:center; justify-content:center; gap:12px;
}
.sword{
  width:42px; height:42px; flex:0 0 auto; filter:drop-shadow(0 4px 8px rgba(0,0,0,.6));
}
.subtitle{
  margin:0; color:#f2e9cf; font-weight:600; letter-spacing:.3px;
  text-transform:uppercase; font-size:12px; opacity:.85;
}

.divider{
  height:1px; width:100%;
  background:linear-gradient(90deg, transparent, rgba(212,175,55,.65), transparent);
  margin:8px 0 0;
}

.card__body{
  display:grid; grid-template-columns: 1.2fr 1fr; gap:0;
}
@media (max-width: 900px){
  .card__body{ grid-template-columns: 1fr; }
}

/* Panel trái – giới thiệu */
.panel-left{
  padding:28px 26px 26px;
  border-right:1px solid rgba(212,175,55,.18);
}
@media (max-width: 900px){
  .panel-left{ border-right:0; border-bottom:1px solid rgba(212,175,55,.18); }
}
.panel-left h2{
  margin:0 0 8px; font-size: clamp(20px, 3vw, 28px);
  color:#fff; font-weight:700;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.panel-left .lead{
  margin:0 0 16px; color:#e7dcc3; line-height:1.6;
  font-size:15px; opacity:.95;
}
.features{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
  margin-top:12px;
}
.feature{
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.2));
  border:1px solid rgba(255,255,255,.08);
  padding:12px 12px; border-radius:12px; color:#f1e9cf; font-size:14px;
}

/* Panel phải – form */
.panel-right{
  padding:26px 24px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
}

.errors{
  background:linear-gradient(180deg, rgba(178,34,34,.18), rgba(178,34,34,.28));
  border:1px solid rgba(255, 99, 99, .35);
  color:#ffeaea; padding:10px 12px; border-radius:10px; margin-bottom:14px;
}
.errors p{ margin:6px 0; font-size:14px }

.group{ margin-bottom:14px }
label{
  display:block; margin:0 0 6px; color:#f3e9c8; font-size:13px; letter-spacing:.2px;
}
input[type="text"], input[type="password"]{
  width:100%; padding:12px 14px; font-size:15px;
  color:#f9f9f9; background:rgba(255,255,255,.06);
  border:1px solid rgba(212,175,55,.25);
  border-radius:12px; outline:none;
  transition: box-shadow .2s ease, transform .06s ease, border-color .2s ease;
}
input[type="text"]:focus, input[type="password"]:focus{
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 18px;
  font-weight:700; letter-spacing:.3px;
  color:#111; background:linear-gradient(180deg, #ffd56a, #d4af37);
  border:1px solid #a88b2a; border-radius:14px;
  cursor:pointer; width:100%;
  box-shadow: 0 8px 18px rgba(212,175,55,.25);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover{ filter:saturate(1.1); box-shadow: 0 10px 22px rgba(212,175,55,.33) }
.btn:active{ transform: translateY(1px) }

/* Footer */
.footer{
  text-align:center; color:#e9e2c8; font-size:13px; margin-top:18px;
}
.footer a{ color:#ffe08a; text-decoration:none }
.footer a:hover{ text-decoration:underline }

/* Dòng kiếm trang trí */
.ornament{
  height:14px; position:relative; margin:6px 0 14px;
}
.ornament::before, .ornament::after{
  content:""; position:absolute; top:50%; width:40%;
  height:2px; background:linear-gradient(90deg, transparent, rgba(212,175,55,.7));
}
.ornament::before{ left:0; transform:translateY(-50%) }
.ornament::after{ right:0; transform:translateY(-50%) rotate(180deg) }
.glow{
  filter: drop-shadow(0 0 14px rgba(212,175,55,.35));
}
