:root {
  --primary: #e94560;
  --secondary: #4ecdc4;
  --bg: #0a0a12;
  --panel: rgba(22, 33, 62, 0.8);
  --text: #ffffff;
  --unit: 0.5vw;
}
@media (max-width: 320px) { :root { --unit: 1vw; } }
@media (min-width: 480px) { :root { --unit: 0.6vw; } }
@media (min-width: 768px) { :root { --unit: 0.4vw; } }
@media (min-width: 1280px) { :root { --unit: 0.3vw; } }
@media (min-width: 1920px) { :root { --unit: 0.25vw; } }
@media (min-width: 2560px) { :root { --unit: 0.2vw; } }
@media (min-width: 3840px) { :root { --unit: 0.15vw; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--unit) * 4);
  font-size: clamp(12px, 1.5vw, 16px);
}

.container { width: 100%; max-width: clamp(280px, 60vw, 600px); }

header { text-align: center; margin-bottom: calc(var(--unit) * 8); }
header h1 { font-size: 2.5rem; letter-spacing: 4px; color: var(--primary); text-transform: uppercase; margin-bottom: 10px; }
header p { color: #888; font-size: 0.9rem; letter-spacing: 1px; }

.drop-zone {
  width: 100%; height: 300px;
  border: 3px dashed #333; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all 0.3s; background: var(--panel); cursor: pointer;
  backdrop-filter: blur(10px);
  position: relative;
}
.drop-zone:hover { border-color: var(--primary); transform: scale(1.02); box-shadow: 0 0 30px rgba(233, 69, 96, 0.2); }
.drop-zone.active { border-color: var(--secondary); background: rgba(78, 205, 196, 0.1); }

.icon { font-size: 5rem; margin-bottom: 20px; filter: drop-shadow(0 0 10px var(--primary)); pointer-events: none; }
.label { font-weight: bold; font-size: 1.1rem; color: #fff; pointer-events: none; }
.sub-label { color: #888; font-size: 0.85rem; margin-top: 8px; pointer-events: none; }

.results {
  margin-top: 30px; width: 100%;
  background: var(--panel); border-radius: 15px; border: 1px solid #333;
  padding: 25px; display: none;
  backdrop-filter: blur(10px);
}
.results h2 { color: var(--secondary); font-size: 1.2rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }

.stats { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: rgba(0,0,0,0.5); padding: 8px 15px; border-radius: 8px; font-size: 0.8rem; border: 1px solid #333; }
.stat-label { color: #888; margin-right: 5px; }
.stat-value { color: var(--secondary); font-weight: bold; }

.code-preview {
  background: #000; padding: 15px; border-radius: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; max-height: 200px; overflow: auto;
  color: #00ff00; border: 1px solid #222;
}

.btn {
  width: 100%; padding: 18px; border: none; border-radius: 10px; cursor: pointer;
  font-weight: bold; text-transform: uppercase; letter-spacing: 2px; transition: 0.3s;
  margin-top: 20px;
}
.btn-main { background: var(--primary); color: white; font-size: 1rem; }
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(233, 69, 96, 0.4); }

.loader {
  display: none; width: 40px; height: 40px; border: 4px solid #333; border-top-color: var(--primary);
  border-radius: 50%; animation: spin 1s linear infinite; margin-top: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.back-link { margin-top: 30px; color: #888; text-decoration: none; font-size: 0.85rem; transition: 0.2s; }
.back-link:hover { color: var(--primary); }
