@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&family=Roboto+Condensed:wght@100..900&display=swap");

:root {
  --bg: #0a0a0f;
  --surface: #161618;
  --purple: #b388ff;
  --violet: #d293fa;
  --green: #4ceb7a;
  --white: #f0f0f0;
  --gray: #666680;
  --error: #ff6b6b;
  --header-bg: #11001b;
  --plum: #d8a7f6;
  --muted-red: #b87a7a;
  --green-light: #7ce89a;
  --border: #333333;
  --glass-border: rgba(255, 255, 255, 0.08);
  --amber: #d4a853;
  --sky: #64b5f6;

  --weight-normal: 400;
  --weight-semi: 600;
  --weight-bold: 700;
  --weight-black: 900;

  --tracking-tight: 0.48px;
  --tracking-normal: 2px;
  --tracking-wide: 3px;

  --text-2xs: 11px;
  --text-xs: 13px;
  --text-sm: 16px;
  --text-base: 20px;
  --text-lg: 25px;
  --text-xl: 31px;
  --text-2xl: 39px;
  --text-3xl: 61px;
  --text-4xl: 76px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: "Roboto Slab", serif;
  font-size: 20px;
}

#app {
  height: 100%;
  width: 100%;
}

/* --- Colors (used as classes) --- */
.color-white {
  color: var(--white);
}
.color-purple {
  color: var(--purple);
}
.color-violet {
  color: var(--violet);
}
.color-plum {
  color: var(--plum);
}
.color-green {
  color: var(--green);
}
.color-green-light {
  color: var(--green-light);
}
.color-gray {
  color: var(--gray);
}
.color-error {
  color: var(--error);
}
.color-border {
  color: var(--border);
}
.color-glass-border {
  color: var(--glass-border);
}
.color-dark {
  color: #0a0a0f;
}
.color-muted-red {
  color: var(--muted-red);
}
.color-amber {
  color: var(--amber);
}
.color-sky {
  color: var(--sky);
}

/* --- Text sizes --- */
.text-2xs {
  font-size: var(--text-2xs);
}
.text-xs {
  font-size: var(--text-xs);
}
.text-sm {
  font-size: var(--text-sm);
}
.text-base {
  font-size: var(--text-base);
}
.text-lg {
  font-size: var(--text-lg);
}
.text-xl {
  font-size: var(--text-xl);
}
.text-2xl {
  font-size: var(--text-2xl);
}
.text-3xl {
  font-size: var(--text-3xl);
}
.text-4xl {
  font-size: var(--text-4xl);
}

/* --- Font weights --- */
.weight-normal {
  font-weight: var(--weight-normal);
}
.weight-semi {
  font-weight: var(--weight-semi);
}
.weight-bold {
  font-weight: var(--weight-bold);
}

/* --- Letter spacing --- */
.tracking-tight {
  letter-spacing: var(--tracking-tight);
}
.tracking-normal {
  letter-spacing: var(--tracking-normal);
}
.tracking-wide {
  letter-spacing: var(--tracking-wide);
}

/* --- Uppercase text --- */
.uppercase {
  text-transform: uppercase;
}

/* --- Starfield background --- */
.starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Card exit animations --- */
@keyframes card-exit-correct {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-40px) scale(0.95);
  }
}
@keyframes card-exit-incorrect {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
}
.session-card.is-exiting-correct {
  animation: card-exit-correct 350ms ease-out forwards;
  border-color: rgba(76, 235, 122, 0.4);
  box-shadow: 0 0 30px rgba(76, 235, 122, 0.2);
}
.session-card.is-exiting-incorrect {
  animation: card-exit-incorrect 350ms ease-out forwards;
  border-color: rgba(210, 147, 250, 0.4);
  box-shadow: 0 0 30px rgba(210, 147, 250, 0.2);
}

/* --- Card delete animation --- */
@keyframes card-delete {
  from {
    opacity: 1;
    max-height: 200px;
    margin-bottom: 1.5rem;
    transform: scaleY(1);
  }
  to {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    transform: scaleY(0.8);
  }
}
.is-removing {
  animation: card-delete 300ms ease-out forwards;
  overflow: hidden;
  pointer-events: none;
}

/* --- Header Bar --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  background: rgba(17, 0, 27, 0.5);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.app-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.app-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.app-header-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-header-title-editable {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  outline: none;
  cursor: text;
  font-family: inherit;
  min-width: 0;
  flex: 1;
}
.app-header-title-editable:focus {
  border-bottom-color: var(--plum);
}
.app-header-title-editable.has-error {
  border-bottom-color: var(--error);
}
.header-error {
  position: absolute;
  top: 52px;
  left: 0;
  padding: 4px 20px;
  z-index: 2;
}

/* --- Header Buttons --- */
.header-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
  flex-shrink: 0;
}
.header-btn svg {
  width: 20px;
  height: 20px;
}
.header-btn--back svg,
.header-btn--trash svg,
.header-btn--logout svg,
.header-btn--add svg,
.header-btn--stop svg {
  fill: var(--violet);
}
.header-btn--play svg {
  fill: var(--green);
}
.header-btn--back:hover,
.header-btn--trash:hover,
.header-btn--logout:hover,
.header-btn--add:hover,
.header-btn--stop:hover {
  background: rgba(216, 167, 246, 0.3);
}
.header-btn--play:hover {
  background: rgba(124, 232, 154, 0.3);
}

/* --- Footer Nav --- */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0;
  height: 52px;
  background: rgba(17, 0, 27, 0.5);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}
.nav-tab svg {
  width: 20px;
  height: 20px;
}
.nav-tab span {
  text-transform: uppercase;
  font-family: "Roboto Condensed", sans-serif;
}
.nav-tab--inactive svg {
  fill: var(--gray);
}
.nav-tab--inactive span {
  color: var(--gray);
}
.nav-tab--active svg {
  fill: var(--green);
}
.nav-tab--active span {
  color: var(--green);
}
.nav-tab:hover svg {
  fill: rgba(76, 235, 122, 0.45);
}
.nav-tab:hover span {
  color: rgba(76, 235, 122, 0.45);
}
.nav-tab--active:hover svg {
  fill: var(--green);
}
.nav-tab--active:hover span {
  color: var(--green);
}

/* --- Screen layout --- */
.screen {
  background: var(--bg);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.screen-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.screen-body::-webkit-scrollbar {
  display: none;
}

/* --- Login Screen --- */
.login-screen {
  background: var(--bg);
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.login-title {
  text-transform: uppercase;
  letter-spacing: 1px;
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-glow {
  width: 120px;
  height: 6px;
  border-radius: 3px;
  margin-top: 8px;
  background: radial-gradient(
    ellipse at center,
    var(--green) 0%,
    rgba(76, 235, 122, 0) 70%
  );
}
.login-button-area {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.login-status {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-transform: uppercase;
  z-index: 1;
}

/* --- Buttons --- */
.btn {
  padding: 12px 40px;
  border-radius: 8px;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: var(--weight-bold);
}
.btn-primary {
  background: var(--violet);
  transition: background 0.15s;
}
.btn-primary:hover {
  background: var(--plum);
}
.btn-primary:disabled,
.btn-primary.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-pass {
  background: var(--green);
  transition: background 0.15s;
  flex: 1;
  order: 2;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-normal);
}
.btn-pass:hover {
  background: var(--green-light);
}
.btn-pass:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-fail {
  background: var(--violet);
  transition: background 0.15s;
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-normal);
}
.btn-fail:hover {
  background: var(--plum);
}
.btn-fail:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: none;
  border: none;
  transition: color 0.15s;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 700;
  padding: 12px 0;
}
.btn-secondary:hover {
  color: var(--white);
}
.btn-google {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 20px 48px;
  border-radius: 8px;
  font-family: "Roboto Condensed", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-decoration: none;
}
.btn-google:hover {
  background: rgba(210, 147, 250, 0.3);
  border-color: var(--plum);
}
.btn-google .google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 4px;
  padding: 4px;
  width: 36px;
  height: 36px;
}
.btn-google .google-icon svg {
  width: 22px;
  height: 22px;
}
.btn-icon-square {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  min-width: 40px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    border-color 0.15s;
  padding: 0;
}
.btn-icon-square svg {
  width: 24px;
  height: 24px;
  fill: var(--violet);
}
.btn-icon-square:hover {
  background: rgba(210, 147, 250, 0.3);
  border-color: var(--plum);
}
.btn-icon-square:hover svg {
  fill: var(--plum);
}
.btn-add-wide {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn-add-wide:hover {
  background: rgba(210, 147, 250, 0.3);
  border-color: var(--plum);
}
.btn-add-wide--full {
  width: 100%;
  padding: 12px 20px;
  margin-top: 20px;
  font-size: 25px;
}
.btn-add-wide--full:hover {
  color: var(--violet);
}
.btn-add-wide--sm {
  width: 80px;
  padding: 12px 20px;
  font-size: 20px;
}
.btn-add-wide--sm:hover {
  color: var(--violet);
}
.btn-delete-card {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  line-height: 1;
  font-size: var(--text-base);
}
.btn-delete-card:hover {
  color: var(--error);
}

/* --- Inputs --- */
.input-text {
  background: var(--surface);
  color: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.input-text:focus {
  border-color: var(--plum);
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.35),
    0 0 40px rgba(210, 147, 250, 0.15);
}
.input-text::placeholder {
}
.input-text.has-error {
  border-color: var(--error);
}

/* Custom dropdown */
.dropdown {
  position: relative;
}
.dropdown-trigger {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.dropdown-trigger:hover {
  border-color: var(--plum);
}
.dropdown--open .dropdown-trigger {
  border-color: var(--plum);
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.35),
    0 0 40px rgba(210, 147, 250, 0.15);
}
.dropdown-trigger svg {
  width: 24px;
  height: 24px;
  fill: var(--violet);
  flex-shrink: 0;
}
.dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
}
.dropdown-panel {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--plum);
  border-radius: 8px;
  padding: 0;
  z-index: 11;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: none;
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.35),
    0 0 40px rgba(210, 147, 250, 0.15);
}
.dropdown-panel::-webkit-scrollbar {
  display: none;
}
.dropdown-option {
  padding: 8px 20px;
  cursor: pointer;
  transition:
    background 0.1s,
    color 0.1s;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(210, 147, 250, 0.2);
}
.dropdown-option:last-child {
  border-bottom: none;
}
.dropdown-option:hover {
  background: rgba(210, 147, 250, 0.25);
}
.dropdown-option:hover .color-white {
  color: var(--violet) !important;
}
.dropdown-option--selected {
  background: rgba(210, 147, 250, 0.15);
}
.dropdown-option--selected .color-white {
  color: var(--violet) !important;
}

.input-textarea {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  resize: none;
  field-sizing: content;
  min-height: 60px;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: none;
}
.input-textarea::-webkit-scrollbar {
  display: none;
}
.detail-card-label ~ div + div {
  margin-top: 4px;
}
.input-textarea:focus {
  border-color: var(--plum);
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.35),
    0 0 40px rgba(210, 147, 250, 0.15);
}
.input-textarea.has-error {
  border-color: var(--error);
}
.input-number {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-family: inherit;
  width: 80px;
  text-align: center;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  -moz-appearance: textfield;
}
.input-number::-webkit-inner-spin-button,
.input-number::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-number:focus {
  border-color: var(--plum);
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.35),
    0 0 40px rgba(210, 147, 250, 0.15);
}
.input-number.has-error {
  border-color: var(--error);
}
.modal-dialog .input-number {
  width: 100%;
  text-align: left;
}
.modal-dialog .input-field-number {
  width: 100%;
}
.input-field-number {
  width: 80px;
}
.input-field-number > .input-error {
  white-space: nowrap;
}
.input-error {
  margin-top: 4px;
}

/* --- Knob Input --- */
.knob-input {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 4px 16px 8px 16px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.knob-input:focus-within {
  border-color: var(--plum);
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.35),
    0 0 40px rgba(210, 147, 250, 0.15);
}
.knob-input.has-error {
  border-color: var(--error);
}
.knob-input-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.knob-input-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.knob-input-value {
  background: none;
  border: none;
  font-family: inherit;
  width: 60px;
  outline: none;
  text-align: left;
  -moz-appearance: textfield;
}
.knob-input-value::-webkit-inner-spin-button,
.knob-input-value::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.knob-input-suffix {
  text-transform: uppercase;
}
.knob-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 1023px) {
  .knob-row {
    grid-template-columns: 1fr;
  }
}

/* --- Cards (collection/study set) --- */
.col-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
.col-card:hover {
  transform: translateY(-4px);
  background: radial-gradient(
    circle at center,
    rgba(216, 167, 246, 0.15) 0%,
    var(--surface) 70%
  );
  border-color: var(--violet);
  box-shadow:
    0 0 20px rgba(210, 147, 250, 0.25),
    0 0 40px rgba(210, 147, 250, 0.1);
}
.col-card-number {
  margin-bottom: 8px;
}
.col-card-title {
  margin-bottom: 4px;
  overflow-wrap: break-word;
}
.col-card-desc {
  font-style: italic;
  margin-bottom: 8px;
  line-height: 0.8;
  overflow-wrap: break-word;
}
.col-card-footer {
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.col-card-footer span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.col-card-footer svg {
  width: 16px;
  height: 16px;
  fill: var(--violet);
}

/* Desktop: grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  gap: 48px;
}
.cards-grid .col-card {
  width: 300px;
  height: 300px;
}

/* Phone: list */
@media (max-width: 1023px) {
  .cards-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }
  .cards-grid .col-card {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr minmax(0, 25%);
    align-items: center;
    gap: 0 20px;
  }
  .cards-grid .col-card-number {
    margin-bottom: 0;
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .cards-grid .col-card-title {
    grid-column: 2;
    margin-bottom: 0;
    min-width: 0;
  }
  .cards-grid .col-card-desc {
    grid-column: 2;
    margin-bottom: 0;
    min-width: 0;
  }
  .cards-grid .col-card-footer {
    grid-column: 3;
    grid-row: 1 / span 3;
    border-top: none;
    border-left: 1px solid var(--border);
    padding-top: 0;
    padding-left: 20px;
    margin-top: 0;
    text-align: right;
  }
  .cards-grid .col-card-footer svg {
    display: none;
  }
}

/* --- Stopwatch --- */
.session-stopwatch {
  font-family: "Roboto Condensed", sans-serif;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--green);
  opacity: 0.5;
  margin-bottom: 8px;
  text-align: center;
}

/* --- Flashcard (study session) --- */
.session-card {
  background: #111114;
  border: 1px solid rgba(210, 147, 250, 0.15);
  border-radius: 12px;
  padding: 40px 28px;
  width: 100%;
  max-width: 560px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-shadow:
    0 0 30px rgba(210, 147, 250, 0.1),
    0 0 60px rgba(210, 147, 250, 0.05);
  box-sizing: border-box;
  overflow: hidden;
}
.session-card:hover {
  border-color: rgba(210, 147, 250, 0.35);
  box-shadow:
    0 0 30px rgba(210, 147, 250, 0.2),
    0 0 60px rgba(210, 147, 250, 0.1);
}
.session-card-counter {
  text-transform: uppercase;
  opacity: 0.6;
}
.session-card-content {
  text-align: center;
  padding: 40px 0;
  margin: auto 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: pre-line;
}
.session-card-content--multiline {
  text-align: justify;
}
.session-card-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
}
.session-card-hint svg {
  width: 24px;
  height: 24px;
  fill: var(--purple);
}
.session-buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 560px;
  margin-top: 16px;
  gap: 0;
}
.session-buttons::before {
  content: "";
  flex: 1;
  order: 1;
}
.session-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 28px 28px;
  position: relative;
  z-index: 1;
}

/* --- Summary Card --- */
.summary-card {
  background: #111114;
  border: 1px solid rgba(210, 147, 250, 0.15);
  border-radius: 12px;
  padding: 40px 28px;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 30px rgba(210, 147, 250, 0.1),
    0 0 60px rgba(210, 147, 250, 0.05);
}
.summary-card-title {
  text-align: center;
  margin-bottom: 20px;
}
.summary-table-header {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 2px solid var(--purple);
  margin-bottom: 8px;
}
.summary-table-header span {
  text-transform: uppercase;
  letter-spacing: 3px;
}
.summary-table-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.summary-table-label {
}
.summary-table-value {
}
.summary-table-row--total {
  border-top: 2px solid var(--border);
}
.summary-table-row--total .summary-table-label {
}
.summary-table-row--total .summary-table-value {
}
.summary-done-btn {
  margin-top: 28px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-normal);
  align-self: center;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 380px;
  max-width: 90%;
}
@media (min-width: 1024px) {
  .modal-dialog {
    width: 420px;
  }
}
.modal-title {
  text-align: center;
  margin-bottom: 32px;
}
.modal-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
}

/* --- Quote --- */
.quote-block {
  margin-top: 32px;
  margin-bottom: 48px;
}
.quote-block-attribution {
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0;
}
.quote-block-text {
  line-height: 1.3;
}

/* --- Loading Indicator --- */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 28px;
  position: relative;
  z-index: 1;
}
.loading-indicator--inline {
  min-height: 120px;
  flex: initial;
}
.loading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 20px rgba(76, 235, 122, 0.6),
    0 0 40px rgba(76, 235, 122, 0.3);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
.loading-label {
  text-transform: uppercase;
  letter-spacing: 3px;
}

/* --- Profile Screen --- */
.profile-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 28px;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.profile-body::-webkit-scrollbar {
  display: none;
}
.profile-greeting {
  margin-bottom: 60px;
  text-align: center;
}
.profile-section {
  width: 100%;
  max-width: 500px;
  margin-bottom: 60px;
}
.profile-section-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-align: center;
}
.profile-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}
.profile-knobs-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 12px;
}
.profile-knob {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.profile-knob > .input-field-number {
  min-width: 0;
}
.profile-stage-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.profile-stage-num {
}
.profile-stage-suffix {
}
.profile-stage-trash {
  margin-left: auto;
}

/* --- Collection Detail --- */
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
}
.detail-body::-webkit-scrollbar {
  display: none;
}
.detail-section {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.detail-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  margin-top: 20px;
}
.detail-card-label-text {
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* --- Study Set Detail --- */
.studyset-detail-knobs {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
}

/* --- Linked collections --- */
.linked-collection-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.linked-collection-num {
}
.linked-collection-name {
  flex: 1;
}
.linked-collection-trash {
  margin-left: auto;
}

/* --- Dropdown --- */
.dropdown {
  position: relative;
  display: inline-block;
  flex: 1;
  min-width: 0;
}

/* --- Dividers --- */
.divider {
  width: 100%;
  border: none;
  margin: 0;
}
.divider--thin {
  height: 1px;
}
.divider--thick {
  height: 2px;
}
.divider--border {
  background: var(--border);
}
.divider--purple {
  background: var(--purple);
}
.divider--glass-border {
  background: var(--glass-border);
}
.divider--plum {
  background: var(--plum);
}
.divider--gray {
  background: var(--gray);
}

/* --- Field label --- */
.field-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.section-label {
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  text-align: center;
}
.indexed-label {
  width: 32px;
}

/* --- Spacing utilities --- */
.gap-sm {
  gap: 8px;
}
.gap-md {
  gap: 20px;
}
.gap-lg {
  gap: 28px;
}
.mb-sm {
  margin-bottom: 8px;
}
.mb-md {
  margin-bottom: 20px;
}
.mb-lg {
  margin-bottom: 28px;
}
.mb-xl {
  margin-bottom: 40px;
}
.mt-md {
  margin-top: 20px;
}
.mt-lg {
  margin-top: 28px;
}
.mt-xl {
  margin-top: 40px;
}
.mt-2xl {
  margin-top: 60px;
}

/* --- Delete confirmation dialogs --- */
.btn-danger {
  background: var(--muted-red);
  color: var(--bg);
  transition: background 0.15s;
}
.btn-danger:hover {
  background: #c98a8a;
}
.btn-danger[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.delete-dialog-body {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 24px;
}
.delete-dialog-body ul {
  list-style-position: inside;
  padding-left: 0;
  margin: 8px 0 0;
}
.delete-dialog-body .hl {
  color: var(--violet);
}
.delete-dialog-confirm-label {
  font-size: var(--text-xs);
  color: var(--gray);
  margin-bottom: 0.5rem;
}
.delete-dialog-confirm-label code {
  color: var(--white);
  font-family: "Roboto Slab", serif;
}

/* ============================================================================
   Toast Notifications
   ============================================================================ */

.toast-stack {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  max-width: 380px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  animation: toast-enter 250ms ease-out;
}
.toast--error {
  background: rgba(255, 107, 107, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 107, 107, 0.25);
}
.toast-body {
  flex: 1;
}
.toast-dismiss {
  position: relative;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.toast-timer-ring {
  position: absolute;
  inset: 0;
  width: 28px;
  height: 28px;
  transform: rotate(-90deg);
}
.toast-timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 2;
}
.toast-timer-arc {
  fill: none;
  stroke: var(--muted-red);
  stroke-width: 2;
  stroke-dasharray: 75.4;
  stroke-dashoffset: 0;
  animation: toast-countdown 7s linear forwards;
}
.toast-dismiss-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-red);
  font-size: 16px;
  line-height: 1;
}
.toast-dismiss:hover .toast-dismiss-icon {
  color: var(--error);
}
.toast-dismiss:hover .toast-timer-arc {
  stroke: var(--error);
}
@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toast-countdown {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 75.4;
  }
}

/* ============================================================================
   Landing Page
   ============================================================================ */

.landing-body {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.landing-body::-webkit-scrollbar {
  display: none;
}

.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(17, 0, 27, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 10;
}
.landing-header-section {
  color: var(--purple);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}
.landing-launch-btn {
  font-size: var(--text-xs);
  padding: 6px 16px;
  text-decoration: none;
  background: var(--green);
  letter-spacing: var(--tracking-tight);
}
.landing-launch-btn:hover {
  background: var(--green-light);
}

.landing-main {
  position: relative;
  z-index: 1;
  padding-top: 52px;
}

.landing-section {
  padding: 64px 40px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}
.landing-section > * {
  width: 100%;
}

.landing-hero {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}
.landing-hero .login-title {
  width: auto;
}
.landing-hero-headline {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--white);
  text-align: center;
  margin-top: 16px;
}
.landing-hero-sub {
  font-size: var(--text-sm);
  color: var(--gray);
  text-align: center;
  line-height: 1.6;
}
.landing-cta {
  margin-top: 16px;
  text-decoration: none;
  font-size: var(--text-sm);
  padding: 12px 32px;
  width: auto;
}

.landing-section-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  text-align: center;
}
.landing-section-desc {
  font-size: var(--text-sm);
  text-align: center;
  line-height: 1.5;
}

/* Collection cards row — uses .col-card from app styles */
.landing-cards-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.landing-cards-row .col-card {
  flex: 1;
}

/* Study set screen — mirrors the real study set detail screen */
.landing-study-set-screen {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.landing-study-set-body {
  padding: 24px;
}
.landing-study-set-body .studyset-detail-knobs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.landing-study-set-body .studyset-detail-knob {
  flex: 1;
  background: var(--surface);
  border: 2px solid #333;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.landing-study-set-body .studyset-detail-knob-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet);
  margin-bottom: 0.5rem;
}
.landing-study-set-body .studyset-detail-knob-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.landing-study-set-body .studyset-detail-knob-value {
  font-size: var(--text-lg);
  color: var(--white);
}
.landing-study-set-body .studyset-detail-knob-suffix {
  font-size: var(--text-xs);
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.landing-study-set-body .linked-collection-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.landing-study-set-body .linked-collection-num {
  font-size: var(--text-base);
  color: var(--gray);
  min-width: 1.5rem;
  text-align: right;
}
.landing-study-set-body .linked-collection-name {
  flex: 1;
  font-size: var(--text-base);
  color: var(--white);
}

/* Flashcard — uses .session-card from app styles */
.landing-session-card {
  cursor: pointer;
}
.landing-buttons {
  visibility: hidden;
}
.landing-buttons.is-visible {
  visibility: visible;
}

/* Review stages — unified rows */
.landing-stages-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto !important;
  margin: 0 auto;
}
.landing-stage-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}
.landing-stage-row--done {
  height: 56px;
}
.landing-stage-left {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 100%;
}
.landing-stage-row .profile-stage-num {
  font-size: var(--text-base);
  color: var(--gray);
  min-width: 1.5rem;
  text-align: right;
}
.landing-stage-row .profile-stage-suffix {
  font-size: var(--text-base);
  color: var(--gray);
}
.landing-stage-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  z-index: 1;
}
.landing-stage-dot--done {
  background: var(--gray);
}
.landing-stage-line {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border);
}

/* Knobs row — uses .knob-input from app styles */
.landing-knobs-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.landing-knobs-explain {
  color: var(--gray);
  text-align: left;
}

/* Footer */
.landing-footer {
  padding-bottom: 80px;
  text-align: center;
}
.landing-footer > * {
  width: auto;
}

/* How It Works */
.landing-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}
.landing-step {
  text-align: center;
  max-width: 200px;
}
.landing-step-number {
  margin-bottom: 8px;
}
.landing-step h3 {
  margin: 0 0 8px;
}
.landing-step p {
  margin: 0;
  line-height: 1.5;
}
.landing-step-arrow {
  font-size: var(--text-xl);
  margin-top: 28px;
}

/* FAQ */
.landing-faq-list {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}
.landing-faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
}
.landing-faq-question {
  cursor: pointer;
  font-weight: var(--weight-semi);
  list-style: none;
}
.landing-faq-question::-webkit-details-marker {
  display: none;
}
.landing-faq-question::before {
  content: "+";
  margin-right: 12px;
  color: var(--violet);
  font-weight: var(--weight-bold);
}
details[open] > .landing-faq-question::before {
  content: "\2212";
}
.landing-faq-answer {
  margin: 12px 0 0 22px;
  line-height: 1.6;
}

/* Contact footer */
.landing-contact {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.3);
}
.landing-contact-link {
  color: var(--violet);
  text-decoration: none;
}
.landing-contact-link:hover {
  text-decoration: underline;
}

/* Tablet adjustments */
@media (max-width: 640px) {
  .landing-steps {
    flex-direction: column;
    align-items: center;
  }
  .landing-step-arrow {
    transform: rotate(90deg);
    margin-top: 0;
  }
  .landing-knobs-row {
    flex-direction: column;
  }
  .landing-study-set-body .studyset-detail-knobs {
    flex-direction: column;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .landing-cards-row {
    flex-direction: column;
    gap: 16px;
  }
  .landing-cards-row .col-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0 20px;
  }
  .landing-cards-row .col-card-number {
    margin-bottom: 0;
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .landing-cards-row .col-card-title {
    grid-column: 2;
    margin-bottom: 0;
    min-width: 0;
  }
  .landing-cards-row .col-card-desc {
    grid-column: 2;
    margin-bottom: 0;
    min-width: 0;
  }
  .landing-cards-row .col-card-footer {
    grid-column: 3;
    grid-row: 1 / span 3;
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    min-width: fit-content;
  }
  .landing-cards-row .col-card-footer svg {
    display: none;
  }
  .landing-hero-headline {
    font-size: var(--text-xl);
  }
}
