* {
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
  }

body {
background-color: #8d93b5;
color: #1f2937;
margin: 0;
padding: 1.8rem;
}

/* --- Стили для формы (index.html) --- */
.container {
background: white;
padding: 40px;
border-radius: 20px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
max-width: 400px;
width: 100%;
text-align: center;
margin: 0 auto;
}

h1 {
margin-bottom: 24px;
font-size: 24px;
color: #2c3e50;
text-align: center;
}

label {
display: block;
margin-top: 16px;
margin-bottom: 6px;
font-weight: 500;
text-align: left;
}

input[type="number"] {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 10px;
font-size: 16px;
transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="number"]:focus {
border-color: #5c6bc0;
outline: none;
box-shadow: 0 0 5px rgba(92, 107, 192, 0.4);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"] {
-moz-appearance: textfield;
}

.btn {
margin-top: 24px;
background-color: #5c6bc0;
color: white;
padding: 12px;
width: 100%;
border: none;
border-radius: 10px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}

.btn:hover {
background-color: #3f51b5;
}

.footer {
margin-top: 24px;
font-size: 14px;
color: #888;
}

/* --- Стили для таблицы (results.html) --- */
.table-container {
max-width: 1200px;
margin: 0 auto;
background-color: white;
border-radius: 1rem;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
overflow: hidden;
}

table {
width: 100%;
border-collapse: collapse;
}

thead {
background-color: #f3f4f6;
}

th, td {
padding: 1rem;
text-align: left;
border-bottom: 1px solid #e5e7eb;
}

th {
font-weight: 600;
color: #374151;
}

tr:last-child td {
border-bottom: none;
}

.chance-bar {
background: #cfd1d4;
border-radius: 4px;
overflow: hidden;
height: 10px;
margin-top: 6px;
position: relative;
}

.chance-fill {
height: 100%;
transition: width 0.4s ease;
}

.chance-low    { background-color: #ef4444; }  /* < 40% — красный */
.chance-medium { background-color: #f59e0b; }  /* 40–69% — жёлтый */
.chance-high   { background-color: #10b981; }  /* ≥ 70% — зелёный */
  
@media (max-width: 640px) {
table, thead, tbody, th, td, tr {
    display: block;
}

th {
    background-color: #f3f4f6;
}

td {
    border: none;
    padding: 0.5rem 1rem;
}
}
  

.btn-back {
    margin-top: 24px;
    background-color: #5c6bc0;
    color: white;
    padding: 12px;
    width: 30%;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}
        
.btn-back:hover {
    background-color: #3f51b5;
}

.btn-back-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    margin-top: 18px;
    cursor: pointer;
  }
  
  .checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5c6bc0;
    margin: 0;
    vertical-align: middle;
    position: relative;
    top: 1px;
  }
  
  
  .checkbox-wrapper input[type="checkbox"]:checked {
    background-color: #5c6bc0;
    border-color: #5c6bc0;
  }
  
  .checkbox-wrapper input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s;
  }
  
  .checkbox-wrapper input[type="checkbox"]:checked::after {
    opacity: 1;
  }
  
  .no-results {
    text-align: center;
    font-size: 16px;
    color: #888;
  }
  
  select {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: #fff;
    transition: border-color 0.3s ease;
  }
  
  select:focus {
    border-color: #007BFF;
    outline: none;
  }
  
  