* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Inter', sans-serif, 'Roboto';
    background-color: #0974F0;
    min-height: 100vh;
    color: #333;
}

a {
    text-decoration: unset;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.screen {
    display: none;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.content {
    position: relative;
}

.screen--start .content {
    overflow: hidden;
}

/* Стартовый экран */
#start-screen .content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.text-section h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #2d3748;
}

.text-section p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #4a5568;
}

.text-section p:last-of-type {
    margin-bottom: 40px;
}

.primary-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.3);
}

.secondary-btn {
    background: transparent;
    color: #4285f4;
    border: 2px solid #e2e8f0;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    border-color: #4285f4;
    background: #f7faff;
}

.screen--start .image-section {
    position: absolute;
    bottom: -35px;
    right: -60px;

    & img {
        width: 600px;
        max-width: 100%;
    }
}

@media (max-width: 1000px) {
    .screen--start .image-section {
        position: static;
        transform: unset;
    }
}

.image-section img {
    display: block;
    max-width: 85%;
    height: auto;
    border-radius: 16px;
    margin: auto;
}

img.image-section--small-image {
    max-width: 55%;
}

@media (max-width: 768px) {
    .image-section--big-empty-background {
        margin-top: -45px;
    }

    img.image-section--small-image {
        max-width: 85%;
    }
}

/* Экран квиза */
.quiz-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    align-items: flex-start;
    background: white;
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 1000px;
}

.left-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.left-section h2 {
    font-size: 2.1rem;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.25;
    margin: 0;
}

@media (max-width: 768px) {
    .left-section h2 {
        font-size: 1.23rem;
        line-height: 1.15;
    }
}

.right-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.answers-container {
    flex: 1;
    margin-bottom: 24px;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.answer-option:hover {
    border-color: #4285f4;
    background: #f7faff;
}

.answer-option.selected {
    border-color: #4285f4;
    background: #f7faff;
}

/* Скрываем оригинальные радио-кнопки */
.answer-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Создаем кастомную радио-кнопку */
.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    background: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

/* Внутренний кружок для выбранного состояния */
.custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4285f4;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

/* Состояние при наведении */
.answer-option:hover .custom-radio {
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* Выбранное состояние */
.answer-option.selected .custom-radio {
    border-color: #4285f4;
    background: white;
}

.answer-option.selected .custom-radio::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Дополнительная анимация при клике */
.custom-radio:active {
    transform: scale(0.95);
}

/* Пульсирующий эффект при выборе */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(66, 133, 244, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0);
    }
}

.answer-option.selected .custom-radio {
    animation: pulse 0.6s ease-out;
}

.answer-option label {
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.progress {
    color: #718096;
    font-size: 0.9rem;
}

.buttons {
    display: flex;
    gap: 16px;
    align-items: center;
}

#back-btn {
    display: none;
}

/* Экран результатов */
.results-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    /* min-width: 600px; */
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 750px;
}

.result-image-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.result-image-container img {
    max-width: 100%;
    max-height: 260px;
    border-radius: 16px;
    object-fit: cover;
}

.result-card h2 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #2d3748;
}

.result-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 40px;
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 30px;
}

/* Мобильная навигация */
.mobile-navigation {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.mobile-nav-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-back-btn {
    background: #f7faff;
    color: #4285f4;
    border: 2px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    min-width: 48px;
    height: 48px;
}

.mobile-back-btn:hover {
    border-color: #4285f4;
    background: #4285f4;
    color: white;
}

.mobile-next-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    height: 48px;
}

.mobile-next-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.mobile-progress {
    color: #718096;
    font-size: 0.85rem;
    text-align: center;
    padding-bottom: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        padding-bottom: 100px; /* Место для мобильной навигации */
    }
    
    #start-screen .content,
    .quiz-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    /* На мобильных меняем структуру */
    .quiz-content {
        display: flex;
        flex-direction: column;
    }
    
    .left-section {
        order: 1;
    }
    
    .right-section {
        order: 2;
        height: auto;
        width: 100%;
    }
    
    .text-section h1 {
        font-size: 1.8rem;
    }
    
    .question-section h2 {
        font-size: 1.3rem;
    }
    
    /* Скрываем обычную навигацию на мобильных */
    .quiz-controls {
        display: none;
    }
    
    /* Показываем мобильную навигацию */
    #quiz-screen .mobile-navigation {
        display: block;
    }
    
    .buttons {
        justify-content: center;
    }
    
    .result-card {
        padding: 30px 20px;
    }
    
    .result-image-container img {
        max-height: 200px;
    }
    
    .result-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .result-actions .primary-btn,
    .result-actions .secondary-btn {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
}

/* Кнопка переключения отладки */
.debug-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.debug-toggle:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.debug-toggle:active {
    transform: scale(0.95);
}

/* Панель отладки */
.debug-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 12px;
    padding: 16px;
    min-width: 200px;
    max-width: 300px;
    font-size: 0.85rem;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.debug-header {
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.debug-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.debug-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.debug-profession-name {
    font-weight: 500;
    color: #e2e8f0;
}

.debug-score-value {
    font-weight: 600;
    color: #4285f4;
    background: rgba(66, 133, 244, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .debug-toggle {
        top: 10px;
        left: 10px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .debug-panel {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 0.8rem;
    }
    
    .debug-content {
        max-height: 200px;
        overflow-y: auto;
    }
}

.w-button {
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: unset;
}

.w-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn--restart {
    background-color: #0974F0;
    color: white;
}

.btn--kruzhok {
    background-color: #CAFF00;
    color: #333333;
}

.btn--share {
    background-color: #7FDEFF;
    color: #333333;
}

.btn--download {
    background-color: #666666;
    color: white;
}

.result-footer {
    text-align: center;
}

.result-footer p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.result-footer a {
    color: #0974F0;
    text-decoration: none;
}

.result-footer a:hover {
    text-decoration: underline;
}