/* Poll styling */
.poll-header {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.poll-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #fff;
}

.poll-description {
    color: #a0a0c0;
    font-size: 18px;
    line-height: 1.6;
}

/* Questions */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.question-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s;
    position: relative;
}

.question-card:hover {
    transform: translateY(-5px);
    border-color: rgba(138, 43, 226, 0.3);
}

.question-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
}

.question-text {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 20px;
}

.question-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.question-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(
        #8a2be2 0% var(--p1),
        #00bfff var(--p1) var(--p2),
        #ff0080 var(--p2) var(--p3),
        #00ff88 var(--p3) var(--p4),
        #ffaa00 var(--p4) var(--p5),
        #aa00ff var(--p5) var(--p6),
        rgba(255, 255, 255, 0.1) var(--p6) 100%
    );
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(20, 20, 30, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: #fff;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.8);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
}

.option:hover {
    background: rgba(138, 43, 226, 0.05);
    border-color: rgba(138, 43, 226, 0.5);
}

.option-label {
    font-size: 18px;
    color: #f0f0f0;
    font-weight: 500;
    flex: 1;
}

.option-control {
    display: flex;
    align-items: center; /* Выравнивает всё строго по центру по вертикали */
    gap: 15px;
}

.option-control input {
    width: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    text-align: center;
}

.option-control input:focus {
    outline: none;
    border-color: #8a2be2;
}

.percentage {
    font-size: 14px;
    color: #8a8aa0;
    min-width: 50px;
    text-align: right;
}

.vote-slider {
    -webkit-appearance: none;
    width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    margin: 0; /* Убирает дефолтный сдвиг браузера */
    padding: 0;
    cursor: pointer;
}

.vote-input {
    width: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    margin: 0; /* Убирает сдвиг */
}

/* Вопрос с развернутым ответом */
.text-question {
    margin-top: 40px;
    padding-top: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    box-sizing: border-box;
    display: block;
    overflow: visible;
    position: relative;
}

.text-question .prompt-label {
    display: block;
    font-size: 16px;
    color: #b0b0c0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-question textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    color: #fff;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
}

.text-question textarea:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.ai-prompt {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 20px 0 25px 0;
}

.ai-prompt input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
}

.ai-prompt input::placeholder {
    color: #666;
}

.ai-prompt button {
    background: linear-gradient(90deg, #8a2be2, #00bfff);
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-prompt button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

/* Блок генерации множественных ответов */
.multi-answers-info {
    background: rgba(0, 191, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0 25px 0;
    border-left: 4px solid #00bfff;
    font-size: 15px;
    color: #a0a0c0;
    line-height: 1.5;
}

.multi-answers-info strong {
    color: #fff;
}

.answers-list {
    margin-top: 20px;
    max-height: 250px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 16px;
}

.answers-list .single-answer {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    color: #ccc;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    margin-bottom: 4px;
}

.answers-list .single-answer:last-child {
    border-bottom: none;
}

/* Блок общего количества прохождений */
.total-passes-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 0;
    margin-top: 200px;
    margin-bottom: 50px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    clear: both;
    display: block;
    border-top: 1px solid transparent;
    box-sizing: border-box;
    padding-top: 20px;
}

.total-passes-card .card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    background: rgba(138, 43, 226, 0.05);
}

.total-passes-card .card-body {
    padding: 24px;
}

.passes-control {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.slider-container {
    flex: 1;
    min-width: 300px;
}

.slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8a2be2;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.8);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 14px;
    color: #8a8aa0;
}

.number-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.number-input-container label {
    color: #b0b0c0;
    font-size: 15px;
}

.number-input {
    width: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 16px;
    text-align: center;
}

.unit {
    color: #8a8aa0;
    font-size: 14px;
}

.passes-summary p {
    color: #a0a0c0;
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 191, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #00bfff;
}

/* Actions */
.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
}

/* Легенда диаграммы */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.legend-label {
    flex: 1;
    word-break: break-word;
}