:root {
  --gws-primary: #002ebb;
  --gws-accent: #00c3eb;
  --gws-secondary: #0083f2;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 55%),
    repeating-radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 46px),
    linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.32)),
    linear-gradient(135deg, var(--gws-primary) 0%, var(--gws-secondary) 100%);
  font-family: "Inter", "Helvetica Neue", sans-serif;
  color: #fff;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(9vh + 100px) 24px calc(5vh + 100px);
}

.brand-logo {
  position: fixed;
  bottom: 20px;
  right: 24px;
  height: 34px;
  width: auto;
  opacity: 0.9;
  z-index: 10;
}

h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

/* Landing page */

.intro-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.intro-description {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  font-size: 1.05rem;
  margin: 0;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 32px;
  background: #fff;
  color: var(--gws-primary);
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

/* Question screen */

.question-screen {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}

.question {
  font-size: clamp(1.4rem, 4.6vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  margin: 0;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.bottom-controls {
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.progress {
  width: 220px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: var(--gws-accent);
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.input-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  padding: 8px 0;
  max-height: 5.6em;
  overflow-y: auto;
}

textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.send-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--gws-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.send-btn:hover {
  background: #eef2f7;
  transform: translateY(-1px);
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease-in;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

.sending-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.sending-indicator .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  animation: pulse 1.1s infinite ease-in-out;
}

.sending-indicator .dot:nth-child(2) {
  animation-delay: 0.15s;
}

.sending-indicator .dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.done-note {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin: 0;
}

/* Admin / results pages */

.admin-body {
  background: #f5f7fb;
  color: #1a1c24;
}

.admin-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.admin-logo {
  height: 28px;
  width: auto;
}

.admin-back {
  color: var(--gws-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-back:hover {
  text-decoration: underline;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 24px;
}

.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-title-row .admin-title {
  margin-bottom: 0;
}

.admin-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 32px 0 12px;
}

.admin-button {
  display: inline-block;
  padding: 10px 18px;
  background: var(--gws-primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-button:hover {
  opacity: 0.9;
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
}

.admin-list-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-list-title {
  font-weight: 600;
}

.admin-list-meta {
  color: #546681;
  font-size: 0.9rem;
}

.admin-empty {
  color: #546681;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f4;
  font-size: 0.92rem;
  vertical-align: top;
}

.admin-table th {
  color: #546681;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table-title {
  font-weight: 600;
  white-space: nowrap;
}

.admin-link {
  color: var(--gws-primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-link:hover {
  text-decoration: underline;
}

.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-badge-done {
  background: rgba(16, 185, 129, 0.12);
  color: #0a7a45;
}

.admin-badge-progress {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.admin-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin: 0 0 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-meta dt {
  font-size: 0.78rem;
  color: #546681;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.admin-meta dd {
  margin: 0;
  font-weight: 600;
}

.admin-transcript {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-turn {
  margin: 0 0 14px;
  line-height: 1.5;
  font-size: 0.92rem;
}

.admin-turn:last-child {
  margin-bottom: 0;
}

.admin-turn-role {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.admin-turn-interviewer .admin-turn-role {
  color: var(--gws-primary);
}

.admin-turn-respondent .admin-turn-role {
  color: #546681;
}
