/* Загальні стилі та скидання */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    background-color: #222e51; /* Темно-синій фон */
    color: #fff; /* Білий текст */
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 800px;
    width: 90%;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background-color: #2a3760; /* Трохи світліший відтінок синього для контейнера */
    position: relative;
}

/* Шапка */
header {
    background-color: #1a2340; /* Темніший синій для шапки */
    color: #fff;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid #30a8fb; /* Блакитна лінія */
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

#atomic-logo {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

.logo span {
    display: inline-block;
    vertical-align: middle;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switcher button.active,
.language-switcher button:hover {
    background-color: #30a8fb; /* Блакитний колір для активної кнопки */
    color: #fff;
    border-color: #30a8fb;
}

/* Основний контент */
main {
    padding: 2rem;
    min-height: 400px;
}

.question-card {
    background-color: #2a3760; /* Трохи світліший відтінок синього */
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    color: #30a8fb; /* Блакитний колір для заголовків */
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

#question-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

/* Опції відповідей */
#options-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.option-item:hover {
    border-color: #30a8fb;
    background-color: rgba(48, 168, 251, 0.1);
    transform: translateX(5px);
}

.option-item.selected {
    border-color: #30a8fb;
    background-color: rgba(48, 168, 251, 0.2);
    position: relative;
}

.option-item.selected::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #30a8fb;
    border-radius: 4px 0 0 4px;
}

.radio-custom {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.2s ease;
}

.option-item.selected .radio-custom {
    border-color: #30a8fb;
}

.option-item.selected .radio-custom::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: #30a8fb;
    border-radius: 50%;
    animation: selectFade 0.3s ease;
}

@keyframes selectFade {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.option-text {
    flex: 1;
}

/* Навігація */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

button {
    background-color: #30a8fb; /* Блакитні кнопки */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #1c93e2; /* Трохи темніший блакитний при наведенні */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(48, 168, 251, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.5);
}

#prev-btn {
    background-color: transparent;
    color: #30a8fb;
    border: 1px solid #30a8fb;
}

#prev-btn:hover:not(:disabled) {
    background-color: rgba(48, 168, 251, 0.1);
}

/* Результати */
.result-section {
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

#result-title {
    color: #30a8fb;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

#result-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#total-score {
    font-weight: bold;
    font-size: 1.5rem;
    color: #30a8fb;
}

#recommendation {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    position: relative;
    border-left: 5px solid #30a8fb;
}

/* Прогрес-бар */
footer {
    background-color: #1a2340; /* Темніший синій для футера */
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    height: 10px;
    width: 100%;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 10px;
    border-radius: 20px;
    transition: width 0.3s ease, background-color 0.5s ease;
    background-color: #3cb371; /* По умолчанию зеленый (безопасный) */
}

/* Кольори прогрес-бару за рівнями ризику */
.progress-bar.safe {
    background-color: #3cb371; /* Середньоморський зелений */
}

.progress-bar.moderate {
    background-color: #ffa500; /* Помаранчевий */
}

.progress-bar.high-risk {
    background-color: #dc3545; /* Червоний */
}

.progress-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

/* Адаптивний дизайн */
@media (max-width: 768px) {
    .container {
        width: 95%;
        margin: 1rem auto;
    }
    
    header {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
        text-align: center;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    #atomic-logo {
        height: 30px;
    }
    
    main, .result-section {
        padding: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    #question-text {
        font-size: 1rem;
    }
    
    button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .option-item {
        padding: 0.6rem 0.8rem;
    }
}

/* Анімації та ефекти */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.fade-out {
    animation: fadeOut 0.5s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Додаткові класи для результатів */
.result-low {
    border-left-color: #3cb371;
}

.result-medium {
    border-left-color: #ffa500;
}

.result-high {
    border-left-color: #dc3545;
}

.button-link {
    display: inline-block;
    background-color: #30a8fb; /* Блакитні кнопки */
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    margin-top: 1rem;
}

.button-link:hover {
    background-color: #1c93e2; /* Трохи темніший блакитний при наведенні */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(48, 168, 251, 0.3);
}

.button-link:active {
    transform: translateY(0);
}

#contact-text {
    margin-top: 1.5rem;
    color: #fff;
    font-size: 1rem;
    text-align: center;
} 