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

body {
  margin: 0;
  padding: 20px 0; 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #0b0f19;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#constellation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.container {
  position: relative;
  z-index: 1;
  background: rgba(18, 23, 40, 0.85);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  width: 90%;
  max-width: 600px;
  margin: 0 15px;
}

h1, h2 {
  margin-top: 0; /* Убрал отступ сверху у заголовков */
  margin-bottom: 25px;
  font-weight: 500;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 2rem; }


/* Стили для нового текстового блока */
.intro-text {
  text-align: left;
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 20px;
}
.intro-text p {
  margin: 0 0 10px 0;
}
.intro-text p:last-child {
  margin-bottom: 0;
}

input, select {
  padding: 12px;
  margin: 10px 0;
  width: 100%;
  font-size: 16px;
  border: 1px solid #444;
  border-radius: 5px;
  background-color: #1c2333;
  color: #f0f0f0;
}
/* Стиль для подсказки под полем ввода */
.input-hint {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 5px;
  padding-left: 2px;
}

.selection-menu { display: flex; flex-direction: column; gap: 15px; margin: 25px 0; }
.selection-menu select { font-size: 1.1rem; }
.selection-menu .menu-button { width: 100%; padding: 14px; font-size: 1.1rem; background-color: #007bff; border: none; border-radius: 8px; color: white; cursor: pointer; transition: background-color 0.2s; }
.selection-menu .menu-button:hover { background-color: #0056b3; }

.combination-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.combination-grid li { background: rgba(30, 40, 60, 0.5); border-radius: 10px; transition: transform 0.2s ease-in-out, background 0.2s; border: 1px solid rgba(255, 255, 255, 0.1); }
.combination-grid li:hover { transform: translateY(-5px); background: rgba(40, 50, 75, 0.7); }
.combination-grid a { display: block; padding: 20px; text-decoration: none; color: #e0e0e0; font-size: 1.1rem; font-weight: 500; }

.all-combinations-link { margin-top: 10px; text-align: center; }
.subtle-link { color: #aaa; text-decoration: none; border-bottom: 1px dotted #aaa; font-size: 14px; transition: color 0.3s, border-bottom-color 0.3s; }
.subtle-link:hover { color: #fff; border-bottom-color: #fff; }

button, .button-like-link, .back-link { padding: 15px 30px; font-size: 18px; border: none; border-radius: 8px; background: #007bff; color: #fff; cursor: pointer; transition: background 0.3s, transform 0.2s; display: inline-block; text-decoration: none; margin-top: 10px; }
button:hover, .button-like-link:hover, .back-link:hover { background: #0056b3; transform: translateY(-2px); }
.button-like-link.green { background-color: #28a745; }
.button-like-link.green:hover { background-color: #218838; }
.result { margin-top: 25px; font-size: 1.1rem; line-height: 1.6; text-align: left; }
.result p { margin: 10px 0; }
.result strong { color: #00aaff; }
.disclaimer { margin-top: 30px; font-size: 12px; color: #888; } 
#map { height: 300px; margin-top: 20px; border: 1px solid #444; border-radius: 5px; }
.back-link { background-color: #6c757d; font-size: 16px; padding: 12px 25px; }
.back-link:hover { background-color: #5a6268; }

.location-choices {
  margin-top: 15px;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #1c2333;
  padding: 10px;
  text-align: left;
}
.location-choices p {
  margin: 0 0 10px 5px;
  font-size: 14px;
  color: #ccc;
}
.location-choices ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}
.location-choices li {
  padding: 12px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 15px;
}
.location-choices li:hover {
  background-color: #007bff;
  color: #fff;
}
.location-choices ul::-webkit-scrollbar {
  width: 8px;
}
.location-choices ul::-webkit-scrollbar-track {
  background: #1c2333;
  border-radius: 4px;
}
.location-choices ul::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}
.location-choices ul::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@media (max-width: 768px) {
  .container { padding: 25px; width: auto; }
  h1, h2 { font-size: 1.8rem; }
  button, .button-like-link, .back-link { padding: 12px 24px; font-size: 16px; }
  .result { font-size: 1rem; }
}
@media (max-width: 480px) {
  .container { padding: 20px; margin: 0 10px; }
  h1, h2 { font-size: 1.5rem; }
  #map { height: 250px; }
  .combination-grid { grid-template-columns: 1fr; }
}
