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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  padding: 20px;
  color: #e0e0e0;
}

.container { max-width: 960px; margin: 0 auto; }

header {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 24px 32px;
  margin-bottom: 24px;
}
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
header h1 { font-size: 28px; background: linear-gradient(135deg, #e94560, #0f3460); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #a0a0a0; }
nav { display: flex; gap: 8px; }
nav a {
  color: #a0a0a0; text-decoration: none; padding: 8px 16px;
  border-radius: 10px; font-size: 14px; transition: all 0.2s;
  border: 1px solid transparent;
}
nav a:hover, nav a.active {
  background: rgba(233,69,96,0.2); color: #e94560;
  border-color: rgba(233,69,96,0.3);
}

.card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 20px;
}
.card h2 { font-size: 18px; margin-bottom: 24px; color: #fff; }

/* Type selector */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.type-btn {
  padding: 16px 12px;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: #a0a0a0;
}
.type-btn:hover { border-color: #e94560; color: #e94560; background: rgba(233,69,96,0.1); }
.type-btn.active { border-color: #e94560; background: rgba(233,69,96,0.2); color: #e94560; }
.type-btn .icon { font-size: 28px; margin-bottom: 8px; }
.type-btn .label { font-size: 13px; font-weight: 600; }

/* Questions guidées */
.questions { margin-bottom: 28px; }
.question-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.question-card h3 { font-size: 15px; color: #fff; margin-bottom: 4px; }
.question-card p { font-size: 13px; color: #666; margin-bottom: 14px; }
.answer-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.answer-btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: #a0a0a0; cursor: pointer;
  font-size: 13px; transition: all 0.2s; font-family: inherit;
}
.answer-btn:hover { border-color: #53d8fb; color: #53d8fb; }
.answer-btn.active { border-color: #53d8fb; background: rgba(83,216,251,0.15); color: #53d8fb; }

/* Recommendation badge */
.rec-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: rgba(83,216,251,0.15); border: 1px solid rgba(83,216,251,0.3);
  color: #53d8fb; margin-top: 12px;
}

/* Form fields */
.form-group { margin-bottom: 18px; }
label { display: block; color: #a0a0a0; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input[type="url"], input[type="email"],
input[type="tel"], input[type="password"], select, textarea {
  width: 100%; padding: 11px 15px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; font-size: 14px;
  color: #e0e0e0; font-family: inherit; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.1);
}
textarea { resize: vertical; min-height: 80px; }
select option { background: #1a1a2e; }

/* Mode toggle */
.mode-toggle {
  display: flex; gap: 0; margin-bottom: 28px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px; padding: 4px;
  border: 1px solid rgba(255,255,255,0.1);
}
.mode-btn {
  flex: 1; padding: 10px; border: none; border-radius: 9px;
  background: transparent; color: #666; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all 0.2s; font-family: inherit;
}
.mode-btn.active { background: rgba(233,69,96,0.3); color: #e94560; }

/* Result */
.result-area {
  text-align: center; padding: 32px;
  background: rgba(255,255,255,0.03);
  border-radius: 16px; border: 1px solid rgba(255,255,255,0.08);
}
#qrImage { max-width: 280px; border-radius: 12px; margin: 0 auto 20px; display: block; }
#qrSvg { max-width: 280px; margin: 0 auto 20px; display: block; }
#qrSvg svg { border-radius: 12px; }

.result-info { margin-bottom: 20px; }
.result-info .content-preview {
  font-family: monospace; font-size: 12px; color: #666;
  background: rgba(255,255,255,0.05); padding: 10px;
  border-radius: 8px; word-break: break-all; margin: 10px 0;
}
.short-url {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin: 12px 0;
}
.short-url a { color: #e94560; text-decoration: none; font-weight: 600; }
.short-url a:hover { text-decoration: underline; }

.qr-params {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0;
}
.param-badge {
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.08); color: #a0a0a0; border: 1px solid rgba(255,255,255,0.1);
}

/* Buttons */
.btn {
  padding: 11px 20px; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; font-family: inherit;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: linear-gradient(135deg, #e94560, #c73652); color: white; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(233,69,96,0.4); }
.btn-secondary { background: rgba(255,255,255,0.1); color: #a0a0a0; border: 1px solid rgba(255,255,255,0.15); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); color: #e0e0e0; }
.btn-success { background: linear-gradient(135deg, #48bb78, #38a169); color: white; }
.btn-danger { background: linear-gradient(135deg, #f56565, #e53e3e); color: white; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-group { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* History */
.history-item {
  padding: 16px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.history-meta { flex: 1; }
.history-label { font-weight: 600; color: #e0e0e0; margin-bottom: 4px; }
.history-sub { font-size: 12px; color: #666; }
.history-actions { display: flex; gap: 8px; flex-shrink: 0; }

.badge {
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  display: inline-block; margin-right: 6px;
}
.badge-url { background: rgba(83,216,251,0.15); color: #53d8fb; }
.badge-wifi { background: rgba(72,187,120,0.15); color: #48bb78; }
.badge-contact { background: rgba(233,69,96,0.15); color: #e94560; }
.badge-text { background: rgba(237,137,54,0.15); color: #ed8936; }
.badge-hosted { background: rgba(159,122,234,0.15); color: #9f7aea; }
.badge-local { background: rgba(160,174,192,0.15); color: #a0aec0; }

.hidden { display: none !important; }
.muted { color: #666; font-size: 14px; text-align: center; padding: 40px; }

/* Login prompt */
.login-prompt {
  padding: 20px; border-radius: 12px; margin-bottom: 20px;
  background: rgba(233,69,96,0.1); border: 1px solid rgba(233,69,96,0.2);
  text-align: center; color: #a0a0a0; font-size: 14px;
}
.login-prompt a { color: #e94560; text-decoration: none; font-weight: 600; }

/* Loader */
.loader {
  display: inline-block; width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #e94560; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  body { padding: 12px; }
  header { padding: 16px; }
  .card { padding: 20px; }
  .header-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .type-grid { grid-template-columns: repeat(3, 1fr); }
}
