* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #0a0a0a;
  color: #e8e8e8;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Subtle ambient glow at the top of the page */
.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(74, 144, 226, 0.18) 0%,
    rgba(155, 89, 255, 0.08) 35%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

/* Career page */
.career {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}
.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(74, 144, 226, 0.25));
}
.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f0f0f0;
}
.trademark {
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 2px;
  opacity: 0.6;
  font-weight: 500;
}

.hero {
  padding: 0;
  margin-bottom: 3rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 1.25rem;
  line-height: 1.05;
  background: linear-gradient(135deg, #ffffff 0%, #b0b8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.75;
  margin: 0 0 1.75rem;
  max-width: 540px;
  line-height: 1.55;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: #d0d0d0;
}
.badge svg { opacity: 0.7; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 2rem 2rem 2.25rem;
  margin-bottom: 1.5rem;
}
.card h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.role p {
  font-size: 0.98rem;
  opacity: 0.78;
  margin: 0 0 0.9rem;
  line-height: 1.65;
}
.role p:last-child { margin-bottom: 0; }

.apply h2 { margin-bottom: 1.75rem; }
.field { display: block; margin-bottom: 1.5rem; }
.field > span {
  display: block;
  font-size: 0.92rem;
  opacity: 0.85;
  margin-bottom: 0.55rem;
  font-weight: 500;
  color: #e8e8e8;
}
.field input, .field textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
.field input:hover, .field textarea:hover { border-color: rgba(255, 255, 255, 0.18); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: #4a90e2;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.12);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.field.file-field .field-label,
.field.radio-field .field-label {
  display: block;
  font-size: 0.92rem;
  opacity: 0.85;
  margin-bottom: 0.6rem;
  font-weight: 500;
  color: #e8e8e8;
  line-height: 1.4;
}

.file-input {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.file-input:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.5); }
.file-input input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.file-input .file-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.file-input .file-name {
  font-size: 0.9rem;
  opacity: 0.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-input .file-name.has-file {
  opacity: 1;
  color: #4ade80;
}

.radio-pills {
  display: flex;
  gap: 0.6rem;
}
.radio-pills .pill {
  flex: 1;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.radio-pills .pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-pills .pill > span {
  display: block;
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: #e8e8e8;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.radio-pills .pill:hover > span {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.5);
}
.radio-pills .pill input:checked + span {
  background: linear-gradient(135deg, rgba(74, 144, 226, 0.18) 0%, rgba(155, 89, 255, 0.18) 100%);
  border-color: rgba(74, 144, 226, 0.6);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}
.radio-pills .pill input:focus-visible + span {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

button[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, #4a90e2 0%, #9b59ff 100%);
  color: #ffffff;
  border: 0;
  padding: 1rem 1.75rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.25);
  transition: transform 0.1s ease-out, box-shadow 0.15s, filter 0.15s;
}
button[type="submit"]:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 26px rgba(74, 144, 226, 0.35);
}
button[type="submit"]:active { transform: translateY(1px); box-shadow: 0 4px 14px rgba(74, 144, 226, 0.25); }
button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }

.status { margin-top: 1.25rem; font-size: 0.95rem; min-height: 1.4em; text-align: center; }
.status.ok { color: #4ade80; }
.status.err { color: #f87171; }
.status.pending { opacity: 0.65; }

.footer-note {
  margin-top: 4rem;
  font-size: 0.78rem;
  opacity: 0.4;
  text-align: center;
  line-height: 1.6;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 600px) {
  .career { padding: 2.5rem 1.25rem 4rem; }
  .card { padding: 1.5rem 1.25rem 1.75rem; border-radius: 12px; }
  .hero h1 { font-size: 2.25rem; }
}

.thank-you {
  text-align: center;
  padding: 4rem 0 3rem;
  animation: fadeIn 0.6s ease-out;
}
.thank-you h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 0.75rem;
}
.thank-you p {
  font-size: 1.1rem;
  opacity: 0.7;
  margin: 0;
}
.thank-check {
  display: inline-flex;
  width: 88px;
  height: 88px;
}
.thank-check svg {
  width: 100%;
  height: 100%;
}
.thank-check circle {
  fill: none;
  stroke: #4ade80;
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: drawCircle 0.55s ease-out forwards;
}
.thank-check path {
  fill: none;
  stroke: #4ade80;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.4s ease-out 0.45s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }
@keyframes fadeIn     { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Admin */
body.admin { padding: 0; }
.admin-shell { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.admin-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #1f1f1f;
  padding-bottom: 1rem;
}
.admin-header h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.admin-header .count { opacity: 0.55; font-size: 0.9rem; }
.admin-header .refresh {
  margin-left: auto;
  background: transparent;
  border: 1px solid #262626;
  color: #e8e8e8;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.admin-header .refresh:hover { border-color: #4a90e2; }

.app-card {
  background: #131313;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 1.4rem 1.75rem 1.6rem;
  margin-bottom: 1.25rem;
}
.app-card > header {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  opacity: 0.6;
  align-items: center;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #1f1f1f;
}
.app-card .id { font-weight: 600; opacity: 0.9; color: #4a90e2; }
.app-card .ip { font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 0.78rem; }
.app-card .delete {
  margin-left: auto;
  background: transparent;
  border: 1px solid #2a1f1f;
  color: #f87171;
  border-radius: 5px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.15s;
}
.app-card .delete:hover { opacity: 1; border-color: #f87171; background: rgba(248, 113, 113, 0.08); }

.app-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.qa-label {
  font-size: 0.8rem;
  opacity: 0.55;
  font-weight: 500;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}
.qa-note { opacity: 0.6; font-weight: 400; font-style: italic; }
.qa-answer {
  font-size: 0.98rem;
  color: #e8e8e8;
  line-height: 1.55;
}
.qa-answer .answer-text {
  white-space: pre-wrap;
  word-break: break-word;
}
.qa-empty {
  opacity: 0.4;
  font-style: italic;
  font-size: 0.9rem;
}

.pill-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pill-badge.yes {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.pill-badge.no {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(74, 144, 226, 0.1);
  color: #6ba5e8;
  border: 1px solid rgba(74, 144, 226, 0.3);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.15s;
}
.cv-link:hover {
  background: rgba(74, 144, 226, 0.18);
  border-color: rgba(74, 144, 226, 0.55);
  color: #8cb9ee;
}
.cv-link svg { flex-shrink: 0; opacity: 0.85; }
.cv-link .file-size { opacity: 0.6; font-size: 0.82rem; }

.empty { opacity: 0.45; text-align: center; padding: 4rem 0; }

@media (max-width: 600px) {
  .app-card { padding: 1.2rem 1.25rem 1.4rem; }
  .app-card > header { flex-wrap: wrap; gap: 0.6rem; }
}
