/* Общие стили */
body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", Arial, sans-serif;
    background-color: #0e1d30;
    color: #fff;
    line-height: 1.6;
}

/* === ШАПКА === */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    height: 75px;
    padding: 0 20px;
    background: linear-gradient(to right, #0f172a, #0e2034, #0e1d30);
    box-sizing: border-box;
    z-index: 9999;
    cursor: pointer;
  }
  
  .nav__list {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: "Roboto", Arial, sans-serif;
  }
  
  .nav__item {
    display: block;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: "Roboto", Arial, sans-serif;
  }
  
  .button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 15px;
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    text-align: left;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    font-family: "Roboto", Arial, sans-serif;
  }

/* Контейнер */
.container2 {
    max-width: 1200px;
    margin: 70px auto 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #333;
    font-family: "Roboto", Arial, sans-serif;
}

/* Ввод данных */
.inputs {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    font-family: "Roboto", Arial, sans-serif;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Для мобильных устройств */
    font-family: "Roboto", Arial, sans-serif;
}

label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    font-family: "Roboto", Arial, sans-serif;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: "Roboto", Arial, sans-serif;
}

input[type="number"], input[type="text"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 14px;
}

input[type="number"]:focus, input[type="text"]:focus {
    border-color: #5a67d8;
}

/* Кнопки */
.buttons {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 10px 15px;
    background-color: #5a67d8;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    font-family: "Roboto", Arial, sans-serif;
    font-weight: 500;
}

button:hover {
    background-color: #434190;
}

/* Кнопка настроек */
.settings-toggle {
    background-color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.settings-toggle:hover {
    background-color: #475569;
}

/* Настройки для шкал осей */
.axis-settings {
    margin: 10px auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 800px;
    text-align: left;
    transition: all 0.3s ease;
}

.axis-settings.hidden {
    display: none;
}

.axis-settings h4 {
    font-size: 16px;
    margin: 10px 0;
    color: #444;
    font-family: "Roboto", Arial, sans-serif;
    font-weight: 500;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.settings-group {
    flex: 1;
    min-width: 300px;
}

.setting-item {
    margin-bottom: 10px;
}

.setting-item label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.setting-item input[type="text"] {
    width: 100%;
    max-width: 250px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 14px;
}

.update-btn {
    margin-top: 15px;
    background-color: #4CAF50;
    padding: 8px 16px;
    width: auto;
    min-width: 120px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.update-btn:hover {
    background-color: #388E3C;
}

/* График */
#chart-container {
    margin: 20px auto;
    text-align: center;
    width: 90%; /* Сужаем ширину для мобильных */
}

svg {
    width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: "Roboto", Arial, sans-serif;
}

svg text {
    font-family: "Roboto", Arial, sans-serif !important;
    font-size: 12px !important;
}

/* Подписи осей */
.axes-labels {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Перенос на мобильных */
    gap: 10px;
    font-family: "Roboto", Arial, sans-serif;
}

.axes-labels label {
    font-size: 14px;
    font-family: "Roboto", Arial, sans-serif;
}

/* Таблица */
#data-table {
    margin: 20px auto;
    border-collapse: collapse;
    width: 90%; /* Сужаем ширину для мобильных */
    text-align: center;
    font-size: 14px;
    font-family: "Roboto", Arial, sans-serif;
}

#data-table th,
#data-table td {
    border: 1px solid #ddd;
    padding: 10px;
    font-family: "Roboto", Arial, sans-serif;
}

#data-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    font-family: "Roboto", Arial, sans-serif;
}

#data-table tr:nth-child(even) {
    background-color: #f9fafb;
}

#data-table tr:hover {
    background-color: #edf2f7;
}

/* Медиазапросы для мобильных */
@media (max-width: 768px) {
    .header {
        height: 40px;
    }

    .header h1 {
        font-size: 16px;
    }

    .container {
        padding: 15px;
        margin: 50px auto 10px;
    }

    .input-row {
        flex-direction: column;
        align-items: flex-start;
    }

    input[type="number"] {
        width: 100%;
    }

    button {
        font-size: 14px;
    }

    #data-table th,
    #data-table td {
        font-size: 12px;
        padding: 5px;
    }

    #chart-container {
        width: 100%;
    }

    svg {
        width: 100%;
    }
    
    .settings-group {
        min-width: 100%;
    }
    
    .settings-row {
        flex-direction: column;
    }
}

.delete-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    background-color: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background-color: #fecaca;
    color: #b91c1c;
    transform: scale(1.1);
}

.delete-btn:active {
    transform: scale(0.95);
}

.delete-btn::before {
    content: "×";
    line-height: 1;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.download-btn {
    background-color: #2563eb;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn:hover {
    background-color: #1d4ed8;
}

.download-btn::before {
    content: "⤓";
    font-size: 18px;
    line-height: 1;
}

/* SEO Description */
.seo-description {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
    color: transparent;
}

.seo-description h1,
.seo-description p,
.seo-description ul {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
