:root {
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --secondary: #ff6584;
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-input: #16213e;
  --text: #e0e0f0;
  --text-muted: #8888aa;
  --border: #2a2a4a;
  --success: #4caf50;
  --danger: #f44336;
  --warning: #ff9800;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(108, 99, 255, 0.15);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-links { display: flex; gap: 1rem; align-items: center; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { opacity: 0.9; }

.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.8rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* FORMS */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }

/* ALERTS */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-success { background: rgba(76, 175, 80, 0.15); border: 1px solid var(--success); color: #81c784; }
.alert-danger  { background: rgba(244, 67, 54, 0.15);  border: 1px solid var(--danger);  color: #e57373; }
.alert-info    { background: rgba(108, 99, 255, 0.15); border: 1px solid var(--primary); color: #a89fff; }

/* UPLOAD ZONE */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.05);
}
.upload-zone .upload-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.upload-zone p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.9rem; }

/* PROGRESS */
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 0.75rem 0;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: width 0.3s;
  width: 0%;
}

/* RESULT BOX */
.result-box {
  background: var(--bg-input);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.result-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
}
.result-box input:focus { outline: none; }

/* BADGE */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-primary { background: rgba(108, 99, 255, 0.2); color: var(--primary); }
.badge-success { background: rgba(76, 175, 80, 0.2); color: #81c784; }
.badge-warning { background: rgba(255, 152, 0, 0.2); color: #ffb74d; }
.badge-danger  { background: rgba(244, 67, 54, 0.2); color: #e57373; }

/* TABLE */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
}
.table th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(108, 99, 255, 0.04); }

/* HERO */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem; }

/* CONTAINER */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 1.5rem; }

/* FILE SIZE HELPER */
.file-meta { font-size: 0.8rem; color: var(--text-muted); }

/* TIER INFO */
.tier-box {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}
.tier-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}
.tier-item strong { display: block; color: var(--primary); margin-bottom: 0.2rem; }

/* COPY BTN */
.copy-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.2s;
}
.copy-btn:hover { background: var(--primary-dark); }

/* DIVIDER */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* OPTIONAL SECTION */
.options-toggle {
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0;
  user-select: none;
}
.options-toggle:hover { color: var(--primary); }

.options-panel { display: none; }
.options-panel.open { display: block; }

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* SPINNER */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* AUTH PAGE */
.auth-page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* DOWNLOAD PAGE */
.download-card {
  max-width: 500px;
  margin: 4rem auto;
  padding: 0 1rem;
}
.file-icon { font-size: 3rem; margin-bottom: 0.75rem; }

/* SCROLL */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
