@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root{
  --bg1:#1a0f0a;
  --bg2:#2d1810;
  --card:#3a2318;
  --accent:#ff9a56;
  --accent-dark:#ff7733;
  --muted:#c9b5a8;
  --pill:#4a2f20;
  --success:#7ef6c6;
  --danger:#ff6b88;
  --glass: rgba(255,255,255,0.03);
  --peach-glow: rgba(255,154,86,0.15);
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;font-family:'Poppins',system-ui,-apple-system,sans-serif}
body{
  background: linear-gradient(180deg,var(--bg1) 0%, var(--bg2) 60%);
  color:#ffeee0;
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:320px;
  padding-bottom:40px;
}

/* Header with logo */
.site-header{
  max-width:1100px;
  width:95%;
  text-align:center;
  margin-top:36px;
  margin-bottom:20px;
}
.logo-container{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom:8px;
}
.logo{
  font-size:3.5rem;
  filter:drop-shadow(0 8px 20px var(--peach-glow));
  animation:float 3s ease-in-out infinite;
}
@keyframes float{
  0%,100%{transform:translateY(0px)}
  50%{transform:translateY(-8px)}
}
.site-header h1{
  font-size:2.6rem;
  color:var(--accent);
  text-shadow:0 6px 18px var(--peach-glow);
  font-weight:700;
  margin:0;
}
.site-header p{
  color:var(--muted);
  margin-top:8px;
  font-size:1.05rem;
}

/* Ad space placeholders */
.ad-space{
  max-width:760px;
  width:95%;
  min-height:90px;
  background:rgba(255,255,255,0.02);
  border:1px dashed rgba(255,154,86,0.2);
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:0.9rem;
  margin:20px auto;
}

/* Main content area */
.main{
  max-width:760px;
  width:95%;
  margin:0 auto;
  display:grid;
  gap:20px;
}

/* Cards */
.card{
  background:linear-gradient(180deg, rgba(255,154,86,0.08), rgba(255,154,86,0.03));
  border-radius:16px;
  padding:26px;
  box-shadow:0 12px 30px rgba(0,0,0,0.5);
  border:1px solid rgba(255,154,86,0.1);
}

/* Dropzone */
.dropzone{
  border-radius:12px;
  padding:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:12px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
  border:2px dashed rgba(255,154,86,0.3);
  transition:all 200ms ease;
  cursor:pointer;
}
.dropzone.dragover{
  box-shadow:0 18px 50px var(--peach-glow);
  transform:translateY(-4px);
  border-color:var(--accent);
  background:rgba(255,154,86,0.08);
}
.drop-inner{
  display:flex;
  align-items:center;
  flex-direction:column;
  gap:8px;
  padding:8px 12px;
}
.muted{color:var(--muted);font-size:0.95rem}

input[type="file"]{display:none}

/* Buttons */
.btn-pill{
  background:var(--accent);
  color:#1a0f0a;
  padding:14px 24px;
  border-radius:12px;
  border:none;
  cursor:pointer;
  font-weight:700;
  font-size:1.05rem;
  box-shadow:0 8px 20px rgba(255,154,86,0.3);
  transition:all 200ms ease;
}
.btn-primary{
  background:var(--accent);
  color:#1a0f0a;
  padding:12px 20px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  font-weight:700;
  font-size:1rem;
  transition:all 200ms ease;
}
.btn-ghost{
  background:transparent;
  color:var(--muted);
  padding:12px 20px;
  border-radius:10px;
  border:1px solid rgba(255,154,86,0.2);
  cursor:pointer;
  transition:all 200ms ease;
}
.btn-download{
  background:var(--success);
  color:#0a1a14;
  padding:10px 16px;
  border-radius:8px;
  border:none;
  cursor:pointer;
  font-weight:600;
  text-decoration:none;
  display:inline-block;
  transition:all 200ms ease;
  font-size:0.9rem;
}
.btn-pill:hover,.btn-primary:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 28px rgba(255,154,86,0.4);
}
.btn-ghost:hover{
  background:rgba(255,154,86,0.08);
  border-color:var(--accent);
}
.btn-download:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(126,246,198,0.4);
}
.btn-primary:disabled{
  opacity:0.5;
  cursor:not-allowed;
  transform:none;
}

/* Controls */
.controls{
  margin-top:20px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.control-row{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.control-row label{
  min-width:160px;
  color:var(--muted);
  font-weight:500;
}
.control-row input[type="number"]{
  width:140px;
  padding:10px;
  border-radius:8px;
  border:1px solid rgba(255,154,86,0.2);
  background:var(--glass);
  color:#ffeee0;
  font-size:0.95rem;
}
.control-row input[type="range"]{
  flex:1;
  min-width:120px;
}
#qualityLabel{
  min-width:50px;
  font-weight:600;
  color:var(--accent);
}

/* Presets */
.presets{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.preset{
  background:rgba(255,154,86,0.1);
  border:1px solid rgba(255,154,86,0.3);
  padding:10px 18px;
  border-radius:10px;
  color:var(--accent);
  cursor:pointer;
  font-weight:600;
  transition:all 200ms ease;
}
.preset:hover{
  background:rgba(255,154,86,0.2);
  transform:translateY(-2px);
}

.action-row{
  display:flex;
  gap:12px;
  margin-top:8px;
  flex-wrap:wrap;
}

/* File list */
#fileSection h2,#resultSection h2{
  margin:0 0 16px 0;
  color:var(--accent);
  font-size:1.3rem;
}
.file-list{
  list-style:none;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.file-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(255,255,255,0.03);
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(255,154,86,0.1);
}
.file-meta{
  display:flex;
  gap:14px;
  align-items:center;
}
.thumb{
  width:60px;
  height:45px;
  border-radius:8px;
  object-fit:cover;
  background:rgba(0,0,0,0.3);
  border:1px solid rgba(255,154,86,0.2);
}
.file-name{
  color:#fff;
  font-weight:600;
  font-size:0.95rem;
}
.file-size{
  color:var(--muted);
  font-size:0.9rem;
  margin-top:2px;
}
.small-btn{
  background:transparent;
  border:1px solid rgba(255,154,86,0.2);
  color:var(--muted);
  cursor:pointer;
  padding:6px 12px;
  border-radius:6px;
  font-size:0.85rem;
  transition:all 200ms ease;
}
.small-btn:hover{
  background:rgba(255,154,86,0.1);
  color:var(--accent);
}

/* Results */
.results-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}
.result-card{
  padding:14px;
  background:rgba(255,255,255,0.03);
  border-radius:12px;
  border:1px solid rgba(255,154,86,0.1);
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
}
.result-card img{
  width:100%;
  height:150px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(255,154,86,0.15);
}
.result-stats{
  width:100%;
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:0.9rem;
  padding-top:6px;
  gap:8px;
}
.result-stats .comp{
  color:var(--success);
  font-weight:600;
}
.result-actions{
  display:flex;
  gap:8px;
  margin-top:6px;
  width:100%;
}

/* Progress */
.progress{
  height:8px;
  background:rgba(0,0,0,0.3);
  border-radius:8px;
  overflow:hidden;
  width:100%;
}
.progress-bar{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,var(--accent),var(--accent-dark));
  transition:width 150ms linear;
}

/* Toast */
.toast-container{
  position:fixed;
  right:20px;
  top:20px;
  display:flex;
  flex-direction:column;
  gap:12px;
  z-index:1200;
}
.toast{
  background:#3a2318;
  padding:12px 16px;
  border-radius:10px;
  color:#fff;
  border-left:4px solid var(--accent);
  box-shadow:0 8px 24px rgba(0,0,0,0.6);
  cursor:pointer;
  min-width:220px;
  animation:slideIn 300ms ease;
}
@keyframes slideIn{
  from{transform:translateX(100%);opacity:0}
  to{transform:translateX(0);opacity:1}
}
.toast.error{border-color:var(--danger)}

/* Footer */
.site-footer{
  margin-top:40px;
  text-align:center;
  color:var(--muted);
  font-size:0.9rem;
}

/* SEO Content Section - NEW */
.seo-content {
  margin-top: 40px;
  line-height: 1.8;
}

.seo-content h2 {
  color: var(--accent);
  font-size: 1.6rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.seo-content h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 600;
}

.seo-content p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.7;
}

.seo-content strong {
  color: #fff;
  font-weight: 600;
}

.hidden{display:none}

@media (max-width:640px){
  .logo{font-size:2.8rem}
  .site-header h1{font-size:2rem}
  .control-row{flex-direction:column;align-items:flex-start}
  .control-row label{min-width:auto}
  .results-grid{grid-template-columns:1fr}
  .toast-container{right:10px;top:10px;left:10px}
  .toast{min-width:auto}
  .seo-content h2{font-size:1.4rem}
  .seo-content h3{font-size:1.1rem}
  .seo-content p{font-size:0.95rem}
}