:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --ring: 0 0 0 3px rgba(37,99,235,.2);

  --border: #e5e7eb;
  --dash: #dbeafe;

  --radius: 12px;
  --shadow: 0 10px 30px rgba(2,6,23,.06);
  --shadow-lg: 0 18px 50px rgba(2,6,23,.08);

  --soft-grad: radial-gradient(900px 600px at 5% -10%,#e2f3ff 0%,transparent 60%),
               radial-gradient(900px 600px at 95% 0%,#f3e8ff 0%,transparent 60%);
  --transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #0f172a;
    --ink: #e5e7eb;
    --muted: #93a3b5;
    --primary: #3b82f6;
    --primary-600: #2563eb;
    --ring: 0 0 0 3px rgba(59,130,246,.25);
    --border: #1f2937;
    --dash: #1f3a8a;
    --shadow: 0 10px 30px rgba(0,0,0,.45);
    --shadow-lg: 0 18px 55px rgba(0,0,0,.55);
    --soft-grad: radial-gradient(900px 600px at 5% -10%,#172554 0%,transparent 60%),
                 radial-gradient(900px 600px at 95% 0%,#0c4a6e 0%,transparent 60%);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--soft-grad);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition);
}

main {
  max-width: 1200px;
  margin: 28px auto;
  padding: 24px;
  background: var(--card);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

h1 { text-align: center; margin: 0 0 12px; font-size: clamp(20px, 2.3vw, 28px); }
h2 {text-align: center; margin: 0 0 8px; font-size: clamp(16px, 2vw, 20px); color: var(--muted); }

.layout { display: flex; gap: 20px; }
.left-panel { width: 280px; flex: 0 0 280px; }
.right-panel { flex: 1; min-width: 0; }
@media (max-width: 1200px) {
  .layout { flex-direction: column; }
  .left-panel, .right-panel { width: 100%; flex: 1 1 auto; }
}

.controls { display: flex; flex-direction: column; gap: 12px; }

.info {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(99,102,241,.06), rgba(99,102,241,.02));
  border: 1px solid var(--border);
  color: var(--muted);
  transition: var(--transition);
}

.filelabel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: 1.5px dashed var(--dash);
  border-radius: var(--radius);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(37,99,235,.04), rgba(37,99,235,.02));
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease, var(--transition);
}
.filelabel:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.filelabel:focus-within { outline: none; box-shadow: var(--ring); border-color: var(--primary); }
.filelabel input { display: none; }

button {
  padding: 12px 14px;
  border-radius: 10px;
  border: 0;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: filter .15s ease, transform .05s ease, box-shadow .15s ease, var(--transition);
  box-shadow: 0 6px 18px rgba(37,99,235,.25);
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-secondary:hover { background: rgba(2,6,23,.04); }

.preview-section { height: 80vh; display: flex; flex-direction: column; transition: var(--transition); }
@media (max-width: 880px) { .preview-section { height: 65vh; } }

.preview {
  flex: 1;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(400px 200px at 20% 0%, rgba(37,99,235,.06), transparent 60%),
    radial-gradient(400px 200px at 80% 20%, rgba(99,102,241,.06), transparent 60%),
    var(--card);
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.preview iframe { width: 100%; height: 100%; background: var(--card); border: 0; }

.donate-section {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16,185,129,.09), rgba(16,185,129,.03));
  border: 1px solid var(--border);
  color: var(--ink);
  text-align: left;
  transition: var(--transition);
}
.donate-section .price { font-size: 22px; font-weight: 800; }
.or { text-align: center; color: var(--muted); }

.paypal-btn {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: #0070ba;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,112,186,.35);
}

.sidebar-ads {
  width: 160px;
  flex: 0 0 160px;
  align-self: flex-start;
  position: sticky;
  top: 20px;
  height: fit-content;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}
@media (max-width: 1200px) {
  .sidebar-ads { width: 100%; position: static; margin-top: 12px; }
}

:where(a, button, .filelabel) { outline: none; }
:where(a:focus-visible, button:focus-visible, .filelabel:focus-visible) {
  box-shadow: var(--ring) !important;
  border-color: var(--primary) !important;
}

.filelabel.dragging { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.2); }

.progress {
  position: relative;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}
.progress-bar {
  position: relative;
  height: 6px;
  flex: 1;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 35%;
  background: var(--primary);
  border-radius: 999px;
  animation: indet 1.2s infinite;
}
.progress-text { font-size: 12px; color: var(--muted); white-space: nowrap; }
@keyframes indet {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(30%); }
  100% { transform: translateX(100%); }
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(37,99,235,0.95);
  color: white;
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(15px);
  transition: all .3s ease;
  pointer-events: none;
  font-size: 14px;
  z-index: 9999;
}
.toast.show { opacity: 1; transform: translateY(0); 
}
.devs { margin-top: 18px; }
.devs-title {
  margin: 0 0 10px;
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--muted);
  text-align: left;
}

.dev-carousel {
  position: relative;
}

.dev-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.dev-track::-webkit-scrollbar { height: 8px }
.dev-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px }

.dev-card {
  flex: 0 0 190px;            
  min-width: 190px;
  scroll-snap-align: start;
  text-align: center;
  padding: 14px 12px;
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, box-shadow .2s ease;
}
.dev-card:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(2,6,23,.18) }

.dev-card img {
  width: 92px; height: 92px; object-fit: cover; border-radius: 999px;
  border: 3px solid rgba(37,99,235,.25);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  margin-bottom: 8px;
}

.dev-name { margin: 6px 0 2px; font-size: 15px; }
.dev-role { margin: 0; font-size: 12px; color: var(--muted) }


.carousel-btn{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 20px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow); transition: filter .15s ease, transform .05s ease;
}
.carousel-btn:hover{ filter: brightness(1.05) }
.carousel-btn:active{ transform: translateY(calc(-50% + 1px)) }
.carousel-btn.prev{ left: -12px }
.carousel-btn.next{ right: -12px }

@media (max-width: 880px){
  .dev-card{ min-width: 160px; flex-basis: 160px }
  .carousel-btn.prev{ left: 2px } .carousel-btn.next{ right: 2px }
}

