@font-face {
  font-family: 'Whitney';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(https://cdn.glitch.com/ec49dcb2-f55b-45c7-95be-e51f466e2cff%2Fwhitneylight.woff?v=1610494283298) format("woff");
}

@font-face {
  font-family: 'Whitney';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://cdn.glitch.com/ec49dcb2-f55b-45c7-95be-e51f466e2cff%2Fwhitneybook.woff?v=1610494282898) format("woff");
}

@font-face {
  font-family: 'Whitney';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://cdn.glitch.com/ec49dcb2-f55b-45c7-95be-e51f466e2cff%2Fwhitneymedium.woff?v=1610494284187) format("woff");
}

@font-face {
  font-family: 'Whitney';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://cdn.glitch.com/ec49dcb2-f55b-45c7-95be-e51f466e2cff%2Fwhitneysemibold.woff?v=1610494285485) format("woff");
}

@font-face {
  font-family: 'Whitney';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://cdn.glitch.com/ec49dcb2-f55b-45c7-95be-e51f466e2cff%2Fwhitneybold.woff?v=1610494282762) format("woff");
}

:root {
  /* Extracted & adapted from discord.css */
  --background-body: #363940;
  --background: #2F3136;
  --background-dark: #23272A;
  --background-input: #202225;
  --button-hover: #36393F;
  --selection: #7289DA;
  --text-main: #dbdbdb;
  --text-bright: #ffffff;
  --text-muted: #a9b1ba;
  --links: #7289DA;
  --focus: #7289DA;
  --border: #000000;
  --animation-duration: 0.1s;
  --scrollbar-thumb: #324759;
  --scrollbar-thumb-hover: #141414;
  --form-placeholder: #a9a9a9;
  --form-text: #ffffff;

  /* Application Semantic Tokens */
  --accent-primary: #7289DA;
  --accent-primary-hover: #5f73bc;
  --accent-success: #43b581;
  --accent-warning: #faa61a;
  --accent-danger: #f04747;
  --accent-danger-hover: #d84040;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.1);
  --divider-color: rgba(255, 255, 255, 0.08);
  --shadow-discord-hover: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
}

html {
  scrollbar-color: var(--scrollbar-thumb) var(--background-body);
  scrollbar-width: thin;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Whitney', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
}

::selection {
  background-color: var(--selection);
  color: var(--text-bright);
}

::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body {
  background-color: var(--background-body);
  color: var(--text-main);
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-weight: 600;
  color: var(--text-bright);
}

.screen {
  display: none;
  height: 100%;
  width: 100%;
}

.screen.active {
  display: flex;
}

/* Inputs & Form Controls */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  text-align: left;
}

.input-wrapper label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--background-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--form-text);
  font-size: 15px;
  outline: none;
  user-select: text;
  transition: background-color var(--animation-duration) linear, border-color var(--animation-duration) linear, box-shadow var(--animation-duration) linear;
}

.input-wrapper input::placeholder {
  color: var(--form-placeholder);
}

.input-wrapper input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px var(--focus);
}

/* Buttons (pill style & hover shadow from discord.css) */
.btn {
  width: 100%;
  padding: 12px 28px;
  border-radius: 60px;
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color var(--animation-duration) linear, border-color var(--animation-duration) linear, color var(--animation-duration) linear, box-shadow var(--animation-duration) linear, transform var(--animation-duration) ease;
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus);
}

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

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-bright);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-primary-hover);
  box-shadow: var(--shadow-discord-hover);
}

.btn-secondary {
  background-color: var(--background-dark);
  color: var(--text-bright);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--button-hover);
  color: var(--links);
  box-shadow: var(--shadow-discord-hover);
}

.btn-direct-entry {
  margin-top: 10px;
  border: 1px solid var(--border-soft);
}

.btn-inline {
  width: auto;
  white-space: nowrap;
  padding: 10px 20px;
}

.divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--divider-color);
}

.divider span {
  padding: 0 12px;
}

/* Spinner */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(114, 137, 218, 0.22);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--background);
  width: 90%;
  max-width: 480px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  padding: 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  position: relative;
}

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

.modal-header h2 {
  font-size: 20px;
  color: var(--text-bright);
}

.modal-description {
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.close-btn {
  background-color: var(--background-dark);
  border: none;
  border-radius: 60px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--animation-duration) linear, color var(--animation-duration) linear;
}

.close-btn:hover {
  background-color: var(--button-hover);
  color: var(--links);
}

.close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus);
}

.link-copy-box {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.link-copy-box input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background-color: var(--background-input);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--form-text);
  font-size: 14px;
  outline: none;
  user-select: text;
}

.link-copy-box input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px var(--focus);
}
