*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --border: rgba(255,255,255,0.07);
  --accent: #6c63ff;
  --accent2: #ff6584;
  --accent3: #43e97b;
  --text: #f0f0f5;
  --muted: #6b6b80;
  --card: #16161f;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow-x: hidden;
}

/* Background blobs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -200px;
}
body::after {
  width: 500px; height: 500px;
  background: var(--accent2);
  bottom: -200px; right: -200px;
}

.wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 0.6rem;
}

h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
}

/* --- DROP ZONE --- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(108,99,255,0.06);
}

.drop-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}

.drop-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  display: block;
  transition: transform 0.3s;
}

.drop-zone:hover .drop-icon { transform: translateY(-4px); }

.drop-title {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.drop-sub {
  color: var(--muted);
  font-size: 0.82rem;
}

/* --- FILE LIST --- */
#file-list {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.file-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.file-ext {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.file-info { flex: 1; min-width: 0; }

.file-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}

.file-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}
.file-remove:hover { color: var(--accent2); background: rgba(255,101,132,0.1); }

/* --- PROGRESS --- */
.progress-wrap {
  margin-top: 0.5rem;
  display: none;
}

.progress-bar-bg {
  background: var(--surface);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 100px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
  text-align: center;
}

/* --- BUTTON --- */
.btn-upload {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.95rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.btn-upload::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-upload:hover::after { opacity: 0.08; }
.btn-upload:active::after { opacity: 0.15; }
.btn-upload:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- TOAST --- */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 999;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.2rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastIn 0.3s ease;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.success { border-left: 3px solid var(--accent3); }
.toast.error   { border-left: 3px solid var(--accent2); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- RESULTS --- */
.results-section {
  margin-top: 1.5rem;
  display: none;
}

.results-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.result-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  margin-bottom: 0.5rem;
}

.result-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-badge {
  background: rgba(67,233,123,0.12);
  color: var(--accent3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.result-badge.fail {
  background: rgba(255,101,132,0.12);
  color: var(--accent2);
}

/* --- FOOTER --- */
footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}