/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

input,
select,
button {
  font-family: inherit;
}

/* ===== Tokens ===== */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

  /* shadcn zinc palette */
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #18181b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --destructive: #ef4444;
  --destructive-foreground: #fafafa;
  --success: #22c55e;
  --success-foreground: #ffffff;

  --radius: 0.5rem;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #09090b;
    --card-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --border: #27272a;
    --input: #27272a;
    --ring: #d4d4d8;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --destructive: #dc2626;
    --destructive-foreground: #fafafa;
    --success: #16a34a;
    --success-foreground: #ffffff;

    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);
  }
}

/* ===== Base ===== */
html {
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  margin: 0;
  padding: 1rem;
  display: grid;
  place-items: center;
}

.container {
  width: 100%;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Card ===== */
.card {
  align-self: stretch;
  padding: 1.5rem;
}

@media (min-width: 480px) {
  .card {
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
}

.login-gif {
  max-width: 250px;
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.card-header {
  margin-bottom: 1.5rem;
}


.card-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.card-header p {
  margin-top: 0.25rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}

input[type="text"],
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--foreground);
  background: transparent;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select {
  appearance: none;
  cursor: pointer;
}

input[type="text"]:focus,
select:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px var(--ring);
}

input[type="text"]::placeholder {
  color: var(--muted-foreground);
}

/* ===== File input ===== */
input[type="file"] {
  font-size: 0.875rem;
  color: var(--foreground);
}

input[type="file"]::file-selector-button {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  margin-right: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

input[type="file"]::file-selector-button:hover {
  background: var(--muted);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s,
    opacity 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled),
.btn-github:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--muted);
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--muted);
  color: var(--foreground);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
}

/* ===== GitHub button ===== */
.btn-github {
  max-width: 250px;
  width: 100%;
  background: #24292f;
  color: #ffffff;
  border-color: #24292f;
}

@media (prefers-color-scheme: dark) {
  .btn-github {
    background: #f0f0f0;
    color: #24292f;
    border-color: #f0f0f0;
  }

  .btn-github img {
    filter: invert(1);
  }
}

.btn-github img {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== Feedback states ===== */
.feedback {
  text-align: center;
  padding: 4rem 0 3rem;
}

.feedback-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feedback-gif {
  max-width: 270px;
  width: 100%;
  border-radius: var(--radius);
  margin: 0 auto 2rem;
}

.feedback-btn {
  max-width: 270px;
  width: 100%;
}

.feedback-icon--error {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.feedback h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feedback p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* ===== Utilities ===== */
.text-muted {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.text-muted a {
  color: inherit;
  text-decoration: underline;
}
