/* ===== ANGRY3234 - Red Brutalist Redesign ===== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #f1f1f1;
  --surface: #ffffff;
  --surface-2: #f8f8f8;
  --text: #111111;
  --text-muted: #4b4b4b;

  --red: #cc1111;
  --red-strong: #a40000;
  --red-soft: #ffe5e5;

  --ok: #0b8f4e;
  --ok-bg: #dcf8ea;

  --err: #8c0000;
  --err-bg: #ffe1e1;

  --warn: #a45a00;
  --warn-bg: #fff1dd;
  --warn-text: #4f3313;

  --placeholder: #7d7d7d;
  --input-focus-bg: #ffffff;

  --line: #121212;
  --line-soft: #2b2b2b;

  --radius: 0px;
  --shadow: 8px 8px 0 #111111;
  --shadow-soft: 4px 4px 0 #111111;

  --transition: 170ms ease;
}

html.dark {
  --bg: #0f0f0f;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --text: #f5f5f5;
  --text-muted: #b8b8b8;

  --red: #ff3030;
  --red-strong: #d60000;
  --red-soft: #330909;

  --ok: #61d39b;
  --ok-bg: #123224;

  --err: #ff8a8a;
  --err-bg: #3a1111;

  --warn: #ffb45e;
  --warn-bg: #3e2a10;
  --warn-text: #ffd8a5;

  --placeholder: #9a9a9a;
  --input-focus-bg: #242424;

  --line: #f3f3f3;
  --line-soft: #d2d2d2;

  --shadow: 8px 8px 0 #000000;
  --shadow-soft: 4px 4px 0 #000000;
}

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

html {
  font-size: 16px;
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

html.dark {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo', sans-serif;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

.header,
.main,
.footer,
.modal-overlay {
  position: relative;
}

.header {
  border-bottom: 3px solid var(--line);
  background: var(--red);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo:hover {
  opacity: 0.9;
}

.logo-badge {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--red);
  background: #ffffff;
  border: 2px solid #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius);
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: #ffd0d0;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid transparent;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.nav-link:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.nav-link.active {
  color: var(--red);
  background: #ffffff;
  border-color: #ffffff;
}

.nav-link.active::after {
  content: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #ffffff;
  border-radius: var(--radius);
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.icon-btn:hover {
  background: #ffffff;
  color: var(--red);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.lang-btn {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 14px 46px;
}

.page-title {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--red);
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  max-width: 62ch;
}

.stepper {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 3px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
}

.step-indicator {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.step-indicator.active,
.step-indicator.completed {
  background: var(--red);
  border-color: var(--line);
  color: #ffffff;
}

.step-indicator.completed::after {
  content: '✓';
  font-size: 0.9rem;
}

.step-indicator.completed span {
  display: none;
}

.step-line {
  flex: 1;
  height: 3px;
  margin: 0 8px;
  background: var(--line-soft);
}

.step-line.completed {
  background: var(--red);
}

.card {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: clamp(14px, 2.4vw, 24px);
  box-shadow: var(--shadow);
}

.card-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--line-soft);
}

.card-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.card-section.disabled {
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.section-title {
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
  color: var(--red);
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-link {
  text-decoration: none;
  border: 2px solid var(--red);
  background: var(--red-soft);
  color: var(--red-strong);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 5px 8px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background var(--transition), color var(--transition);
}

.section-link:hover {
  background: var(--red);
  color: #ffffff;
}

.section-link svg {
  width: 12px;
  height: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.input,
.textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  color: var(--text);
  background: var(--surface-2);
  font-family: 'IBM Plex Mono', monospace;
  transition: border-color var(--transition), background var(--transition);
}

.input {
  min-height: 46px;
  padding: 11px 12px;
  font-size: 0.84rem;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  padding: 11px 12px;
  font-size: 0.82rem;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--placeholder);
}

.input:focus,
.textarea:focus {
  border-color: var(--red);
  background: var(--input-focus-bg);
}

@supports (-webkit-touch-callout: none) {
  .input,
  .textarea {
    font-size: 16px;
  }
}

.btn {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 2px 2px 0 #111111;
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.btn-primary {
  background: var(--red);
  color: #ffffff;
  min-height: 46px;
  padding: 11px 15px;
  font-size: 0.8rem;
}

.btn-sm {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 0.76rem;
}

.btn-ghost {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 0.78rem;
  background: var(--surface-2);
}

.btn-activate {
  width: 100%;
  min-height: 56px;
  padding: 12px;
  font-size: 1rem;
  background: var(--red);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-activate:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-activate:disabled:hover {
  transform: none;
}

.btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.status-msg {
  margin-top: 9px;
  padding: 9px 11px;
  display: none;
  align-items: center;
  gap: 7px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
}

.status-msg.show {
  display: flex;
}

.status-msg.success {
  border-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}

.status-msg.error {
  border-color: var(--err);
  background: var(--err-bg);
  color: var(--err);
}

.status-msg svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.warning-note {
  margin-top: 16px;
  border: 3px solid var(--warn);
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 12px 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
}

.warning-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.footer {
  margin-top: auto;
  border-top: 3px solid var(--line);
  background: var(--red-strong);
  color: #ffffff;
  padding: 28px 14px 24px;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.98rem;
  font-weight: 800;
}

.footer-slogan,
.footer-copy,
.footer-devix,
.footer-link {
  color: #ffd0d0;
}

.footer-slogan {
  font-size: 0.82rem;
}

.footer-copy {
  font-size: 0.74rem;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  text-decoration: none;
  font-size: 0.76rem;
}

.footer-link:hover,
.footer-devix-link:hover {
  color: #ffffff;
}

.footer-devix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
}

.footer-devix-link {
  color: inherit;
  text-decoration: none;
}

.footer-devix-word {
  font-weight: 700;
}

.footer-devix-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.footer-devix-logo-link {
  display: inline-flex;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

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

.modal-dialog {
  width: min(430px, 100%);
  border: 3px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
}

.modal-title {
  color: var(--red);
  text-transform: uppercase;
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.modal-text {
  color: var(--text-muted);
  font-size: 0.87rem;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 900px) {
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .nav {
    display: none;
  }

  .header-inner {
    height: 58px;
    padding: 0 12px;
  }

  .main {
    padding: 18px 10px 34px;
  }

  .page-title {
    font-size: 1.65rem;
  }

  .stepper {
    padding: 8px;
  }

  .step-indicator {
    width: 30px;
    height: 30px;
    font-size: 0.74rem;
  }

  .card {
    padding: 12px;
  }

  .card-section {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-sm {
    width: 100%;
  }

  .section-link {
    width: 100%;
    justify-content: center;
  }

  .warning-note {
    font-size: 0.78rem;
  }
}

@media (max-width: 430px) {
  .logo {
    font-size: 0.9rem;
  }

  .logo-badge {
    font-size: 0.56rem;
    padding: 2px 6px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .page-subtitle {
    font-size: 0.84rem;
  }

  .section-title {
    font-size: 0.95rem;
  }

  .status-msg {
    font-size: 0.77rem;
  }
}
