/* Reset & base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0b0d12;
  --bg-grad-1: #11141c;
  --bg-grad-2: #0b0d12;
  --card: #161a23;
  --card-border: #232836;
  --input-bg: #1d212c;
  --input-border: #2c3142;
  --text: #e8ebf2;
  --text-muted: #8b91a3;
  --accent: #6366f1;
  --accent-hover: #7c7ff5;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --success: #10b981;
  --danger: #ef4444;
  --radius: 12px;
  --transition: 200ms ease;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-grad-1) 0%, var(--bg-grad-2) 60%) fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 32px 16px 48px;
}

.page {
  max-width: 640px;
  margin: 0 auto;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 10px;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.logo-text {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 20px;
}

.tab {
  flex: 1 1 auto;
  min-width: 120px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* Tool panels */
.tool {
  animation: fadeIn 250ms ease;
}

.tool[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Form fields */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 14px;
}

.field-label:first-of-type {
  margin-top: 0;
}

.input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input::placeholder {
  color: #5b6173;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b91a3' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Button */
.btn {
  width: 100%;
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn:active {
  transform: translateY(0);
}

/* Result */
.result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 15px;
  min-height: 0;
  transition: all var(--transition);
}

.result:empty {
  display: none;
}

.result.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.qr-result {
  display: flex;
  justify-content: center;
}

.qr-result img {
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  max-width: 100%;
  height: auto;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 20px 12px 32px;
  }

  .card {
    padding: 20px;
  }

  .tab {
    min-width: 0;
    font-size: 13px;
    padding: 9px 10px;
  }
}
