* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: white;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.nav-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 8px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.nav-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.nav-select,
.position-input {
    font-size: 1rem;
    padding: 6px 10px;
    border-radius: 4px;
    background: white;
    color: #444;
    min-width: 80px;
    text-align: center;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.nav-select:hover,
.position-input:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.nav-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 28px;
}

/* Основной контент */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    gap: 20px;
}

.output-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Стиль для .p_info — сохраняем класс из JS */
.p_info {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    line-height: 1.4;
}
.num_p_info{
    color: #666;
    font-size: 1rem;
    font-weight: normal;
}

.ex-control-container{
    display: flex;
    justify-content: space-around;
    width: 100%;
}

/* Кнопки навигации и управления */
button {
    border: none;
    background: #3498db;
    color: white;
    font-size: 1rem;
    font-weight: normal;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 70px;
}

button:hover {
    background: #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Таймер и ползунок */
.timerControls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.slider_app_div {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input_app_span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: normal;
    color: #333;
    pointer-events: none;
}

.input_app[type='range'] {
    width: 100%;
    height: 45px;
    -webkit-appearance: none;
    background: #ffffff;
    border-radius: 4px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.input_app[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 45px;
    background: #e74c3c;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Адаптивность */
@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
    }

    .nav-group {
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        padding: 10px;
    }

    .nav-select,
    .position-input {
        font-size: 0.9rem;
        padding: 5px 8px;
        min-width: 60px;
    }

    .p_info {
        font-size: 1.6rem;
        padding: 12px 8px;
    }

    button {
        padding: 6px 12px;
        font-size: 0.9rem;
        min-width: 60px;
    }
}