:root {
  --bg: #f4f4f4;
  --card: #ffffff;
  --text: #000;
  --btn: #4CAF50;
}

body.dark {
  --bg: #121212;
  --card: #1e1e1e;
  --text: #fff;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
  transition: 0.3s;
}

.container {
  background: var(--card);
  padding: 20px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

input, button {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  font-size: 1rem;
}

button {
  background: var(--btn);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.preview {
  display: flex;
  gap: 10px;
}

.preview img {
  width: 50%;
  display: none;
  border-radius: 10px;
}

.progress {
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
  display: none;
}

.bar {
  height: 100%;
  width: 0%;
  background: var(--btn);
  animation: loading 2s infinite;
}

@keyframes loading {
  0% { width: 0%; }
  100% { width: 100%; }
}

#downloadBtn {
  display: none;
  text-decoration: none;
  background: #2196F3;
  color: white;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  margin-top: 10px;
}
