:root {
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0f172a;
  color: #e2e8f0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 14px;
  max-width: 540px;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  background: rgba(15, 118, 110, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.status-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5eead4;
}

.status-value {
  font-size: 13px;
  color: #e0f2f1;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5f5;
}

.prompt-section textarea {
  width: 100%;
  min-height: 100px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.7);
  color: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prompt-section textarea:focus {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.dropzone {
  border: 2px dashed rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  background: rgba(15, 23, 42, 0.6);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.dropzone.dragover {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(30, 41, 59, 0.9);
}

.dropzone p {
  margin: 0 0 16px;
  color: #94a3b8;
  font-size: 14px;
}

.primary-button,
.secondary-button {
  border-radius: 9999px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border: none;
}

.primary-button {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: white;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.secondary-button:hover {
  background: rgba(148, 163, 184, 0.25);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.actions-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status-text {
  min-height: 18px;
  font-size: 13px;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.preview {
  display: none;
  max-width: 100%;
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
}

.response-box {
  min-height: 120px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
  overflow: hidden;
}

.response-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(59, 130, 246, 0.18),
    transparent 55%
  );
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 640px) {
  .container {
    padding: 24px 16px 48px;
    gap: 20px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions-buttons {
    width: 100%;
  }

  .primary-button,
  .secondary-button {
    flex: 1;
    text-align: center;
  }
}

.logout-link {
  align-self: flex-start;
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.logout-link:hover {
  background: rgba(248, 250, 252, 0.12);
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
}

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.18), transparent 45%),
    radial-gradient(circle at 90% 15%, rgba(168, 85, 247, 0.18), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(34, 211, 238, 0.18), transparent 55%),
    #0b1220;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 42px 38px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow:
    0 30px 80px rgba(15, 23, 42, 0.65),
    0 0 0 1px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -30% 35% 55% -30%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 58%);
  opacity: 0.85;
  pointer-events: none;
  filter: blur(6px);
  transform: rotate(-6deg);
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.auth-subtitle {
  margin: -10px 0 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 15px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5f5;
  letter-spacing: 0.03em;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.auth-input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 6px 18px rgba(14, 165, 233, 0.18);
  transform: translateY(-1px);
}

.auth-button {
  margin-top: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  color: #020617;
  background: linear-gradient(135deg, #22d3ee, #6366f1, #a855f7);
  box-shadow:
    0 18px 45px rgba(99, 102, 241, 0.35),
    inset 0 -4px 12px rgba(255, 255, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.22s ease;
}

.auth-button:hover {
  transform: translateY(-1.5px);
  box-shadow:
    0 24px 60px rgba(99, 102, 241, 0.45),
    inset 0 -4px 12px rgba(255, 255, 255, 0.45);
}

.auth-error {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  font-size: 13px;
  border: 1px solid rgba(252, 165, 165, 0.35);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.18);
}

