/* Kompres Web — Dark Theme (matches desktop app design system) */

/* ---- Tailwind-like utility reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- CSS Variables (Design Tokens) ---- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --accent: #00FF88;
  --accent-hover: #00cc6e;
  --text-primary: #ffffff;
  --text-secondary: #666666;
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 4px;
}

/* ---- Base ---- */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- Typography ---- */
.font-heading { font-family: 'Outfit', sans-serif; }
.font-body { font-family: 'DM Sans', sans-serif; }

/* ---- Layout utilities ---- */
.flex { display: flex; }
.flex-1 { flex: 1; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.hidden { display: none !important; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-20 { width: 5rem; }
.w-28 { width: 7rem; }
.w-48 { width: 12rem; }
.h-1 { height: 0.25rem; }
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.h-6 { height: 1.5rem; }
.w-6 { width: 1.5rem; }
.h-12 { height: 3rem; }
.h-48 { height: 12rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Spacing */
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-12 { padding: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.pt-2\.5 { padding-top: 0.625rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

/* Text */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-\[10px\] { font-size: 10px; line-height: 1.4; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-\[0\.5em\] { letter-spacing: 0.5em; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-all { user-select: all; }
.break-all { word-break: break-all; }
.leading-tight { line-height: 1.25; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Colors */
.text-white { color: #ffffff; }
.text-accent { color: var(--accent); }
.text-text-secondary { color: var(--text-secondary); }
.text-white\/70 { color: rgba(255, 255, 255, 0.7); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.text-blue-400 { color: #60a5fa; }
.text-gray-500 { color: #6b7280; }
.bg-bg-primary { background: var(--bg-primary); }
.bg-white { background: white; }
.bg-white\/5 { background: rgba(255, 255, 255, 0.05); }
.bg-accent\/10 { background: rgba(0, 255, 136, 0.1); }
.bg-red-500\/10 { background: rgba(239, 68, 68, 0.1); }
.bg-red-500\/90 { background: rgba(239, 68, 68, 0.9); }
.bg-blue-500\/10 { background: rgba(96, 165, 250, 0.1); }

/* Borders */
.border { border: 1px solid var(--border); }
.border-2 { border-width: 2px; }
.border-t { border-top: 1px solid var(--border); }
.border-dashed { border-style: dashed; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-red-500\/20 { border-color: rgba(239, 68, 68, 0.2); }
.rounded { border-radius: var(--radius-xs); }
.rounded-lg { border-radius: var(--radius-sm); }
.rounded-xl { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }

/* Misc */
.cursor-pointer { cursor: pointer; }
.z-50 { z-index: 50; }
.fixed { position: fixed; }
.relative { position: relative; }
.bottom-4 { bottom: 1rem; }
.right-4 { right: 1rem; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.3), 0 4px 6px -4px rgba(0,0,0,.3); }
.block { display: block; }
.inline-flex { display: inline-flex; }
a { text-decoration: none; color: inherit; }

/* ---- Glass effect ---- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---- Input fields ---- */
.input-field {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: white;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.input-field:focus {
  border-color: rgba(0, 255, 136, 0.5);
}
.input-field::placeholder {
  color: var(--text-secondary);
}

/* Number inputs */
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
}
.btn-ghost:hover {
  color: white;
}

/* ---- Slider ---- */
.slider-accent {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  outline: none;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--progress, 50%),
    rgba(255, 255, 255, 0.1) var(--progress, 50%),
    rgba(255, 255, 255, 0.1) 100%
  );
}
.slider-accent::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.slider-accent::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ---- Toggle Switch ---- */
.toggle-switch {
  position: relative;
  width: 2rem;
  height: 1.125rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}
.toggle-switch.active,
.toggle-switch[data-checked="true"] {
  background: var(--accent);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.toggle-switch[data-checked="true"] .toggle-thumb {
  transform: translateX(14px);
}

/* ---- Drop zone ---- */
.drag-over {
  border-color: var(--accent) !important;
  background: rgba(0, 255, 136, 0.03);
}

/* ---- Animations ---- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
  animation: fade-in 0.2s ease-out;
}

/* ---- Hover/transition utilities ---- */
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.transition-transform { transition: transform 0.2s; }
.transition-all { transition: all 0.3s; }
.hover\:text-white:hover { color: white; }
.hover\:text-red-400:hover { color: #f87171; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:border-accent\/30:hover { border-color: rgba(0, 255, 136, 0.3); }
.focus\:outline-none:focus { outline: none; }
.focus\:border-accent\/50:focus { border-color: rgba(0, 255, 136, 0.5); }

/* ---- Min-height ---- */
.min-h-screen { min-height: 100vh; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .p-12 { padding: 2rem; }
  .max-w-2xl { max-width: 100%; }
}
