* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.btn-start {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.test-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.test-description {
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.question {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
    transition: box-shadow 0.3s;
}

.question:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.question h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.options {
    margin-top: 10px;
}

.option {
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.option:hover {
    background: #f0f0f0;
}

.option input {
    margin-right: 10px;
}

/* Стили для ранжирования */
.ranking-container {
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.ranking-item {
    padding: 12px;
    margin: 8px 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: move;
    user-select: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-item:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.ranking-handle {
    cursor: grab;
    color: #999;
    font-size: 20px;
    user-select: none;
}

.ranking-item.dragging {
    opacity: 0.5;
    background: #e3f2fd;
}

/* Стили для группы scale */
.scale-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.scale-item {
    margin-bottom: 25px;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.scale-item:last-child {
    border-bottom: none;
}

.scale-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.scale-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.scale-input {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.scale-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: transform 0.2s;
}

.scale-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.scale-value {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: #667eea;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 20px;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* Стили для группы radio */
.radio-group {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.radio-statement {
    margin-bottom: 25px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.statement-text {
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.radio-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 15px;
    background: white;
    border-radius: 25px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.radio-option:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.radio-option input {
    margin-right: 8px;
}

/* Стили для текстового ввода */
.text-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
    resize: vertical;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
}

.textarea-input {
    min-height: 100px;
    resize: vertical;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    transition: color 0.3s;
}

/* Кнопка завершения */
.btn-finish {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 30px;
    width: 100%;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-finish:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Результат */
.result {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 15px;
    margin-top: 20px;
}

.result h2 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.result p {
    margin: 10px 0;
    color: #1b5e20;
}

.result strong {
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
}

/* Загрузка и ошибки */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container, .test-container {
        padding: 20px;
    }

    .radio-options {
        gap: 10px;
    }

    .radio-option {
        padding: 6px 12px;
        font-size: 14px;
    }

    .scale-control {
        flex-direction: column;
        align-items: stretch;
    }

    .scale-value {
        align-self: flex-start;
    }
}