:root {
  --bg-primary: #0a0a0a;
  --bg-elevated: #000000;
  --text-primary: #ffffff;
  --text-muted: #9595a7;
  --text-inversed: #0a0a0a;
  --text-muted-inversed: #242424;
  --accent-cyan: #00d9ff;
  --accent-green-dark: #008d1f;
  --accent-green: #00ff9f;
  --border: #444444;
  --glow-cyan: rgba(0, 217, 255, 0.3);
  --glow-green: rgba(0, 255, 159, 0.3);
}

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

::selection {
  background-color: var(--accent-green-dark); /* Цвет фона при выделении */
  color: var(--text-inversed)
}

body {
  font-family: 'IBM Plex Mono', 'Consolas', 'Monaco', monospace;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
}



body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 60px 0 40px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--accent-cyan);
  animation: scanline 60s linear infinite;
}

@keyframes scanline {
  0%   { left: 0; }
  50%  { left: 100%; transform: translateX(-100%); }
  100% { left: 0; transform: translateX(0); }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

/* Error Toast Styles */
.error-toast {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-cyan);
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: 0 0 10px var(--accent-cyan);
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  max-width: 300px;
  display: none; /* Скрыт по умолчанию */
}

.error-toast.visible {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

.error-toast p {
  margin: 0;
  color: var(--text-muted); /* Акцент на текст ошибки */
}

h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--glow-cyan);
}

.prompt {
  color: var(--accent-green);
  font-size: 32px;
  margin-right: 8px;
}

.tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  padding: 4px 0;
}

nav a::before {
  content: 'v';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  color: var(--accent-green);
  transition: all 0.2s ease;
}


nav a:hover {
  color: var(--accent-green);
  text-shadow: 0 0 10px var(--glow-green);
}

nav a:hover::before {
  opacity: 1;
  top: -18px;
}

/* Main Content */
main {
  padding: 80px 0;
}

section {
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out; /* Плавность вместо @keyframes */
}

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

h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-block;
  position: relative;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
}

p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Accordion Common Styles (для обоих разделов) */
.accordion-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: 
    border-color 0.3s ease, 
    box-shadow 0.3s ease, 
    background-color 0.3s ease, 
    color 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--accent-green);
  box-shadow: 0 0 10px var(--glow-green);
  background-color: var(--accent-green-dark);
  color: var(--text-inversed);
}

.accordion-header {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-header::after {
  content: '▾';
  color: var(--text-muted);
  transition: transform 0.6s ease;
}

.accordion-item.active .accordion-header::after {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 0.5s ease,
    opacity 0.8s ease,
    transform 0.4s ease;
}

.accordion-item.active {
  background-color: var(--accent-green-dark);
  color: var(--text-inversed);
  box-shadow: 0 0 20px var(--glow-green);
  border-color: var(--accent-green);
}

.accordion-item.active .accordion-content {
  font-size: 18px;
  font-weight: bold;
  opacity: 1;
  transform: translateY(0);
  background-color: var(--accent-green-dark);
}

.accordion-content p {
  padding: 12px 24px 16px;
  font-size: 13px;
  color: var(--text-inversed);
  margin: 0;
}


/* Services */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
  max-width: 100%;
}

/* Solutions */
.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  max-width: 100%;
}


/* Links Section */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.link-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 20px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.link-card:hover {
  border-color: var(--accent-green-dark);
  background-color: var(--accent-green-dark);
  color: var(--text-inversed);
  padding-right: 48px;
  box-shadow: 0 0 20px var(--glow-cyan);
}

.link-icon {
  font-size: 24px;
  line-height: 1;
}

.link-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.link-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  transition: color 0.3s ease
}

.link-card:hover .link-content p {
  color: var(--text-inversed);
}

/* Contact Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
  max-width: 100%;
}

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

.form-group label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  resize: none; /* For textarea */
}

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

.form-group input {
  height: 40px;
}

.form-group textarea {
  height: 120px; /* Fixed height for textarea */
}

.submit-button {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: center;
}

.submit-button:hover {
  background: var(--accent-green-dark);
  border-color: var(--accent-green);
  color: var(--text-inversed);
  box-shadow: 0 0 10px var(--glow-green);
}

.submit-wrapper {
  position: relative;
  display: flex;
  align-self: center;
}

.loader {
  display: none;  /* По умолчанию скрыт */
  border: 4px solid var(--border);
  border-top: 4px solid var(--accent-green-dark);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-left: 16px;  /* Рядом с кнопкой, но можно адаптировать */
  margin-top: 8px;
  box-shadow: 0 0 10px var(--glow-green);
}

/* Success Message Styles */
#successMessage {
  display: none;
  color: var(--accent-green);
  font-size: 14px;
  font-weight: 600;
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-green);
  box-shadow: 0 0 10px var(--glow-green);
  align-items: center;
  gap: 12px;
}

#successMessage svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-green);
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 2px solid var(--border);
  margin-top: 80px;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--accent-cyan);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }

  .header-content {
    flex-direction: column;
  }

  nav ul {
    gap: 16px;
  }

  main {
    padding: 60px 0;
  }

  section {
    margin-bottom: 60px;
  }
}
