:root{
  --bg1:#0f172a;
  --bg2:#1e293b;
  --card:rgba(255,255,255,0.06);
  --border:rgba(255,255,255,0.10);
  --text:#ffffff;
  --muted:#cbd5e1;
  --glow1: rgba(99,102,241,0.35);
  --glow2: rgba(168,85,247,0.30);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: linear-gradient(-45deg, var(--bg1), var(--bg2), #312e81, #581c87);
  background-size: 400% 400%;
  animation: gradient 12s ease infinite;
  min-height:100vh;
}

@keyframes gradient{
  0%{ background-position:0% 50%;}
  50%{ background-position:100% 50%;}
  100%{ background-position:0% 50%;}
}

.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(800px 400px at 20% 10%, var(--glow1), transparent 60%),
    radial-gradient(900px 450px at 80% 30%, var(--glow2), transparent 60%);
  filter: blur(2px);
  opacity: 0.9;
}

.header{
  padding: 22px 18px 6px;
}

.brand{
  max-width: 1050px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  gap:14px;
}

.logo{
  width: 62px;
  height: 62px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 30px rgba(168,85,247,0.25);
}

.title{
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.2px;
}
.subtitle{
  color: var(--muted);
  margin-top: 2px;
  font-size: 14px;
}

.container{
  max-width: 1050px;
  margin: 0 auto;
  padding: 14px 18px 30px;
}

.grid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 40px rgba(168,85,247,0.18),
    0 0 40px rgba(99,102,241,0.12);
}

.card-title{
  font-weight:700;
  margin-bottom: 10px;
  color: #f1f5f9;
}

video{
  width: 100%;
  max-height: 420px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
}

.row{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap:wrap;
}

.btn{
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border: none;
  padding: 11px 16px;
  border-radius: 14px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}
.btn:hover{
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 20px rgba(168,85,247,0.40);
}
.btn:active{
  transform: translateY(0px) scale(0.99);
}
.btn.secondary{
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}

.hint{
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.result{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin-bottom: 14px;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
}

.desc{
  color: var(--muted);
  line-height: 1.35;
}

.section{
  margin-top: 14px;
}
.section-title{
  font-weight: 700;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.swatches{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.swatch{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 0 18px rgba(168,85,247,0.12);
  transition: 0.2s;
}
.swatch:hover{
  transform: scale(1.06);
}

.debug{
  margin-top: 16px;
  color: var(--muted);
}
.debug pre{
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 14px;
  overflow:auto;
}

.footer{
  margin-top: 16px;
  color: rgba(203,213,225,0.75);
  font-size: 12px;
  text-align:center;
}

/* Stilski dodatki za pravilno poravnavo overlays in filtra */
.video-wrap {
  position: relative;
  width: 100%;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
}

#outfitOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 16px;
  transition: background 0.3s ease, mix-blend-mode 0.3s ease;
  /* Spremenjeno v color, da zanesljivo obarva tudi belo in sivo podlago */
  mix-blend-mode: color; 
  z-index: 2;
}

.cam-off {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  color: var(--muted);
  font-weight: 600;
  border-radius: 16px;
  z-index: 3;
}

.status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #a855f7;
}