* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

.survey-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.survey-header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.survey-header h1 i {
    color: #3498db;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.survey-progress {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Стили для вопросов и вариантов ответов */
.question-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.question-text {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Стили для вариантов ответов */
.option-label {
    display: block;
    margin-bottom: 12px;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.option-label:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.option-label.selected {
    border-color: #3498db;
    background: #e8f4fc;
    color: #2c3e50;
}

/* Стили для радио-кнопок и чекбоксов */
.option-input {
    margin-right: 10px;
    transform: scale(1.2);
}

/* ========== ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ РЕЙТИНГА ========== */
.rating-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.rating-option {
    flex: 1;
    min-width: 70px;
    max-width: 120px;
    text-align: center;
    padding: 15px 8px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    background: white;
}

.rating-option:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rating-option.selected {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.rating-option .emoji {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: block;
}

.rating-option .emoji-number {
    font-size: 0.85rem;
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    background: #f0f0f0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-option.selected .emoji-number {
    background: #3498db;
    color: white;
}

.rating-option .rating-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    text-align: center;
    line-height: 1.2;
    margin-top: 5px;
    word-wrap: break-word;
    max-width: 100%;
}

.rating-option.selected .rating-label {
    color: #2c3e50;
    font-weight: 600;
}

/* Цветовые темы для разных рейтингов */
.rating-option[data-number="1"]:hover,
.rating-option[data-number="1"].selected {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.rating-option[data-number="1"].selected .emoji-number {
    background: #e74c3c;
}

.rating-option[data-number="2"]:hover,
.rating-option[data-number="2"].selected {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
}

.rating-option[data-number="2"].selected .emoji-number {
    background: #f39c12;
}

.rating-option[data-number="3"]:hover,
.rating-option[data-number="3"].selected {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.rating-option[data-number="3"].selected .emoji-number {
    background: #3498db;
}

.rating-option[data-number="4"]:hover,
.rating-option[data-number="4"].selected {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.rating-option[data-number="4"].selected .emoji-number {
    background: #2ecc71;
}

.rating-option[data-number="5"]:hover,
.rating-option[data-number="5"].selected {
    border-color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
}

.rating-option[data-number="5"].selected .emoji-number {
    background: #9b59b6;
}

/* ========== КОНЕЦ СТИЛЕЙ ДЛЯ РЕЙТИНГА ========== */

/* Стили для текстового поля */
.text-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.text-input:focus {
    outline: none;
    border-color: #3498db;
}

/* Стили для follow-up вопросов */
.follow-up-container {
    margin-top: 25px;
    padding: 20px;
    background: #f1f8ff;
    border-radius: 10px;
    border-left: 4px solid #2980b9;
    animation: fadeIn 0.3s ease;
}

.follow-up-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Стили для чекбоксов с комментариями */
.checkbox-with-comment-container {
    margin-bottom: 12px;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.checkbox-with-comment-container:hover {
    border-color: #3498db;
    background: #f9fdff;
}

.checkbox-with-comment-container.selected {
    border-color: #3498db;
    background: #f0f8ff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.checkbox-with-comment-container .option-label {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.checkbox-with-comment-container .option-label:hover {
    background: transparent;
}

.comment-container {
    margin-top: 12px;
    padding-left: 28px;
    animation: fadeIn 0.3s ease;
}

.comment-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.comment-input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Кнопки навигации */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.nav-btn {
    padding: 12px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

#prevBtn {
    background: #95a5a6;
}

#prevBtn:hover:not(:disabled) {
    background: #7f8c8d;
}

#submitBtn {
    background: #2ecc71;
}

#submitBtn:hover:not(:disabled) {
    background: #27ae60;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Сообщение об ошибке */
.error-message {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-message h3 {
    margin-bottom: 10px;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для модального окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.modal-header {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 30px;
    text-align: center;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 0.6s ease;
}

.modal-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body p {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    background: #95a5a6;
    color: white;
    min-width: 150px;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: #7f8c8d;
}

.modal-btn:active {
    transform: translateY(0);
}

/* Стили для информации об опросе */
.survey-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.survey-info div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #5d6d7e;
}

.survey-info i {
    color: #3498db;
    width: 16px;
}

/* Анимации для модального окна */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .survey-header h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .rating-options {
        gap: 8px;
    }
    
    .rating-option {
        min-width: 60px;
        padding: 12px 5px;
    }
    
    .rating-option .emoji {
        font-size: 2rem;
    }
    
    .rating-option .rating-label {
        font-size: 0.65rem;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .question-container {
        padding: 15px;
    }
    
    .rating-option {
        min-width: 55px;
        padding: 10px 4px;
    }
    
    .rating-option .emoji {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .rating-option .emoji-number {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
    
    .rating-option .rating-label {
        display: none;
    }
    
    .option-label {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
}