:root{
  --bg:#0f1724;
  --card:#ffffff;
  --muted:#9aa4b2;
  --accent1:#00b3b3;
  --accent2:#1766ff;
  --glass: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(180deg, #071021 0%, var(--bg) 100%);
  color:#e6eef6;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.background-overlay{
  position:fixed;
  inset:0;
  background: linear-gradient(135deg, rgba(0,179,179,0.06), rgba(23,102,255,0.06));
  z-index:0;
  pointer-events:none;
}

/* Header */
.header{
  width:100%;
  max-width:1000px;
  padding:36px 20px 10px;
  text-align:center;
  z-index:2;
}
#typing-text{
  margin:0;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  letter-spacing:1px;
  color: white;
  text-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.subtitle{
  margin:8px 0 0;
  color:var(--muted);
  font-size:0.95rem;
}

/* Container */
.container{
  width:100%;
  max-width:980px;
  padding: 24px;
  z-index:2;
}

/* Card */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border-radius:16px;
  padding:20px;
  margin-bottom:20px;
  box-shadow: 0 8px 30px rgba(2,6,23,0.6);
  border: 1px solid rgba(255,255,255,0.03);
}

/* Input card */
.input-card .label{
  display:block;
  margin-bottom:8px;
  color:var(--muted);
  font-size:0.9rem;
}
.input-row{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:12px;
}
.input-row input{
  flex:1;
  padding:14px 16px;
  border-radius:10px;
  border:none;
  background: rgba(255,255,255,0.03);
  color: #e8f0ff;
  font-size:1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.input-row input::placeholder{ color: #8fa2bf; }

.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg,var(--glass),var(--glass-strong));
  color: white;
  border: none;
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-size:1rem;
}
.icon-btn:hover{ transform:translateY(-3px); }

/* Buttons */
.button-group{
  display:flex;
  gap:12px;
  margin-top:6px;
  flex-wrap:wrap;
}
.btn{
  padding:12px 18px;
  border-radius:12px;
  border:none;
  cursor:pointer;
  font-weight:600;
  display:inline-flex;
  gap:10px;
  align-items:center;
}
.btn.primary{
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: white;
  box-shadow: 0 8px 30px rgba(23,102,255,0.12);
}
.btn.secondary{
  background: rgba(255,255,255,0.06);
  color: white;
  border: 1px solid rgba(255,255,255,0.04);
}

/* Empty state & result card */
.result-card{
  min-height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:12px;
  flex-direction:column;
}
.empty-state{ color:var(--muted) }
.empty-state i{ opacity:0.9; margin-bottom:10px; }

/* Preview */
.user-info{
  display:flex;
  gap:14px;
  align-items:center;
  width:100%;
}
.user-avatar{
  width:64px;
  height:64px;
  border-radius:12px;
  object-fit:cover;
  border:2px solid rgba(255,255,255,0.06);
}
.user-details h4{ margin:0; color:#fff; font-size:1rem }
.user-details p{ margin:0; color:var(--muted); font-size:0.9rem }

.video-preview, .photo-preview{
  width:100%;
  max-width:720px;
  border-radius:12px;
  margin-top:12px;
  background:#000;
  box-shadow: 0 10px 40px rgba(2,6,23,0.6);
}

.photo-gallery {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-top: 12px;
}

.photo-gallery img {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(2,6,23,0.6);
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 10px;
}

.photo-nav button {
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

.photo-nav button:hover {
  background: rgba(0,0,0,0.6);
}

.photo-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* download link buttons */
.download-links{
  display:flex;
  gap:12px;
  margin-top:12px;
  flex-wrap:wrap;
  justify-content:center;
}
.download-links button, .download-links a.btn-download {
  padding:10px 16px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  background: linear-gradient(90deg,var(--accent1),var(--accent2));
  color:white;
  font-weight:600;
}

.download-links button.secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.04);
}

/* error */
.error-message{
  max-width:980px;
  margin-top:8px;
  padding:12px 16px;
  border-radius:10px;
  background: rgba(255,40,40,0.06);
  color:#ffd7d7;
  border:1px solid rgba(255,40,40,0.12);
  z-index:2;
}

/* guide & footer */
.guide-section{
  max-width:980px;
  width:100%;
  padding:20px;
  color:var(--muted);
  margin-bottom:36px;
}
.guide-section h2{ color:white; margin-top:0 }
.guide-section ol{ padding-left: 0; list-style:none; display:grid; gap:10px; }
.guide-section li{
  background: rgba(255,255,255,0.02);
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.02);
}

.footer{
  width:100%;
  text-align:center;
  padding:18px 10px;
  color:var(--muted);
  font-size:0.9rem;
  margin-top:auto;
}

/* Responsive */
@media (max-width:720px){
  .input-row{ flex-direction:row }
  .user-info{ flex-direction:row }
  .video-preview{ max-height:240px }
}
