/* =========================
   LOGIN
========================= */

.login-screen{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #190d32 0%,
      #070411 45%,
      #05030e 75%
    )
}

.login-card{
  width:min(440px,100%);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:26px;
  padding:40px 32px;
  text-align:center;
  box-shadow:0 30px 80px #0005
}

.login-card .logo{
  margin:0 auto 18px
}

.login-card h2{
  margin:0 0 6px;
  font-size:22px
}

.login-card>p{
  color:var(--muted);
  font-size:12px;
  margin:0 0 26px;
  line-height:1.7
}

.login-card label{
  display:block;
  text-align:right;
  margin-bottom:16px
}

.login-card label span{
  display:block;
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:7px
}

.login-card input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#0a0612;
  color:var(--text);
  font:inherit;
  font-size:13px;
  outline:none;
  transition:border-color .2s
}

.login-card input:focus{
  border-color:var(--purple)
}

.login-card .btn{
  width:100%;
  margin-top:6px
}

.login-error{
  margin-top:14px;
  font-size:12px;
  color:#f87171;
  background:#f8717114;
  border:1px solid #f8717133;
  padding:10px 14px;
  border-radius:10px
}


/* =========================
   ADMIN LAYOUT
========================= */

.admin-screen{
  min-height:100vh;
  padding:0 24px 60px;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, #170c2fc9, transparent 70%),
    radial-gradient(ellipse 50% 35% at 90% 10%, #1a0d30c9, transparent 70%),
    var(--bg)
}

.admin-header{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  gap:14px;
  max-width:1100px;
  margin:0 auto 34px;
  padding:16px 0;
  border-bottom:1px solid var(--border);
  background:#05030ef2;
  backdrop-filter:blur(12px)
}

.admin-header span{
  font-size:13px;
  font-weight:700;
  color:var(--muted)
}

.header-actions{
  margin-right:auto;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap
}

.header-actions .lang-switch{
  flex:none
}

.admin-grid{
  max-width:1100px;
  margin:auto
}

.admin-card{
  position:relative;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:24px;
  padding:28px;
  box-shadow:0 30px 70px #0004;
  overflow:hidden
}

.card-glow{
  position:absolute;
  top:-120px;
  left:50%;
  transform:translateX(-50%);
  width:340px;
  height:200px;
  border-radius:50%;
  background:#7c3aed2e;
  filter:blur(70px);
  pointer-events:none
}

.card-head{
  position:relative;
  margin-bottom:22px
}

.card-head h3{
  margin:0 0 6px;
  font-size:17px
}

.card-head p{
  margin:0;
  color:#81788f;
  font-size:12px;
  line-height:1.7
}


/* =========================
   SECTION TABS
========================= */

.section-tabs{
  max-width:1100px;
  margin:0 auto 26px;
  display:flex;
  gap:8px;
  flex-wrap:wrap
}

.section-tab{
  padding:10px 18px;
  border:1px solid var(--border);
  border-radius:99px;
  background:#0a0612;
  color:var(--muted);
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.2s
}

.section-tab:hover{
  color:var(--text);
  border-color:#a78bfa55
}

.section-tab.active{
  background:linear-gradient(135deg,var(--violet),var(--purple));
  color:white;
  border-color:transparent;
  box-shadow:0 6px 18px #7c3aed44
}


/* =========================
   PANELS
========================= */

.admin-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
  gap:24px;
  align-items:start;
  animation:pop .25s ease
}

#panel-hero,
#panel-about,
#panel-faq,
#panel-contact,
#panel-footer{
  grid-template-columns:minmax(0,1fr)
}


/* =========================
   FORMS
========================= */

.admin-card label{
  display:block;
  margin-bottom:14px
}

.admin-card label span{
  display:block;
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:7px
}

.admin-card input[type="text"],
.admin-card input[type="url"],
.admin-card input[type="email"],
.admin-card textarea{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#0a0612;
  color:var(--text);
  font:inherit;
  font-size:13px;
  outline:none;
  transition:border-color .2s, box-shadow .2s;
  resize:vertical
}

.admin-card textarea{
  font-family:inherit;
  line-height:1.8
}

.admin-card input:focus,
.admin-card textarea:focus{
  border-color:var(--purple);
  box-shadow:0 0 0 3px #a855f71c
}

.form-row-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}

.card-head.sub{
  margin:26px 0 14px;
  padding-top:18px;
  border-top:1px solid var(--border)
}

.card-head.sub h4{
  margin:0 0 4px;
  font-size:13px;
  color:#d8ccef
}

.card-head.sub p{
  font-size:11px
}


/* ---- Repeatable lists ---- */

.repeat-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px
}

.repeat-row{
  display:flex;
  gap:10px;
  align-items:center
}

.repeat-row input{
  flex:1;
  min-width:0
}

.repeat-row input[data-key="level"]{
  max-width:90px
}

.repeat-del{
  flex:none;
  width:36px;
  height:40px;
  padding:0;
  font-size:13px
}

.add-row{
  width:100%;
  margin-bottom:8px
}

.hint{
  display:block;
  color:#665d72;
  font-size:11px;
  margin:-4px 0 18px
}


/* =========================
   UPLOAD TABS
========================= */

.upload-tabs{
  display:flex;
  gap:8px;
  background:#0a0612;
  border:1px solid var(--border);
  border-radius:12px;
  padding:5px;
  margin-bottom:18px
}

.tab-btn{
  flex:1;
  padding:10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:.2s
}

.tab-btn.active{
  background:linear-gradient(135deg,var(--violet),var(--purple));
  color:white;
  box-shadow:0 6px 18px #7c3aed44
}


/* =========================
   DROPZONE
========================= */

.dropzone{
  border:2px dashed #a78bfa44;
  border-radius:18px;
  background:
    radial-gradient(ellipse at 50% 0%, #a855f70d, transparent 70%),
    #0a0612;
  padding:38px 20px;
  text-align:center;
  cursor:pointer;
  transition:.25s
}

.dropzone b{
  display:block;
  font-size:13px;
  margin:12px 0 5px
}

.dropzone span{
  font-size:11px;
  color:#665d72
}

.dropzone:hover,
.dropzone.dragging{
  border-color:var(--purple);
  background:
    radial-gradient(ellipse at 50% 0%, #a855f71a, transparent 70%),
    #120a1e;
  transform:translateY(-2px)
}

.dz-icon{
  width:52px;
  height:52px;
  margin:0 auto;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:18px;
  color:#e9d5ff;
  background:linear-gradient(145deg,#1a0533,#0f0220);
  border:1px solid #a78bfa44;
  box-shadow:0 0 24px #a855f733;
  padding-left:4px
}


/* =========================
   FRAME PICKER
========================= */

.picker{
  margin-top:18px;
  padding:18px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#0a0612;
  animation:pop .3s ease
}

@keyframes pop{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

.picker-stage{
  position:relative;
  width:200px;
  aspect-ratio:9/16;
  margin:0 auto 16px;
  border-radius:14px;
  overflow:hidden;
  background:#000;
  border:1px solid #fff1;
  box-shadow:0 18px 40px #000a, 0 0 30px #a855f71c
}

.picker-stage video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.stage-badge{
  position:absolute;
  top:10px;
  left:10px;
  padding:4px 10px;
  border-radius:99px;
  background:#0009;
  border:1px solid #fff2;
  backdrop-filter:blur(8px);
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  color:#e9d5ff
}


/* ---- Scrub slider ---- */

.scrub{
  direction:ltr;
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px
}

.scrub .time{
  font-size:10px;
  font-weight:700;
  color:var(--muted);
  min-width:32px;
  text-align:center;
  font-variant-numeric:tabular-nums
}

input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  flex:1;
  height:6px;
  border-radius:99px;
  background:linear-gradient(90deg,var(--violet),var(--purple));
  outline:none;
  cursor:pointer
}

input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  border:3px solid var(--purple);
  cursor:grab;
  box-shadow:0 0 12px #a855f7aa;
  transition:transform .15s
}

input[type="range"]::-webkit-slider-thumb:hover{
  transform:scale(1.2)
}

input[type="range"]::-moz-range-thumb{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#fff;
  border:3px solid var(--purple);
  cursor:grab;
  box-shadow:0 0 12px #a855f7aa
}


/* ---- Capture button ---- */

.capture-ico{
  display:inline-grid;
  place-items:center;
  font-size:15px;
  color:#f0abfc
}

.btn.primary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px
}


/* =========================
   THUMBNAIL PREVIEW
========================= */

.thumb-preview{
  margin-top:18px;
  padding:18px;
  border:1px solid #4ade8055;
  border-radius:18px;
  background:#4ade800a;
  text-align:center;
  animation:pop .3s ease
}

.thumb-wrap{
  position:relative;
  width:200px;
  aspect-ratio:9/16;
  margin:0 auto 14px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid #4ade8044;
  box-shadow:0 18px 40px #000a
}

.thumb-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.thumb-badge{
  position:absolute;
  bottom:10px;
  left:50%;
  transform:translateX(-50%);
  padding:5px 12px;
  border-radius:99px;
  background:#4ade8020;
  border:1px solid #4ade8066;
  backdrop-filter:blur(8px);
  font-size:9px;
  font-weight:800;
  color:#86efac;
  white-space:nowrap
}


/* =========================
   BUTTONS
========================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 22px;
  border-radius:12px;
  border:1px solid transparent;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  transition:.2s
}

.btn.primary{
  width:100%;
  margin-top:4px;
  background:linear-gradient(135deg,var(--violet),var(--purple));
  color:white;
  box-shadow:0 8px 24px #a855f733
}

.btn.primary:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 12px 34px #a855f755
}

.btn.primary:disabled{
  opacity:.5;
  cursor:not-allowed
}

.btn.ghost{
  background:transparent;
  border-color:var(--border);
  color:var(--muted)
}

.btn.ghost:hover{
  color:var(--text);
  border-color:var(--purple);
  background:#a855f70d
}

.btn.small{
  padding:8px 16px;
  font-size:11px
}

.btn.danger{
  padding:8px 14px;
  font-size:11px;
  background:#f8717112;
  border-color:#f8717144;
  color:#f87171
}

.btn.danger:hover{
  background:#f8717122
}

.msg{
  margin-top:14px;
  font-size:12px;
  padding:10px 14px;
  border-radius:10px
}

.msg.success{
  color:#4ade80;
  background:#4ade8012;
  border:1px solid #4ade8033
}

.msg.error{
  color:#f87171;
  background:#f8717112;
  border:1px solid #f8717133
}


/* =========================
   PROJECT LIST
========================= */

.count{
  color:var(--purple);
  font-size:12px
}

.project-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  max-height:600px;
  overflow:auto;
  padding:2px 4px 2px 2px
}

.project-list::-webkit-scrollbar{
  width:6px
}

.project-list::-webkit-scrollbar-thumb{
  background:#a855f733;
  border-radius:99px
}

.project-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#0a0612;
  transition:.2s
}

.project-item:hover{
  border-color:#a78bfa55;
  transform:translateX(-3px)
}

.project-item img,
.project-item .no-thumb{
  width:52px;
  height:52px;
  flex:none;
  border-radius:10px;
  object-fit:cover;
  background:linear-gradient(145deg,#160b27,#08050e);
  border:1px solid #fff1
}

.project-item .no-thumb{
  display:grid;
  place-items:center;
  font-size:9px;
  color:#665d72;
  text-align:center
}

.project-item .info{
  flex:1;
  min-width:0
}

.project-item .info b{
  display:block;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.project-item .info small{
  display:block;
  color:#665d72;
  font-size:10px;
  margin-top:3px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}

.empty-state{
  text-align:center;
  color:#665d72;
  font-size:12px;
  padding:40px 0
}


/* =========================
   RESPONSIVE
========================= */

@media(max-width:860px){
  .admin-grid{
    grid-template-columns:1fr
  }

  .admin-header{
    flex-wrap:wrap
  }

  .header-actions{
    margin-right:0;
    width:100%
  }

  .header-actions .btn{
    flex:1
  }
}
