/* ============================================================
   BAGIAN 3: TEMA MODERN GELAP FUTURISTIK + EFEK AIR + GLASSMORPHISM
   ============================================================ */

:root {
  --bg-black: #020617;
  --bg-slate: #0f172a;
  --bg-slate-light: #1e293b;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.15);
  --blue: #0ea5e9;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --danger: #f87171;
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(34, 211, 238, 0.25);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-black);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.text-dim { color: var(--text-dim); }

/* ============= SPA SECTIONS ============= */
.page-section { display: none; min-height: 100vh; position: relative; }
.page-section.active { display: block; }

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

/* ============= NAVBAR ============= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-brand { font-size: 20px; font-weight: 700; color: var(--text); }
.nav-brand span { color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--text-dim); text-decoration: none; cursor: pointer; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--cyan); }
.nav-user { color: var(--text-dim); font-size: 14px; }
.nav-user strong { color: var(--cyan); }

/* ============= AVATAR & BADGE TERVERIFIKASI ============= */
.nav-profile { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.edit-username-btn { cursor: pointer; font-size: 13px; opacity: .7; margin-left: 2px; }
.edit-username-btn:hover { opacity: 1; }
.avatar-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #001018;
  overflow: hidden;
  border: 2px solid rgba(34,211,238,.5);
  flex-shrink: 0;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.verified-badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  margin-left: 4px;
  clip-path: polygon(50.0% 0.0%, 63.4% 17.7%, 85.4% 14.6%, 82.3% 36.6%, 100.0% 50.0%, 82.3% 63.4%, 85.4% 85.4%, 63.4% 82.3%, 50.0% 100.0%, 36.6% 82.3%, 14.6% 85.4%, 17.7% 63.4%, 0.0% 50.0%, 17.7% 36.6%, 14.6% 14.6%, 36.6% 17.7%);
  background: #22c55e;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  vertical-align: middle;
}
.verified-badge.admin-badge {
  position: relative;
  overflow: hidden;
  background-color: #0a0a0a;
  background-image: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.95) 48%, transparent 66%);
  background-size: 300% 300%;
  background-position: 200% 0;
  color: #ffffff;
  filter: drop-shadow(0 0 1.4px #ffffff) drop-shadow(0 0 0.6px #ffffff);
  animation: badgeShine 2.2s ease-in-out infinite;
}
@keyframes badgeShine {
  0%   { background-position: 200% 0%; }
  100% { background-position: -100% 0%; }
}

.comment-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #001018;
  overflow: hidden;
  flex-shrink: 0;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-item { display: flex; gap: 10px; align-items: flex-start; }
.comment-item .comment-body { flex: 1; }

.admin-avatar-cell {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #001018;
  overflow: hidden;
}
.admin-avatar-cell img { width: 100%; height: 100%; object-fit: cover; }
.btn-logout {
  background: transparent; border: 1px solid var(--danger); color: var(--danger);
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600;
  transition: all .2s;
}
.btn-logout:hover { background: var(--danger); color: #fff; }

/* ============================================================
   EFEK AIR / OMBAK BERGERAK — CSS KEYFRAMES MURNI
   Aktif otomatis karena hanya berada di dalam #authSection
   ============================================================ */
.wave-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  --grade-scene: hue-rotate(138deg) saturate(0.82) brightness(0.5) contrast(1.12);
  --grade-leaf: hue-rotate(138deg) saturate(1.05) brightness(0.72);
  background: #08160f;
}

.wave-container .bg,
.wave-container .trees {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--grade-scene);
  transform: scale(1.08);
  pointer-events: none;
}
.wave-container .trees { z-index: 3; }

.rider {
  position: absolute;
  bottom: 12%;
  scale: .58;
  z-index: 3;
  filter: var(--grade-scene) drop-shadow(0 18px 22px rgba(0,0,0,.4));
  pointer-events: none;
  animation: ride 13s linear infinite;
}
@keyframes ride {
  0%     { transform: translateX(calc(100% + 100vw)); }
  50%    { transform: translateX(calc(-100% - 100vw)); }
  50.01% { transform: translateX(calc(-100% - 100vw)) rotateY(180deg); }
  100%   { transform: translateX(calc(100% + 100vw)) rotateY(180deg); }
}

/* aurora yang berpendar di langit */
.aurora {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  filter: blur(45px);
  opacity: .55;
  mix-blend-mode: screen;
}
.aurora__band { position: absolute; border-radius: 50%; }
.aurora .a1 {
  width: 75vw; height: 42vh; left: -12vw; top: -8vh;
  background: radial-gradient(closest-side, rgba(124, 92, 255, .5), transparent);
  animation: aur1 20s ease-in-out infinite;
}
.aurora .a2 {
  width: 62vw; height: 38vh; right: -8vw; top: -6vh;
  background: radial-gradient(closest-side, rgba(74, 214, 150, .44), transparent);
  animation: aur2 26s ease-in-out infinite;
}
@keyframes aur1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(7vw,4vh) scale(1.12); } }
@keyframes aur2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-6vw,5vh) scale(1.16); } }

/* bulan — sumber cahaya utama scene */
.moon {
  position: absolute;
  top: 8%; left: 69%;
  width: 108px; height: 108px;
  border-radius: 50%;
  z-index: 4;
  background: radial-gradient(circle at 38% 34%, #fdfdff 0%, #e6e9ff 44%, #c3c0ff 70%, rgba(176,170,255,0) 74%);
  box-shadow: 0 0 70px 26px rgba(196,202,255,.34), 0 0 170px 70px rgba(150,138,255,.16);
  pointer-events: none;
  animation: moonBreathe 9s ease-in-out infinite;
}
@keyframes moonBreathe { 0%,100% { opacity: .9; } 50% { opacity: 1; } }

/* bintang berkelip di langit */
.stars { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.star {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(233,236,255,.95);
  box-shadow: 0 0 5px 1px rgba(200,206,255,.6);
  animation: twinkle var(--tw, 4s) ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: .15; } 50% { opacity: .95; } }

/* wash gelap malam menyatukan seluruh scene */
.nightfall {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(40vw 34vw at 69% 8%, rgba(200,208,255,.22), rgba(150,140,255,.08) 44%, transparent 64%),
    linear-gradient(180deg, rgba(30,22,68,.5) 0%, rgba(20,16,52,.24) 44%, rgba(8,7,30,.66) 100%),
    radial-gradient(125% 95% at 50% 44%, transparent 44%, rgba(6,6,22,.72) 100%);
}

/* kunang-kunang melayang di antara pepohonan */
.fireflies { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.firefly {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,244,194,.95), rgba(255,214,120,.18) 60%, transparent 70%);
  box-shadow: 0 0 9px 2px rgba(255,206,110,.55);
  animation: drift var(--dur, 8s) ease-in-out infinite alternate, glow 2.6s ease-in-out infinite;
}
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(var(--dx, 20px), var(--dy, -24px)); } }
@keyframes glow { 0%,100% { opacity: .2; } 50% { opacity: 1; } }

/* daun berguguran (memakai gambar asli, transform+opacity saja) */
.leaves { position: absolute; inset: 0; overflow: hidden; z-index: 3; pointer-events: none; }
.leaves .set { position: absolute; inset: 0; }
.leaves .set div { position: absolute; top: 0; display: block; }
.leaves .set img { filter: var(--grade-leaf); width: 26px; }
.leaves .set div:nth-child(1) { left: 20%; animation: leafFall 20s linear infinite; }
.leaves .set div:nth-child(2) { left: 50%; animation: leafFall 14s linear infinite; }
.leaves .set div:nth-child(3) { left: 70%; animation: leafFall 12s linear infinite; }
.leaves .set div:nth-child(4) { left: 5%;  animation: leafFall 16s linear infinite; }
.leaves .set div:nth-child(5) { left: 85%; animation: leafFall 18s linear infinite; }
.leaves .set div:nth-child(6) { left: 90%; animation: leafFall 11s linear infinite; }
.leaves .set div:nth-child(7) { left: 15%; animation: leafFall 15s linear infinite; }
.leaves .set div:nth-child(8) { left: 60%; animation: leafFall 13s linear infinite; }
@keyframes leafFall {
  0%   { opacity: 0; transform: translate(20px, -12vh) rotate(0deg); }
  10%  { opacity: 1; }
  20%  { transform: translate(-20px, 12vh) rotate(45deg); }
  40%  { transform: translate(-20px, 36vh) rotate(90deg); }
  60%  { transform: translate(20px, 60vh) rotate(180deg); }
  80%  { opacity: 1; transform: translate(-20px, 84vh) rotate(45deg); }
  100% { opacity: 0; transform: translate(20px, 112vh) rotate(225deg); }
}

/* ============= GLASSMORPHISM ============= */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* ============= AUTH CARDS ============= */
.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  position: relative;
  display: none;
  width: 100%; max-width: 400px;
  padding: 40px 32px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(44, 33, 84, 0.58), rgba(20, 14, 44, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 2px 10px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(124, 92, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  animation: fadeUp .5s ease;
  transform: perspective(900px) rotateY(var(--ry, 0deg));
  transition: transform .15s ease-out;
  will-change: transform;
}
.auth-card.active { display: block; }
.card-content { position: relative; z-index: 3; }

/* sheen mengikuti posisi kursor di atas kaca */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.14), transparent 42%);
}

/* Tombol khusus di halaman Login/Register: gradient ungu-violet
   (tombol lain di aplikasi tetap warna cyan seperti biasa) */
.auth-card .btn-primary {
  background: linear-gradient(120deg, #8b5cf6, #6366f1);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.auth-card .btn-primary:hover {
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.55), 0 6px 20px rgba(99, 102, 241, 0.35);
}

/* Spinner loading saat tombol Masuk/Daftar diproses */
.btn-primary.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}
.btn-primary.is-loading::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow:
      0 0 18px rgba(34, 211, 238, 0.25),
      0 0 55px rgba(14, 165, 233, 0.15),
      inset 0 0 30px rgba(34, 211, 238, 0.04);
    border-color: rgba(34, 211, 238, 0.35);
  }
  50% {
    box-shadow:
      0 0 28px rgba(34, 211, 238, 0.5),
      0 0 90px rgba(14, 165, 233, 0.3),
      inset 0 0 45px rgba(34, 211, 238, 0.08);
    border-color: rgba(34, 211, 238, 0.6);
  }
}

.brand-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.brand-title span {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.7), 0 0 22px rgba(34, 211, 238, 0.4);
}
.subtitle { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

.form-group { text-align: left; margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-group input, .comment-input input, .admin-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.5);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.auth-card .form-group input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.auth-card .form-group input::placeholder { color: rgba(226, 232, 240, 0.65); }
.form-group input:focus, .comment-input input:focus, .admin-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), 0 0 14px rgba(34, 211, 238, 0.35);
}

.otp-row { display: flex; gap: 8px; }
.otp-row input { flex: 1; min-width: 0; }
.btn-otp {
  flex-shrink: 0;
  padding: 0 14px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 10px;
  background: transparent;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-otp:hover:not(:disabled) { background: rgba(34, 211, 238, 0.15); }
.btn-otp:disabled { opacity: .6; cursor: not-allowed; color: var(--text-dim); border-color: rgba(148,163,184,0.25); }

.btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--cyan), var(--blue));
  color: #001018;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.6), 0 6px 20px var(--cyan-dim);
}
.btn-small { width: auto; padding: 12px 20px; margin-top: 0; }

.error-text { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }
.switch-text { margin-top: 20px; font-size: 13px; color: var(--text-dim); }
.switch-text a { color: var(--cyan); cursor: pointer; font-weight: 600; text-decoration: none; }

/* ============= HALAMAN UTAMA ============= */
.section-title { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.section-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.video-card {
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: transform .2s, box-shadow .2s;
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px var(--cyan-dim); }
.video-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.video-card p {
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.episode-count {
  display: block;
  padding: 0 12px 12px;
  margin-top: -8px;
  font-size: 12px;
  color: var(--cyan);
}

.player-area { margin-top: 40px; }
.btn-close {
  background: transparent; border: 1px solid var(--glass-border); color: var(--text-dim);
  padding: 8px 16px; border-radius: 8px; cursor: pointer; margin-bottom: 16px;
}
.btn-close:hover { color: var(--cyan); border-color: var(--cyan); }

.video-frame-wrapper {
  padding: 12px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-frame-wrapper iframe { width: 100%; height: 100%; border-radius: 10px; border: none; }
.player-title { margin: 16px 0; font-size: 20px; font-weight: 700; }

.comments-section { padding: 24px; margin-top: 20px; }
.comments-section h4 { margin-bottom: 16px; }
.comments-list { max-height: 280px; overflow-y: auto; margin-bottom: 16px; }
.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.comment-item strong { color: var(--cyan); font-size: 13px; }
.comment-item p { font-size: 14px; margin-top: 2px; color: var(--text); }
.comment-input { display: flex; gap: 10px; }
.comment-input input { flex: 1; }

/* ============= DASHBOARD ADMIN ============= */
.admin-panel { padding: 32px; }
.admin-form { margin: 24px 0 32px; }
.admin-form label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.admin-form-row { display: flex; gap: 10px; }
.admin-form-row input { flex: 1; }
.admin-msg { display: block; margin-top: 10px; font-size: 13px; color: var(--cyan); }

.table-title { margin-bottom: 14px; font-size: 17px; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 14px;
}
th { color: var(--cyan); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tbody tr:hover { background: rgba(34, 211, 238, 0.05); }

.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-mini {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid;
  cursor: pointer;
  background: transparent;
  white-space: nowrap;
  transition: background .15s, transform .1s;
}
.btn-mini:hover { transform: translateY(-1px); }
.btn-mini.promote { color: var(--cyan); border-color: rgba(34,211,238,.5); }
.btn-mini.promote:hover { background: rgba(34,211,238,.15); }
.btn-mini.demote { color: var(--text-dim); border-color: rgba(148,163,184,.4); }
.btn-mini.demote:hover { background: rgba(148,163,184,.15); }
.btn-mini.delete { color: var(--danger); border-color: rgba(248,113,113,.5); }
.btn-mini.delete:hover { background: rgba(248,113,113,.15); }
.badge-admin {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(34,211,238,.15);
  color: var(--cyan);
  border: 1px solid rgba(34,211,238,.4);
}
.badge-user {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid rgba(148,163,184,.25);
}

/* ============================================================
   NOTIFIKASI TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
}

/* ============= NOTIFIKASI TENGAH LAYAR (AKSI ADMIN) ============= */
.center-notice {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
.center-notice-box {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 36px 44px;
  text-align: center;
  min-width: 260px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.55),
    0 8px 20px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 40px rgba(34, 211, 238, 0.06);
  animation: noticePop .35s cubic-bezier(.34,1.56,.64,1);
}
.center-notice-box::before {
  content: "";
  position: absolute;
  top: 0; left: -20%;
  width: 60%; height: 100%;
  background: linear-gradient(115deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 55%);
  pointer-events: none;
}
.center-notice.success .center-notice-box { border-color: rgba(34, 211, 238, 0.45); box-shadow: 0 25px 60px rgba(0,0,0,.55), 0 8px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.15), 0 0 45px rgba(34,211,238,.18); }
.center-notice.error .center-notice-box { border-color: rgba(248, 113, 113, 0.45); box-shadow: 0 25px 60px rgba(0,0,0,.55), 0 8px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.15), 0 0 45px rgba(248,113,113,.18); }
.center-notice-icon {
  width: 60px; height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.3), 0 4px 14px rgba(0,0,0,.3);
}
.center-notice.success .center-notice-icon { background: radial-gradient(circle at 35% 30%, rgba(34,211,238,.4), rgba(34,211,238,.15)); color: var(--cyan); }
.center-notice.error .center-notice-icon { background: radial-gradient(circle at 35% 30%, rgba(248,113,113,.4), rgba(248,113,113,.15)); color: var(--danger); }
.center-notice-text { position: relative; color: var(--text); font-size: 16px; font-weight: 600; }
@keyframes noticePop {
  0% { transform: scale(.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.confirm-box { min-width: 300px; max-width: 380px; }
.confirm-icon {
  background: radial-gradient(circle at 35% 30%, rgba(251, 191, 36, .45), rgba(251, 191, 36, .15));
  color: #fbbf24;
  margin-bottom: 14px;
}
.confirm-icon.danger {
  background: radial-gradient(circle at 35% 30%, rgba(248, 113, 113, .45), rgba(248, 113, 113, .15));
  color: var(--danger);
}
.confirm-modal-title {
  position: relative;
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.confirm-box .center-notice-text { margin-bottom: 22px; font-size: 14px; color: var(--text-dim); }
.confirm-box .center-notice-text { margin-bottom: 22px; font-size: 15px; }
.confirm-modal-actions { position: relative; display: flex; gap: 10px; justify-content: center; }
.confirm-modal-actions .btn-mini {
  padding: 10px 22px;
  font-size: 13px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.confirm-modal-actions .btn-mini.promote {
  background: linear-gradient(120deg, var(--cyan), var(--blue));
  color: #001018;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(34,211,238,.35);
}
.confirm-modal-actions .btn-mini.promote:hover { box-shadow: 0 6px 22px rgba(34,211,238,.5); transform: translateY(-1px); }
.confirm-modal-actions .btn-mini.demote {
  background: rgba(255,255,255,0.04);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn .4s cubic-bezier(.34,1.56,.64,1) forwards;
}
.toast.exit { animation: toastOut .35s ease forwards; }

.toast.success { border-left: 4px solid var(--cyan); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--blue); }

.toast-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.toast.success .toast-icon { background: rgba(34, 211, 238, 0.18); color: var(--cyan); }
.toast.error .toast-icon { background: rgba(248, 113, 113, 0.18); color: var(--danger); }
.toast.info .toast-icon { background: rgba(14, 165, 233, 0.18); color: var(--blue); }

.toast-msg { font-size: 14px; color: var(--text); line-height: 1.4; }

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* ============================================================
   ANIMASI KARTU LOGIN/REGISTER: GAGAL (SHAKE) & BERHASIL (PULSE)
   ============================================================ */
.shake {
  animation: shakeCard .5s cubic-bezier(.36,.07,.19,.97) both;
  border-color: var(--danger) !important;
}
@keyframes shakeCard {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.success-pulse {
  animation: successGlow .7s ease;
}
@keyframes successGlow {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6); border-color: var(--cyan); }
  60%  { box-shadow: 0 0 0 22px rgba(34, 211, 238, 0); border-color: var(--cyan); }
  100% { box-shadow: 0 8px 32px rgba(0,0,0,0.45); }
}

/* ============================================================
   OVERLAY "MENGALIHKAN KE DASHBOARD ADMIN..."
   ============================================================ */
.redirect-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn .3s ease;
}
.redirect-box { text-align: center; }
.spinner {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border: 4px solid rgba(34, 211, 238, 0.18);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.redirect-text {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .3px;
  animation: pulseText 1.4s ease-in-out infinite;
}
@keyframes pulseText {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============= RESPONSIVE ============= */
@media (max-width: 640px) {
  .navbar { padding: 14px 16px; }
  .nav-links { gap: 12px; }
  .nav-user { display: none; }
  .container { padding: 90px 16px 40px; }
  .admin-form-row { flex-direction: column; }
  .admin-form-row button { width: 100%; }
  .toast-container { top: 12px; right: 12px; left: 12px; max-width: none; }
}

/* ============================================================
   ▼▼▼ TAMBAHAN BARU — FITUR PROFIL PENGGUNA (CYBERPUNK GLASS) ▼▼▼
   Semua rule di bawah ini murni tambahan untuk mendukung fitur
   dropdown profil & halaman detail profil yang baru ditambahkan
   di index.html/app.js. Tidak ada kode lama di atas yang diubah.
   ============================================================ */

#profileDropdown {
  animation: dropdownFadeIn .18s ease;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#profileAvatarImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#profileSection .container {
  min-height: auto;
}
