/* =========================================================
   iVid Generator - Frontend Full CSS
   File: assets/css/front.css
   ========================================================= */

.ivid-app{
  --ivid-bg:#0a0d14;
  --ivid-panel:#111827;
  --ivid-panel-2:#161f2e;
  --ivid-panel-3:#0f1724;
  --ivid-border:rgba(255,255,255,.08);
  --ivid-text:#f3f4f6;
  --ivid-muted:#a8b0bf;
  --ivid-gold:#d6ad61;
  --ivid-gold-2:#f3d38d;
  --ivid-danger:#c84d4d;
  --ivid-success:#35b36f;
  --ivid-radius:18px;
  --ivid-radius-sm:12px;
  --ivid-shadow:0 18px 40px rgba(0,0,0,.28);
  --ivid-shadow-soft:0 10px 24px rgba(0,0,0,.18);
  min-height:100vh;
  width:100%;
  display:block;
  position:relative;
  z-index:1;
  overflow:hidden;
  box-sizing:border-box;
  padding:24px;
  color:var(--ivid-text);
  background:
    radial-gradient(circle at top left, rgba(214,173,97,.12), transparent 25%),
    radial-gradient(circle at top right, rgba(82,132,255,.08), transparent 25%),
    linear-gradient(180deg, #090c12 0%, #0f1520 100%);
}

.ivid-app *,
.ivid-app *::before,
.ivid-app *::after{
  box-sizing:border-box;
}

.ivid-app button,
.ivid-app input,
.ivid-app textarea,
.ivid-app select{
  font:inherit;
}

.ivid-app button{
  -webkit-appearance:none;
  appearance:none;
}

.ivid-app h1,
.ivid-app h2,
.ivid-app h3,
.ivid-app h4,
.ivid-app p{
  margin-top:0;
}

.ivid-topbar{
  width:100%;
  max-width:1800px;
  margin:0 auto 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 20px;
  border:1px solid var(--ivid-border);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:var(--ivid-shadow);
  backdrop-filter:blur(8px);
}

.ivid-topbar-left,
.ivid-topbar-right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.ivid-brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.ivid-brand-badge{
  width:56px;
  height:56px;
  min-width:56px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, var(--ivid-gold), #8d6a2b);
  color:#111;
  font-weight:800;
  font-size:18px;
  box-shadow:0 10px 24px rgba(214,173,97,.25);
}

.ivid-brand h2,
.ivid-editor-top h1,
.ivid-composer-head h3{
  margin:0;
  color:#fff;
  line-height:1.15;
}

.ivid-brand p,
.ivid-editor-top p,
.ivid-composer-head p{
  margin:4px 0 0;
  color:var(--ivid-muted);
  line-height:1.5;
}

.ivid-shell{
  width:100%;
  max-width:1800px;
  margin:0 auto;
  display:grid;
  grid-template-columns:320px minmax(0, 1fr) 380px;
  gap:20px;
  align-items:start;
}

.ivid-sidebar,
.ivid-editor,
.ivid-composer{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid var(--ivid-border);
  border-radius:var(--ivid-radius);
  box-shadow:var(--ivid-shadow);
  min-height:calc(100vh - 170px);
}

.ivid-sidebar,
.ivid-composer{
  padding:20px;
}

.ivid-editor{
  padding:24px;
}

.ivid-side-head,
.ivid-editor-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.ivid-side-head{
  margin-bottom:14px;
}

.ivid-side-head h3{
  margin:0;
  color:#fff;
}

.ivid-side-actions,
.ivid-editor-top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.ivid-kicker{
  display:inline-block;
  margin-bottom:8px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ivid-gold-2);
}

.ivid-scene-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
  max-height:calc(100vh - 320px);
  overflow:auto;
  padding-right:4px;
}

.ivid-scene-list::-webkit-scrollbar,
.ivid-summary::-webkit-scrollbar{
  width:8px;
}

.ivid-scene-list::-webkit-scrollbar-thumb,
.ivid-summary::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:20px;
}

.ivid-scene-item{
  width:100%;
  border:1px solid var(--ivid-border);
  background:rgba(255,255,255,.03);
  color:var(--ivid-text);
  border-radius:14px;
  padding:14px;
  cursor:pointer;
  transition:.2s ease;
  text-align:left;
  box-shadow:none;
}

.ivid-scene-item:hover{
  transform:translateY(-1px);
  border-color:rgba(214,173,97,.45);
  background:rgba(255,255,255,.04);
}

.ivid-scene-item.active{
  background:linear-gradient(180deg, rgba(214,173,97,.18), rgba(214,173,97,.08));
  border-color:rgba(214,173,97,.55);
}

.ivid-scene-item strong{
  display:block;
  font-size:15px;
  margin-bottom:4px;
  color:#fff;
}

.ivid-scene-item span{
  display:block;
  color:var(--ivid-muted);
  font-size:12px;
  line-height:1.4;
}

.ivid-sidebar-footer{
  display:flex;
  gap:10px;
  margin-top:16px;
  flex-wrap:wrap;
}

.ivid-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  margin-top:22px;
}

.ivid-card{
  background:var(--ivid-panel);
  border:1px solid var(--ivid-border);
  border-radius:16px;
  padding:16px;
  box-shadow:var(--ivid-shadow-soft);
}

.ivid-card-full{
  grid-column:1 / -1;
}

.ivid-label{
  display:block;
  margin-bottom:8px;
  font-size:13px;
  font-weight:700;
  color:#fff;
}

.ivid-input,
.ivid-select,
.ivid-textarea{
  width:100%;
  border:1px solid rgba(255,255,255,.08);
  background:var(--ivid-panel-2);
  color:#fff;
  border-radius:12px;
  padding:12px 14px;
  outline:none;
  box-shadow:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.ivid-input::placeholder,
.ivid-textarea::placeholder{
  color:#93a0b5;
}

.ivid-input:focus,
.ivid-select:focus,
.ivid-textarea:focus{
  border-color:rgba(214,173,97,.6);
  box-shadow:0 0 0 3px rgba(214,173,97,.12);
  background:#1a2433;
}

.ivid-textarea{
  min-height:170px;
  resize:vertical;
}

.ivid-textarea-sm{
  min-height:110px;
}

.ivid-inline-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.ivid-preview{
  min-height:220px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  overflow:hidden;
}

.ivid-preview-inner{
  width:100%;
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:10px;
  color:var(--ivid-muted);
  padding:14px;
  align-items:center;
  justify-content:center;
}

.ivid-preview-inner strong{
  color:#fff;
  font-size:16px;
}

#ividPreviewPlaceholder{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:center;
  justify-content:center;
  min-height:160px;
  width:100%;
  color:var(--ivid-muted);
  text-align:center;
}

#ividPreviewPlaceholder strong{
  color:#fff;
  font-size:16px;
}

#ividVideoPlayer{
  width:100%;
  max-width:100%;
  max-height:520px;
  display:block;
  border-radius:14px;
  background:#000;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 24px rgba(0,0,0,.22);
}

.ivid-render-status{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:12px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  color:#fff;
  font-weight:700;
  line-height:1.4;
}

.ivid-summary{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:240px;
  overflow:auto;
  padding-right:4px;
}

.ivid-summary-item{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
}

.ivid-summary-item strong{
  display:block;
  margin-bottom:4px;
  color:#fff;
}

.ivid-actions-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:16px;
}

.ivid-btn{
  appearance:none;
  border:none;
  border-radius:12px;
  padding:12px 16px;
  font-weight:700;
  cursor:pointer;
  transition:.2s ease;
  text-decoration:none;
  line-height:1.2;
  box-shadow:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.ivid-btn:hover{
  transform:translateY(-1px);
}

.ivid-btn:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(214,173,97,.18);
}

.ivid-btn-block{
  width:100%;
}

.ivid-btn-gold{
  background:linear-gradient(135deg, var(--ivid-gold-2), var(--ivid-gold));
  color:#151515;
}

.ivid-btn-dark{
  background:#1b2433;
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
}

.ivid-btn-danger{
  background:rgba(200,77,77,.14);
  color:#ffb5b5;
  border:1px solid rgba(200,77,77,.32);
}

.ivid-btn-success{
  background:rgba(53,179,111,.16);
  color:#d3ffe6;
  border:1px solid rgba(53,179,111,.35);
}

.ivid-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  color:var(--ivid-muted);
  font-size:12px;
  font-weight:700;
}

.ivid-status.is-ok{
  color:#d3ffe6;
  border-color:rgba(53,179,111,.35);
  background:rgba(53,179,111,.1);
}

.ivid-status.is-warn{
  color:#ffe6b7;
  border-color:rgba(214,173,97,.35);
  background:rgba(214,173,97,.1);
}

.ivid-status.is-danger{
  color:#ffd1d1;
  border-color:rgba(200,77,77,.35);
  background:rgba(200,77,77,.1);
}

@media (max-width:1400px){
  .ivid-shell{
    grid-template-columns:280px minmax(0, 1fr) 340px;
  }
}

@media (max-width:1180px){
  .ivid-shell{
    grid-template-columns:280px minmax(0, 1fr);
  }

  .ivid-composer{
    grid-column:1 / -1;
    min-height:auto;
  }
}

@media (max-width:980px){
  .ivid-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .ivid-topbar-right{
    width:100%;
  }

  .ivid-shell{
    grid-template-columns:1fr;
  }

  .ivid-sidebar,
  .ivid-editor,
  .ivid-composer{
    min-height:auto;
  }

  .ivid-scene-list{
    max-height:none;
  }

  #ividVideoPlayer{
    max-height:420px;
  }
}

@media (max-width:860px){
  .ivid-app{
    padding:14px;
  }

  .ivid-grid{
    grid-template-columns:1fr;
  }

  .ivid-editor-top,
  .ivid-side-head,
  .ivid-sidebar-footer{
    flex-direction:column;
  }

  .ivid-inline-actions,
  .ivid-editor-top-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .ivid-topbar-right .ivid-btn{
    width:100%;
  }

  #ividVideoPlayer{
    max-height:300px;
  }
}