/* ========================================
   РСЯ ДИАГНОСТИКА — СТИЛИ
   Единый стиль с сокращателем ссылок
   ======================================== */

/* ----- HERO БЛОК ----- */
.rsya-hero {
    text-align: center;
    margin-bottom: 40px;
}
.rsya-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #1e293b;
}
.rsya-hero p {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ----- ОСНОВНОЙ КОНТЕЙНЕР ----- */
.rsya-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.rsya-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ----- ДИСКЛЕЙМЕР ----- */
.rsya-disclaimer {
    margin-top: 30px;
    padding: 20px 24px;
    background: #fef9e7;
    border-radius: 16px;
    border-left: 5px solid #f59e0b;
}
.rsya-disclaimer p {
    margin: 0;
    color: #92400e;
    font-size: 14px;
}

/* ----- ВОПРОСЫ КВИЗА ----- */
.q-item {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e2e8f0;
}
.q-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.q-item p {
    font-weight: 600;
    margin: 0 0 10px;
    color: #1e293b;
    font-size: 15px;
}

.q-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.q-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}
.q-options label:hover {
    background: #f1f5f9;
    border-color: #1e293b;
}
.q-options label.selected {
    background: #e2e8f0;
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.15);
}
.q-options input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #1e293b;
    margin: 0;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: radio;
    -moz-appearance: radio;
}

/* ----- КНОПКА ОТПРАВКИ ----- */
.quiz-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    margin-top: 24px;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    background: #1e293b;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.2;
}
.quiz-submit-btn:hover {
    background: #0f172a;
    transform: translateY(-2px);
}
.quiz-submit-btn:active {
    transform: translateY(0);
}

/* ----- РЕЗУЛЬТАТ ----- */
#quiz-result {
    margin-top: 20px;
    display: none;
}

/* ----- СТАТИСТИКА ----- */
.rsya-stats-grid {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}
.rsya-stat-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    flex: 1;
    text-align: center;
    min-width: 120px;
}
.rsya-stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1e293b;
}
.rsya-stat-card .stat-label {
    color: #64748b;
    font-size: 0.85rem;
}

/* ----- ПОСЛЕДНИЕ РЕЗУЛЬТАТЫ ----- */
.rsya-recent-title {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #1e293b;
}
.rsya-recent-item {
    background: white;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.rsya-recent-item .label {
    color: #1e293b;
}
.rsya-recent-item .label strong {
    font-weight: 700;
}
.rsya-recent-item .date {
    color: #64748b;
    font-size: 0.85rem;
}

/* ----- АНИМАЦИИ ----- */
@keyframes rsya-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
@keyframes rsya-spin {
    to {
        transform: rotate(360deg);
    }
}

.rsya-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: sans-serif;
    font-size: 14px;
    animation: rsya-slide-in 0.3s ease;
}
.rsya-toast.success {
    background: #dcfce7;
    color: #166534;
}
.rsya-toast.error {
    background: #fee2e2;
    color: #991b1b;
}

.rsya-loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #1e293b;
    border-radius: 50%;
    animation: rsya-spin 0.8s linear infinite;
}

/* ----- АДАПТАЦИЯ ----- */
@media (max-width: 600px) {
    .rsya-container {
        padding: 20px 16px;
    }
    .rsya-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    .rsya-hero h1 {
        font-size: 1.8rem;
    }
    .rsya-hero p {
        font-size: 1rem;
    }
    .q-item p {
        font-size: 14px;
    }
    .q-options label {
        font-size: 13px;
        padding: 7px 12px;
    }
    .quiz-submit-btn {
        font-size: 17px;
        padding: 14px;
    }
    .rsya-stats-grid {
        flex-direction: column;
        gap: 12px;
    }
    .rsya-stat-card {
        padding: 16px;
    }
    .rsya-stat-card .stat-number {
        font-size: 1.6rem;
    }
    .rsya-disclaimer {
        padding: 16px 18px;
    }
    .rsya-disclaimer p {
        font-size: 13px;
    }
    .rsya-recent-item {
        padding: 12px 14px;
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    .rsya-hero h1 {
        font-size: 1.5rem;
    }
    .rsya-card {
        padding: 16px 12px;
    }
    .q-options label {
        font-size: 12px;
        padding: 6px 10px;
    }
    .quiz-submit-btn {
        font-size: 15px;
        padding: 12px;
    }
    .rsya-stat-card .stat-number {
        font-size: 1.4rem;
    }
}