@import "tailwindcss";

@layer base {
  :root {
    color-scheme: dark;
    --lr-bg: #050507;
    --lr-bg-soft: #0b0b10;
    --lr-panel: #101018;
    --lr-panel-strong: #15131d;
    --lr-ink: #f2f7ff;
    --lr-muted: #9aa6ad;
    --lr-subtle: #69767f;
    --lr-line: rgba(98, 244, 255, 0.34);
    --lr-line-strong: rgba(98, 244, 255, 0.68);
    --lr-line-dim: rgba(242, 247, 255, 0.12);
    --lr-cyan: #62f4ff;
    --lr-pink: #ff4fd8;
    --lr-amber: #ffd166;
    --lr-green: #72ff9f;
    --lr-red: #ff5a7d;
    --lr-red-bg: rgba(255, 90, 125, 0.1);
    --lr-green-bg: rgba(114, 255, 159, 0.1);
  }

  html {
    min-height: 100%;
    background: var(--lr-bg);
  }

  body.lr-body {
    min-height: 100vh;
    background:
      linear-gradient(rgba(98, 244, 255, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 79, 216, 0.03) 1px, transparent 1px),
      repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 4px),
      radial-gradient(circle at 8% 0%, rgba(98, 244, 255, 0.2), transparent 26rem),
      radial-gradient(circle at 88% 8%, rgba(255, 79, 216, 0.14), transparent 24rem),
      linear-gradient(180deg, #050507 0%, #0b0710 48%, #06090b 100%);
    background-size: 64px 64px, 64px 64px, auto, auto, auto, auto;
    color: var(--lr-ink);
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0;
  }

  body.lr-body::selection,
  body.lr-body ::selection {
    background: rgba(98, 244, 255, 0.28);
    color: var(--lr-ink);
  }

  body.lr-body :where(a, button, input, textarea):focus-visible {
    outline: 2px solid var(--lr-cyan);
    outline-offset: 2px;
  }

  button,
  input[type="button"],
  input[type="reset"],
  input[type="submit"] {
    cursor: pointer;
  }

  button:disabled,
  input[type="button"]:disabled,
  input[type="reset"]:disabled,
  input[type="submit"]:disabled {
    cursor: not-allowed;
  }
}

@layer components {
  .lr-shell {
    isolation: isolate;
    min-height: 100vh;
    position: relative;
  }

  .lr-shell::before,
  .lr-auth-shell::before {
    background:
      linear-gradient(90deg, transparent 0, rgba(98, 244, 255, 0.11) 50%, transparent 100%),
      linear-gradient(180deg, transparent 0, rgba(255, 79, 216, 0.08) 50%, transparent 100%);
    content: "";
    inset: 0;
    opacity: 0.22;
    pointer-events: none;
    position: fixed;
    z-index: 0;
  }

  .lr-shell > *,
  .lr-auth-shell > * {
    position: relative;
    z-index: 1;
  }

  .lr-mobile-header {
    background: rgba(8, 8, 12, 0.98);
    border-bottom: 1px solid var(--lr-line);
    box-shadow: inset 0 -1px 0 rgba(255, 79, 216, 0.28);
    padding: 0.875rem 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .lr-mobile-stack,
  .lr-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .lr-mobile-topline,
  .lr-panel-row,
  .lr-page-head,
  .lr-section-head,
  .lr-item-head,
  .lr-action-row {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
  }

  .lr-mobile-topline {
    align-items: center;
  }

  .lr-mobile-nav {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lr-sidebar {
    background:
      linear-gradient(180deg, rgba(255, 79, 216, 0.08), transparent 16rem),
      linear-gradient(180deg, #09090d, #07070a);
    border-right: 1px solid var(--lr-line);
    box-shadow: inset -1px 0 0 rgba(255, 79, 216, 0.22);
    display: none;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    width: 15rem;
  }

  .lr-sidebar-brand,
  .lr-sidebar-footer {
    padding: 1rem;
  }

  .lr-sidebar-brand {
    border-bottom: 1px solid var(--lr-line-dim);
  }

  .lr-sidebar-footer {
    border-top: 1px solid var(--lr-line-dim);
  }

  .lr-sidebar .lr-nav {
    flex: 1;
    padding: 1rem 0.75rem;
  }

  .lr-brand {
    align-items: center;
    color: var(--lr-ink);
    display: inline-flex;
    font-size: 0.875rem;
    font-weight: 800;
    gap: 0.625rem;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
  }

  .lr-brand--large {
    font-size: 1rem;
  }

  .lr-brand-mark {
    align-items: center;
    background:
      linear-gradient(135deg, rgba(98, 244, 255, 0.22), transparent 54%),
      #08080c;
    border: 1px solid var(--lr-line-strong);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.07),
      0 0 18px rgba(98, 244, 255, 0.14);
    color: var(--lr-cyan);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    position: relative;
    width: 2rem;
  }

  .lr-brand-mark::after {
    background: var(--lr-pink);
    bottom: -1px;
    content: "";
    height: 1px;
    position: absolute;
    right: 4px;
    width: 12px;
  }

  .lr-user-email,
  .lr-meta,
  .lr-page-subtitle,
  .lr-time,
  .lr-empty {
    color: var(--lr-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
  }

  .lr-user-email {
    overflow-wrap: break-word;
    padding: 0 0.75rem;
  }

  .lr-main {
    padding: 1.5rem 1rem;
    width: 100%;
  }

  .lr-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 0 auto;
    max-width: 64rem;
  }

  .lr-screen,
  .lr-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .lr-blocklist-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .lr-blocklist-body > .lr-list,
  .lr-blocklist-body > .lr-empty {
    margin-top: 0;
  }

  .lr-blocklist-heading .lr-page-subtitle {
    margin-top: 0.375rem;
  }

  .lr-blocklist-url {
    overflow-wrap: anywhere;
  }

  .lr-page-title {
    color: var(--lr-ink);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .lr-section-title,
  .lr-item-title,
  .lr-stat-label,
  .lr-field-label {
    color: var(--lr-ink);
    font-size: 0.875rem;
    font-weight: 800;
    line-height: 1.35;
  }

  .lr-panel,
  .lr-auth-card {
    background:
      linear-gradient(180deg, rgba(98, 244, 255, 0.045), transparent 9rem),
      linear-gradient(135deg, rgba(255, 79, 216, 0.055), transparent 34%),
      var(--lr-panel);
    border: 1px solid var(--lr-line);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.045),
      inset 0 -1px 0 rgba(255, 79, 216, 0.18),
      0 0 0 1px rgba(5, 5, 7, 0.9),
      0 18px 44px rgba(0, 0, 0, 0.24);
    padding: 1.25rem;
    position: relative;
  }

  .lr-panel::before,
  .lr-auth-card::before {
    background: linear-gradient(90deg, var(--lr-cyan), var(--lr-pink), var(--lr-amber));
    content: "";
    height: 1px;
    left: 0;
    opacity: 0.75;
    position: absolute;
    right: 0;
    top: 0;
  }

  .lr-panel-row {
    align-items: flex-start;
  }

  .lr-grid,
  .lr-stat-grid,
  .lr-field-grid {
    display: grid;
    gap: 1rem;
  }

  .lr-stat {
    border-top: 1px solid var(--lr-line-dim);
    padding-top: 0.75rem;
  }

  .lr-section-title + .lr-stat-grid,
  .lr-section-title + .lr-list {
    margin-top: 1rem;
  }

  .lr-stat-value {
    color: var(--lr-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-top: 0.25rem;
    overflow-wrap: break-word;
  }

  .lr-link {
    color: var(--lr-cyan);
    font-weight: 800;
    text-decoration: none;
  }

  .lr-link:hover {
    color: var(--lr-amber);
  }

  .lr-nav-link,
  .lr-button {
    align-items: center;
    border: 1px solid var(--lr-line-dim);
    color: var(--lr-ink);
    display: inline-flex;
    font-size: 0.8125rem;
    font-weight: 800;
    gap: 0.5rem;
    justify-content: center;
    min-height: 2.375rem;
    padding: 0.625rem 0.75rem;
    text-decoration: none;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  }

  .lr-nav-link {
    justify-content: flex-start;
  }

  .lr-nav-link:hover,
  .lr-button:hover {
    border-color: var(--lr-line-strong);
    color: var(--lr-cyan);
  }

  .lr-nav-link.is-active {
    background:
      linear-gradient(90deg, rgba(98, 244, 255, 0.2), transparent),
      rgba(98, 244, 255, 0.06);
    border-color: var(--lr-line-strong);
    box-shadow: inset 3px 0 0 var(--lr-pink);
    color: var(--lr-ink);
  }

  .lr-button {
    background: rgba(242, 247, 255, 0.04);
    white-space: nowrap;
  }

  .lr-button--primary {
    background:
      linear-gradient(180deg, rgba(98, 244, 255, 0.2), rgba(98, 244, 255, 0.08)),
      #071216;
    border-color: var(--lr-line-strong);
    color: var(--lr-ink);
  }

  .lr-button--secondary {
    background: rgba(242, 247, 255, 0.035);
    color: var(--lr-muted);
  }

  .lr-button--danger {
    background: var(--lr-red-bg);
    border-color: rgba(255, 90, 125, 0.45);
    color: #ffd7df;
  }

  .lr-inline-form,
  .lr-sidebar-footer .button_to,
  .lr-mobile-topline .button_to,
  .lr-panel-row .button_to {
    display: inline-flex;
  }

  .lr-sidebar-footer .button_to {
    display: block;
    width: 100%;
  }

  .lr-sidebar-footer .lr-button {
    justify-content: flex-start;
    margin-top: 0.75rem;
    width: 100%;
  }

  .lr-action-row {
    justify-content: flex-start;
  }

  .lr-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
  }

  .lr-input,
  .lr-textarea {
    background: #08090d;
    border: 1px solid var(--lr-line-dim);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
    color: var(--lr-ink);
    display: block;
    font-size: 1rem;
    outline: none;
    padding: 0.625rem 0.75rem;
    width: 100%;
  }

  .lr-input:focus,
  .lr-textarea:focus {
    border-color: var(--lr-cyan);
  }

  .lr-textarea {
    min-height: 12rem;
    resize: vertical;
  }

  .lr-list {
    background: rgba(8, 9, 13, 0.7);
    border: 1px solid var(--lr-line-dim);
    margin-top: 1rem;
  }

  .lr-list-item {
    color: var(--lr-ink);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.875rem;
  }

  .lr-list-item + .lr-list-item {
    border-top: 1px solid var(--lr-line-dim);
  }

  .lr-copy {
    color: var(--lr-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    white-space: pre-wrap;
  }

  .lr-code-block {
    background: rgba(242, 247, 255, 0.045);
    border: 1px solid var(--lr-line-dim);
    color: var(--lr-ink);
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    padding: 0.625rem 0.75rem;
    white-space: pre-wrap;
  }

  .lr-code-block--error,
  .lr-flash--error {
    background: var(--lr-red-bg);
    border-color: rgba(255, 90, 125, 0.48);
    color: #ffd7df;
  }

  .lr-flash {
    border: 1px solid var(--lr-line-dim);
    font-size: 0.8125rem;
    line-height: 1.45;
    padding: 0.625rem 0.75rem;
  }

  .lr-flash--success {
    background: var(--lr-green-bg);
    border-color: rgba(114, 255, 159, 0.42);
    color: #d8ffe5;
  }

  .lr-external-link {
    align-items: center;
    border: 1px solid var(--lr-line-dim);
    color: var(--lr-cyan);
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    width: 2rem;
  }

  .lr-external-link:hover {
    border-color: var(--lr-line-strong);
    color: var(--lr-amber);
  }

  .lr-icon {
    height: 1rem;
    width: 1rem;
  }

  .lr-auth-shell {
    align-items: center;
    display: flex;
    isolation: isolate;
    justify-content: center;
    min-height: 100vh;
    padding: 3rem 1.5rem;
    position: relative;
  }

  .lr-auth-card {
    max-width: 26rem;
    width: 100%;
  }

  .lr-auth-header {
    border-bottom: 1px solid var(--lr-line-dim);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .lr-auth-header .lr-page-subtitle {
    margin-top: 0.75rem;
  }

  .lr-auth-card .lr-flash {
    margin-bottom: 1rem;
  }

  .lr-auth-card .lr-button {
    width: 100%;
  }

  .lr-empty {
    margin-top: 1rem;
  }

  .lr-audio-player {
    bottom: 1rem;
    position: fixed;
    right: 1rem;
    z-index: 30;
  }

  .lr-audio-toggle {
    align-items: center;
    background: rgba(8, 9, 13, 0.92);
    border: 1px solid var(--lr-line-dim);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.045),
      0 10px 28px rgba(0, 0, 0, 0.26);
    color: var(--lr-muted);
    display: inline-flex;
    font-size: 0.8125rem;
    font-weight: 800;
    gap: 0.625rem;
    min-height: 2.375rem;
    padding: 0.625rem 0.75rem;
  }

  .lr-audio-toggle:hover,
  .lr-audio-toggle.is-active {
    border-color: var(--lr-line-strong);
    color: var(--lr-cyan);
  }

  .lr-audio-bars {
    align-items: end;
    display: inline-flex;
    gap: 2px;
    height: 0.875rem;
  }

  .lr-audio-bars span {
    background: currentColor;
    display: block;
    width: 3px;
  }

  .lr-audio-bars span:nth-child(1) {
    height: 0.375rem;
  }

  .lr-audio-bars span:nth-child(2) {
    height: 0.75rem;
  }

  .lr-audio-bars span:nth-child(3) {
    height: 0.5625rem;
  }

  @media (min-width: 40rem) {
    .lr-grid--2,
    .lr-stat-grid--2,
    .lr-field-grid--2 {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lr-stat-grid--4 {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @media (min-width: 48rem) {
    .lr-shell {
      display: flex;
    }

    .lr-mobile-header {
      display: none;
    }

    .lr-sidebar {
      display: flex;
    }
  }

  @media (min-width: 64rem) {
    .lr-main {
      padding: 2rem;
    }
  }

  @media (max-width: 39.999rem) {
    .lr-audio-player {
      bottom: 0.75rem;
      right: 0.75rem;
    }

    .lr-page-head,
    .lr-panel-row,
    .lr-section-head,
    .lr-item-head,
    .lr-action-row {
      flex-direction: column;
    }

    .lr-page-head > .lr-button,
    .lr-action-row .lr-button,
    .lr-panel-row .lr-action-row,
    .lr-panel-row .lr-button,
    .lr-panel-row .lr-inline-form,
    .lr-panel-row .lr-inline-form .lr-button,
    .lr-panel-row .button_to,
    .lr-panel-row .button_to .lr-button {
      width: 100%;
    }
  }
}
