:root {
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --bg: #0F172A;
  --surface: #1E293B;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --border: #334155;
  --radius: 16px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Heebo', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.05em;
}

header h1 span {
  color: var(--primary);
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.upload-area {
  background-color: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background-color: rgba(79, 70, 229, 0.05);
}

.upload-content svg {
  color: var(--primary);
  margin-bottom: 1rem;
}

.upload-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.upload-content p {
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* Loading */
#loading-section {
  text-align: center;
  padding: 4rem 0;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-bottom-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: rotation 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Slider */
.slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  margin-bottom: 2rem;
  user-select: none;
}

.slider-container img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  pointer-events: none;
}

.slider-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 50%; /* Initial width */
  overflow: hidden;
  z-index: 10;
}

.slider-image-wrapper img {
  width: 100vw; /* This gets overridden in JS based on container width */
  height: 100%;
  max-width: none;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: white;
  cursor: ew-resize;
  z-index: 20;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.slider-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%234F46E5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>');
  background-position: center;
  background-repeat: no-repeat;
}

/* Actions */
.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-family: inherit;
}

.btn.primary {
  background-color: var(--primary);
  color: white;
}

.btn.primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn.secondary {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  background-color: var(--border);
}

footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
