:root {
  --bg: #0f0f0f;
  --card: #1e1e1e;
  --border: #2a2a2a;
  --text: #e5e5e5;
  --accent: #10a37f;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.app {
  width: 420px;
  text-align: center;
}

h1 {
  margin-bottom: 16px;
}

input[type="file"] {
  margin-bottom: 20px;
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-2px);
}

.card-content {
  font-size: 18px;
  line-height: 1.5;
}

.controls {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

button {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.card {
  touch-action: pan-y;
  user-select: none;
}

/* Side indicator */
.side-indicator {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #2a2a2a;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* Card animation */
.card {
  position: relative;
  overflow: hidden;
}

.slide-left {
  animation: slideLeft 0.25s ease;
}

.slide-right {
  animation: slideRight 0.25s ease;
}

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

@keyframes slideRight {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Progress */
.progress {
  margin-top: 18px;
  font-size: 13px;
  color: #aaa;
}

.progress-bar {
  height: 6px;
  background: #1a1a1a;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* ---------- Mobile responsiveness ---------- */
@media (max-width: 600px) {
  body {
    height: auto;
    min-height: 100svh; /* safer than 100vh on mobile */
    padding: 16px;
    align-items: flex-start;
  }

  .app {
    width: 100%;
    max-width: 100%;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 50%;
  }

  .card {
    padding: 22px;
    min-height: 160px;
  }

  .card-content {
    font-size: 16px;
    line-height: 1.6;
  }

  .side-indicator {
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 4px 8px;
  }

  .controls {
    gap: 10px;
  }

  button {
    flex: 1;
    padding: 12px 10px;
    font-size: 14px;
  }

  .progress {
    font-size: 12px;
  }
}

/* ---------- Very small phones ---------- */
@media (max-width: 380px) {
  h1 {
    font-size: 18px;
  }

  .card-content {
    font-size: 15px;
  }

  button {
    font-size: 13px;
    padding: 10px;
  }
}
