:root {
  --blue: #007bff;
  --cyan: #00c6ff;
  --text: #343a40;
  --muted: #6c757d;
  --surface: #ffffff;
  --page: #f8f9fa;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 12px 35px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-width: 320px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--page);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(173, 216, 230, 0.6);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.nav-content {
  width: min(1200px, 100%);
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 1.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-shell {
  position: relative;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0;
  background: #ffffff;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: none;
}

.logo-shell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.logo-shell img[src=""],
.logo-shell img.is-hidden {
  display: none;
}

.logo-fallback {
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.nav-btn {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.download-btn {
  background: #28a745;
  color: #ffffff;
}

.download-btn:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.register-btn {
  background: #ffc107;
  color: #343a40;
}

.register-btn:hover {
  background: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-section {
  position: relative;
  min-height: 40vh;
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--blue) 10%, var(--cyan) 90%, rgba(255, 255, 255, 0) 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.15;
  background-image: radial-gradient(circle at 25px 25px, rgba(255,255,255,0.8) 0 5px, transparent 6px),
    radial-gradient(circle at 75px 75px, rgba(255,255,255,0.8) 0 5px, transparent 6px);
  background-size: 200px 200px;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content h1 {
  margin: 0.67em 0 20px;
  max-width: 100%;
  font-size: 4.5em;
  line-height: 1.6;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  overflow-wrap: anywhere;
}

.hero-content p {
  margin: 1em 0 30px;
  font-size: 1.5em;
  opacity: 0.92;
  overflow-wrap: anywhere;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.1em;
  font-weight: 700;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.hero-button:hover,
.hero-button:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.section {
  position: relative;
  padding: 80px 0;
  text-align: center;
  overflow: hidden;
}

.section-title {
  margin: 0.83em 0 15px;
  color: var(--text);
  font-size: 3em;
  line-height: 1.6;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.section-subtitle {
  width: min(800px, 100%);
  max-width: 800px;
  margin: 1em auto 60px;
  color: var(--muted);
  font-size: 1.2em;
  overflow-wrap: anywhere;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-item {
  min-height: 232px;
  padding: 40px 30px;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.feature-item h3 {
  margin: 1em 0 15px;
  color: var(--blue);
  font-size: 1.8em;
}

.feature-item p {
  margin: 1em 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.about-section {
  background: #f8f9fa;
}

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

.about-text {
  width: min(900px, 100%);
  text-align: left;
}

.about-text p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.footer {
  padding: 50px 0;
  background: #343a40;
  color: #adb5bd;
  text-align: center;
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  background: rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.show {
  visibility: visible;
  opacity: 1;
}

.modal-content {
  width: min(410px, 100%);
  padding: 30px;
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

.modal-content h3 {
  margin: 0 0 20px;
  color: var(--blue);
  font-size: 1.8rem;
}

.modal-content p {
  margin: 0 0 25px;
  color: #555555;
  font-size: 1.05rem;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-content button {
  min-width: 82px;
  min-height: 48px;
  border: 0;
  border-radius: 5px;
  padding: 12px 25px;
  background: var(--blue);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-content button:hover {
  background: #0056b3;
}

.modal-content .cancel-btn {
  background: #6c757d;
}

.modal-content .cancel-btn:hover {
  background: #5a6268;
}

@media (max-width: 560px) {
  .site-header {
    height: auto;
    min-height: 70px;
  }

  .nav-content {
    padding: 10px 20px;
  }

  .brand {
    font-size: 1.45rem;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-btn {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.92rem;
  }

  .hero-section {
    padding: 40px 0;
    min-height: 40vh;
  }

  .hero-content h1 {
    font-size: 2.5em;
  }

  .hero-content p {
    width: min(800px, 100%);
    font-size: 1em;
    line-height: 1.6;
    word-break: normal;
  }

  .hero-button {
    padding: 12px 25px;
    font-size: 1em;
  }

  .section-title {
    font-size: 2.2em;
  }

  .section-subtitle {
    width: min(800px, 100%);
    margin-bottom: 40px;
    font-size: 1em;
    line-height: 1.6;
    word-break: normal;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .feature-item {
    min-height: 0;
    padding: 20px 15px;
  }
}
