/* ============================================
   Site Monitor Landing — 4adm.in Design System
   ============================================ */

/* --- Color Schemes (from 4adm.in theme) --- */

:root {
  --bg-body: #0c0e14;
  --bg-primary: #12151e;
  --bg-secondary: #181c28;
  --bg-card: #1e2233;
  --bg-hover: #252a3a;
  --bg-input: #0f1119;
  --text-primary: #c8d3da;
  --text-secondary: #8b95a5;
  --text-muted: #505868;
  --accent: #5af5c0;
  --accent-dim: #3bc89a;
  --accent-glow: rgba(90, 245, 192, 0.15);
  --accent-glow-strong: rgba(90, 245, 192, 0.3);
  --highlight: #7ee8fa;
  --border: #262c3a;
  --border-hover: #363e52;
  --tag-bg: rgba(90, 245, 192, 0.08);
  --tag-text: #5af5c0;
  --danger: #f47067;
  --warning: #e8b44a;
  --radius: 8px;
  --radius-sm: 4px;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', 'Consolas', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

[data-theme="amber"] {
  --bg-body: #110e08;
  --bg-primary: #181310;
  --bg-secondary: #201a14;
  --bg-card: #28211a;
  --bg-hover: #332a20;
  --bg-input: #120f09;
  --text-primary: #ddd0c0;
  --text-secondary: #a09080;
  --text-muted: #685848;
  --accent: #f0b866;
  --accent-dim: #d49a48;
  --accent-glow: rgba(240, 184, 102, 0.12);
  --accent-glow-strong: rgba(240, 184, 102, 0.25);
  --highlight: #f5d094;
  --border: #2e261c;
  --border-hover: #443828;
  --tag-bg: rgba(240, 184, 102, 0.08);
  --tag-text: #f0b866;
  --danger: #e07060;
  --warning: #f0b866;
}

[data-theme="blue"] {
  --bg-body: #080c14;
  --bg-primary: #0e1320;
  --bg-secondary: #141a2c;
  --bg-card: #1a2238;
  --bg-hover: #202a44;
  --bg-input: #0a0e18;
  --text-primary: #c4d0e0;
  --text-secondary: #7888a0;
  --text-muted: #485068;
  --accent: #64b5f6;
  --accent-dim: #4a96d4;
  --accent-glow: rgba(100, 181, 246, 0.12);
  --accent-glow-strong: rgba(100, 181, 246, 0.25);
  --highlight: #90caf9;
  --border: #1e2840;
  --border-hover: #2e3a58;
  --tag-bg: rgba(100, 181, 246, 0.08);
  --tag-text: #64b5f6;
  --danger: #ef5350;
  --warning: #ffb74d;
}

/* --- Reset & Base --- */

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.7;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--highlight);
}

::selection {
  background: var(--accent-glow-strong);
  color: var(--text-primary);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Header --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: rgba(18, 21, 30, 0.85);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-branding {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

.prompt-user {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.prompt-separator {
  color: var(--text-muted);
  font-weight: 400;
}

.prompt-path {
  color: var(--highlight);
  font-weight: 500;
  font-size: 0.95rem;
}

.prompt-cursor {
  display: inline-block;
  width: 8px;
  height: 17px;
  background: var(--accent);
  border-radius: 1px;
  margin-left: 4px;
  vertical-align: text-bottom;
  opacity: 0.9;
  animation: cursor-blink 1.2s ease-in-out infinite;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.main-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.header-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.theme-switcher {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.theme-switcher button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all var(--transition);
}

.theme-switcher button:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.theme-switcher button.active {
  color: var(--accent);
  background: var(--accent-glow);
}

/* --- Hero Section --- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 80px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 0.4rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-glow-strong);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero h1 .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-family: var(--font-sans);
}

.hero-subtitle strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-body);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--highlight);
  border-color: var(--highlight);
  color: var(--bg-body);
  box-shadow: 0 0 24px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* --- Terminal Demo --- */

.terminal-demo {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #f47067; }
.terminal-dot.yellow { background: #e8b44a; }
.terminal-dot.green { background: #5af5c0; }

.terminal-title {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: auto;
}

.terminal-body {
  padding: 1.2rem 1.4rem;
  font-size: 0.88rem;
  line-height: 1.8;
}

.terminal-line {
  white-space: nowrap;
}

.t-prompt { color: var(--accent); font-weight: 600; }
.t-cmd { color: var(--text-primary); margin-left: 0.5rem; }
.t-arg { color: var(--highlight); margin-left: 0.3rem; }
.t-output { color: var(--text-secondary); }
.t-ok { color: var(--accent); font-weight: 600; }
.t-info { color: var(--highlight); }
.t-accent { color: var(--accent); }
.t-muted { color: var(--text-muted); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  border-radius: 1px;
  vertical-align: text-bottom;
  margin-left: 0.5rem;
  animation: cursor-blink 1.2s ease-in-out infinite;
}

/* --- Sections --- */

.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-primary);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: var(--font-sans);
}

/* --- Features Grid --- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  font-family: var(--font-sans);
  margin-bottom: 1.5rem;
}

.feature-terminal {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Steps --- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  font-family: var(--font-sans);
  margin-bottom: 1rem;
}

.step-terminal {
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* --- Pricing --- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: all var(--transition);
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.pricing-card.featured {
  border-color: var(--accent-dim);
  box-shadow: 0 0 40px var(--accent-glow);
}

.pricing-card.featured:hover {
  box-shadow: 0 0 50px var(--accent-glow-strong);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg-body);
  padding: 0.25rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
}

.price-amount {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.price-currency {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li.disabled {
  color: var(--text-muted);
}

/* --- Subscribe Form --- */

.subscribe-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.subscribe-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23505868' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Checkbox */

.checkbox-group {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.4rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '✓';
  color: var(--bg-body);
  font-size: 0.7rem;
  font-weight: 700;
}

.telegram-field {
  margin-bottom: 1.5rem;
}

.form-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 1rem;
}

/* --- Footer --- */

.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  margin-top: 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.9rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* --- Animations --- */

@keyframes cursor-blink {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow-strong); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typeIn {
  from { width: 0; }
  to { width: 100%; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Terminal typing animation */
.terminal-body .terminal-line {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.terminal-body .terminal-line:nth-child(1) { animation-delay: 0.3s; }
.terminal-body .terminal-line:nth-child(2) { animation-delay: 0.8s; }
.terminal-body .terminal-line:nth-child(3) { animation-delay: 1.2s; }
.terminal-body .terminal-line:nth-child(4) { animation-delay: 1.6s; }
.terminal-body .terminal-line:nth-child(5) { animation-delay: 2.0s; }
.terminal-body .terminal-line:nth-child(6) { animation-delay: 2.4s; }

/* --- Scrollbar --- */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Responsive --- */

@media (max-width: 900px) {
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }

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

  .step {
    gap: 1.2rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .site-header {
    height: auto;
    padding: 0.6rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }

  .hero {
    padding: 100px 1.5rem 60px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .terminal-demo {
    max-width: 100%;
  }

  .terminal-body {
    font-size: 0.78rem;
    overflow-x: auto;
  }

  .section {
    padding: 4rem 0;
  }

  .container {
    padding: 0 1.2rem;
  }

  .subscribe-card {
    padding: 1.5rem;
  }

  .pricing-card.featured {
    order: -1;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .prompt-path {
    display: none;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .step {
    flex-direction: column;
    gap: 0.8rem;
  }

  .step-number {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
}
