:root {
  --page-background: url('../images/backgrounds/1.jpg');
  --page-background-position: center;
  --bg-ink: #0b0d10;
  --text: #101318;
  --muted: rgba(16, 19, 24, 0.68);
  --line: rgba(16, 19, 24, 0.18);
  --panel: rgba(255, 255, 255, 0.07);
  --accent: #f7f8fb;
  --accent-ink: #101318;
  --success: #101318;
  --warning: #101318;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    var(--page-background) var(--page-background-position) / cover fixed
      no-repeat,
    var(--bg-ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: transparent;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}

.brand-strip {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(16, 19, 24, 0.78);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.25rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 126px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.status-pill.is-online {
  border-color: rgba(255, 255, 255, 0.46);
  color: var(--success);
}

.status-pill.is-offline {
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--warning);
}

.workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.glass-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 60px;
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.icon-badge {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 208px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.25);
  text-align: center;
  flex-grow: 1;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-title {
  display: block;
  width: 100%;
  font-size: 1.85rem;
  font-weight: 800;
}

.drop-meta {
  display: block;
  width: 100%;
  color: var(--muted);
}

.primary-action,
.icon-button {
  min-height: 48px;
  border: 0;
  color: var(--accent-ink);
  font-weight: 800;
}

.primary-action {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.primary-action:disabled,
.icon-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.code-panel {
  margin-top: 18px;
}

.field-label,
.code-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.code-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(16, 19, 24, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(16, 19, 24, 0.45);
}

input {
  min-height: 48px;
  padding: 0 16px;
}

textarea {
  min-height: 152px;
  margin-bottom: 16px;
  padding: 14px 16px;
  resize: vertical;
}

#shareCode {
  min-height: 118px;
  margin-bottom: 0;
  white-space: pre-wrap;
}

#downloadCode {
  flex-grow: 1;
}

input:focus,
textarea:focus {
  border-color: rgba(247, 248, 251, 0.78);
  box-shadow: 0 0 0 4px rgba(247, 248, 251, 0.1);
}

.icon-button {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: #f7f8fb;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid rgba(16, 19, 24, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 24px, 620px);
    padding: 24px 0;
  }

  .brand-strip,
  .workspace {
    display: grid;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.1rem, 14vw, 4rem);
  }

  .glass-card {
    padding: 18px;
    border-radius: 38px;
  }

  .drop-zone {
    min-height: 178px;
    border-radius: 26px;
  }

  .drop-title {
    font-size: 1.45rem;
  }
}
