:root {
  --color-text: #ffffff; /* white text */
  --color-primary: #7e22ce; /* purple */
  --color-primary-600: #6b21a8;
  --color-primary-100: rgba(126,34,206,0.15);
  --color-bg: #333333; /* dark base */
  --color-card: #2a2a2a; /* dark card */
  --color-muted: #c7c7c7;
  --radius: 14px;
  --shadow-1: 0 10px 25px rgba(0,0,0,0.4);
  --header-h: 72px;
  --footer-h: 72px;
  --adH: 80px; /* top/bottom ads */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(800px 500px at 10% 15%, rgba(126,34,206,0.18), transparent 60%),
    radial-gradient(1000px 700px at 85% 20%, rgba(99,102,241,0.18), transparent 60%),
    radial-gradient(900px 600px at 20% 85%, rgba(236,72,153,0.16), transparent 60%),
    radial-gradient(1100px 800px at 80% 80%, rgba(34,197,94,0.14), transparent 60%);
  background-repeat: no-repeat;
  background-blend-mode: screen;
  background-size: 120% 120%, 130% 130%, 125% 125%, 140% 140%;
  background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
  animation: move-bubbles 26s ease-in-out infinite alternate;
  min-height: 100dvh;
  overflow: hidden; /* prevent page scroll */
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

.main-center {
  min-height: calc(100dvh - var(--header-h) - var(--footer-h) - (var(--adH) * 2));
  display: flex;
  flex-direction: column;
  align-items: stretch; /* keep full width */
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(51,51,51,0.7);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid #444;
  z-index: 10;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.brand-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 24px;
  margin-top: 24px;
}

.upload-card { text-align: center; }

.dropzone {
  border: 2px dashed var(--color-primary-600);
  border-radius: calc(var(--radius) - 2px);
  padding: 36px 20px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}
.dropzone:focus { outline: none; box-shadow: 0 0 0 3px var(--color-primary-100); }
.dropzone:hover { background: rgba(255,255,255,0.04); }
.dropzone.dz-over { background: rgba(126,34,206,0.18); border-color: var(--color-primary); transform: translateY(-1px); }

.dz-illustration { font-size: 40px; margin-bottom: 8px; }
.dz-title { margin: 8px 0 4px; font-size: 22px; }
.dz-subtitle { margin: 0; color: var(--color-muted); }
.dz-hint { margin-top: 10px; font-size: 12px; color: var(--color-muted); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.file-list { list-style: none; padding: 0; margin: 0; }
.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #444;
}
.file-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--color-muted); font-size: 12px; }
.file-actions { display: flex; gap: 8px; }

.progress {
  position: relative;
  width: 100%;
  height: 8px;
  background: #444;
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), #9333ea);
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";

}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-600); }
.btn-ghost { background: transparent; color: #ffffff; }
.btn-ghost:hover { background: var(--color-primary-100); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: grid;
  gap: 10px;
  z-index: 1000;
}
.toast {
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow-1);
}
.toast.success { background: #065f46; }
.toast.error { background: #7f1d1d; }

.site-footer {
  padding: 24px 0 40px;
  color: var(--color-muted);
  text-align: center;
  margin-top: auto; /* stick to bottom in flex layout */
  min-height: var(--footer-h);
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  .dz-title { font-size: 18px; }
  .container { padding: 16px; }
  :root { --adH: 64px; }
}

/* Ads */
.ad-slot {
  position: fixed;
  z-index: 999;
  background: #2a2a2a;
  color: #ffffff;
  border: 2px solid var(--color-primary-600);
  box-shadow: var(--shadow-1);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.ad-top {
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, 92vw);
  height: 80px;
  background: linear-gradient(0deg, var(--color-primary-100), #2a2a2a);
}

.ad-bottom {
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, 92vw);
  height: 80px;
  background: linear-gradient(180deg, var(--color-primary-100), #2a2a2a);
}

.ad-right {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: min(520px, 70vh);
  background: linear-gradient(90deg, #2a2a2a, var(--color-primary-100));
}

.ad-left {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: min(520px, 70vh);
  background: linear-gradient(270deg, #2a2a2a, var(--color-primary-100));
}

@media (max-width: 1024px) {
  .ad-left, .ad-right { display: none; }
}

@media (max-width: 640px) {
  .ad-top, .ad-bottom { height: 64px; }
}


@keyframes move-bubbles {
  0% {
    background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
    filter: saturate(1) brightness(1);
  }
  50% {
    background-position: 15% 8%, 85% 12%, 10% 85%, 90% 75%;
    filter: saturate(1.1) brightness(1.02);
  }
  100% {
    background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
    filter: saturate(1) brightness(1);
  }
}


