@import "snippets/bigblue.css";

* {
  margin: 0;
  padding: 0;

  font-family: "BigBlue Terminal";

  --foreground: #f0f0f0;
  --dark-gray: #d0d0d0;
  --gray: #a0a0a0;
  --light-gray: #e0e0e0;
  --green: #9fe870;

  --surface: #181818;
  --surface-2: #1e1e1e;
  --surface-hover: #242424;
  --border: #2a2a2a;

  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-focus: 0 0 0 2px rgba(240, 240, 240, 0.12);
  --shadow-glow: 0 0 20px rgba(240, 240, 240, 0.06);

  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --glass-bg: rgba(24, 24, 24, 0.6);
  --glass-border: rgba(255, 255, 255, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--foreground);
  background: #0f0f0f;

  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  &::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
  }
}

main {
  min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
}

button,
input,
textarea,
select,
.button {
  display: block;
  width: 100%;
  background: var(--surface);
  color: var(--foreground);
  border: 1px solid var(--border);

  padding: 0.85rem 1rem;
  border-radius: var(--radius);

  transition:
    background var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-smooth),
    transform var(--transition-fast);
}

input,
textarea,
select {
  background: var(--surface-2);
  border-color: var(--border);

  &:hover {
    border-color: rgba(255, 255, 255, 0.12);
  }
}

button,
.button {
  cursor: pointer;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  background: var(--foreground);
  color: #0f0f0f;
  border-color: transparent;
  position: relative;
  overflow: hidden;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
  }

  &:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-1px);

    &::after {
      opacity: 1;
    }
  }

  &:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
  }
}

.input-subtle,
button.subtle {
  background: var(--surface);
  color: var(--foreground);
  border-color: var(--border);
  text-transform: none;
  font-weight: normal;
  font-size: 1rem;

  &::after {
    display: none;
  }

  &:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-sm);
  }
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--surface-hover);
  box-shadow: var(--shadow-focus), 0 0 24px rgba(240, 240, 240, 0.04);
}

input::placeholder,
textarea::placeholder {
  opacity: 0.35;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}

a {
  color: var(--foreground);
  transition:
    opacity var(--transition-fast),
    color var(--transition-base);
}

a:hover {
  opacity: 0.8;
}

.no-underline {
  text-decoration: none;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 100%;
  width: 100%;
}

.x-center {
  display: flex;
  justify-content: center;
}

ul {
  list-style-type: none;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 1.5rem 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--surface);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  flex-shrink: 0;
}

.dot-green {
  background: var(--green);
}

.dot-yellow {
  background: #d6b50a;
}

.dot-red {
  background: #d64545;
}

.admin-node-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

button.danger {
  background: #d64545;
  border-color: #d64545;
  color: #fff;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--glass-border);
}
