/* style_index.css - Обновленные стили с современным дизайном */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif; /* Убрали 'Inter' */
}

body {
    background: linear-gradient(135deg, #f0f4ff, #f8fafc);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1300px;
    background: transparent;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
}

header {
    text-align: center;
    padding: 40px 20px 30px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.content {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding-bottom: 100px;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home Page */
#home-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 30px;
    margin-top: 20px;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
}

.test-card {
    width: 300px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    cursor: pointer;
    transform: translateY(0);
    position: relative;
    backdrop-filter: blur(10px);
    border: none;
}

.test-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.95);
}

.test-card-image {
    height: 180px;
    background: linear-gradient(135deg, #c7d2fe, #ddd6fe);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.test-card-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.1));
}

.test-card-image i {
    font-size: 4.5rem;
    color: rgba(79, 70, 229, 0.25);
    z-index: 1;
}

.test-card-content {
    padding: 25px;
    text-align: center;
}

.test-card h3 {
    color: #1e293b;
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.test-card p {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 400;
}

.loading, .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    font-size: 1.3rem;
}

.loading {
    color: #818cf8;
}

.error {
    color: #ef4444;
}

.loading i, .error i {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

/* Test Page - Обновленные стили */
.question-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: transparent;
}

/* Стили для карточки вопроса */
.question-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(199, 210, 254, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.question-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(to bottom, #818cf8, #4f46e5);
    border-radius: 24px 0 0 24px;
}

.question-text {
    font-size: 1.8rem;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

/* Стили для карточек ответов */
.answers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.answer-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.07),
        0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f1f5f9;
}

.answer-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.12),
        0 8px 20px rgba(0, 0, 0, 0.08);
}

.answer-card.selected {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(79, 70, 229, 0.15),
        0 8px 20px rgba(79, 70, 229, 0.1);
    border: 2px solid #4f46e5;
}

.answer-image-container {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f0f4ff, #f8fafc);
}

.answer-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.answer-card:hover .answer-image {
    transform: scale(1.05);
}

.answer-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.answer-text {
    font-size: 1.25rem;
    color: #334155;
    line-height: 1.6;
}

/* Индикатор выбора */
.answer-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 10px;
    align-self: flex-end;
}

.answer-card.selected .answer-check {
    background: #4f46e5;
    border-color: #4f46e5;
}

.answer-card.selected .answer-check::after {
    content: "✓";
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Description Page */
.description-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    text-align: center;
}

#test-title-description {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 30px;
    font-weight: 700;
}

.description-text {
    font-size: 1.4rem;
    color: #334155;
    line-height: 1.7;
    margin-bottom: 40px;
    text-align: left;
    padding: 20px;
    background: #f8fafc;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px #f1f5f9;
}

#start-test-btn {
    margin-top: 30px;
    padding: 18px 50px;
    font-size: 1.3rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-test-btn:hover {
    background: #4338ca;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* Results Page */
.result-container {
    text-align: center;
    padding: 60px 30px;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.03),
        inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.result-icon {
    font-size: 6rem;
    color: #4f46e5;
    margin-bottom: 30px;
    opacity: 0.9;
}

.result-title {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.result-description {
    font-size: 1.5rem;
    color: #334155;
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background: #f8fafc;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px #f1f5f9;
}

.result-score {
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 50px;
    background: #f0f9ff;
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	
	display:none;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.btn {
    padding: 18px 40px;
    border: none;
    border-radius: 16px;
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.03);
    gap: 10px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-prev {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-prev:hover:not(:disabled) {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.btn-next {
    background: #4f46e5;
    color: white;
}

.btn-next:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.btn-finish {
    background: linear-gradient(to right, #10b981, #0ea5e9);
    color: white;
}

.btn-finish:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.btn-restart {
    background: linear-gradient(to right, #f97316, #ef4444);
    color: white;
    padding: 20px 50px;
    font-size: 1.4rem;
    margin-top: 20px;
}

.btn-home {
    background: #4f46e5;
    color: white;
    padding: 18px 45px;
    font-size: 1.3rem;
    margin-top: 25px;
}

.btn-restart:hover, .btn-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.progress-container {
    width: 100%;
    background: #f1f5f9;
    border-radius: 12px;
    height: 14px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #e2e8f0;
	display:none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #818cf8, #4f46e5);
    border-radius: 12px;
    transition: width 0.5s ease;
}

/* Responsive Styles */
@media (max-width: 900px) {
    body {
        padding: 20px;
    }
    header h1 {
        font-size: 2.5rem;
    }
    .tests-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
    .question-text {
        font-size: 1.6rem;
    }
    .result-description {
        font-size: 1.6rem;
    }
    .answers-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tests-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    header h1 {
        font-size: 2.2rem;
    }
    .test-card h3 {
        font-size: 1.4rem;
    }
    .question-text, .result-description {
        font-size: 1.5rem;
        padding: 20px;
    }
    .result-title {
        font-size: 2rem;
    }
    .result-score {
        font-size: 1.7rem;
    }
    .btn {
        padding: 16px 30px;
        font-size: 1.2rem;
    }
    .navigation-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    header {
        padding: 30px 15px 20px;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .question-text, .result-description {
        font-size: 1.3rem;
        padding: 18px;
    }
    .result-title {
        font-size: 1.7rem;
    }
    .result-score {
        font-size: 1.4rem;
        padding: 12px 25px;
    }
    .answer-content {
        padding: 22px 20px;
    }
    .btn {
        width: 100%;
    }
}

/* Анимации и переходы */
header.hidden {
    display: none;
}

header {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

header.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.tests-grid {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tests-grid.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}




/* Стили для изображения вопроса */
.question-image-container {
    height: 250px;
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f0f4ff, #f8fafc);
}

.question-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.question-card:hover .question-image {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .question-image-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .question-image-container {
        height: 150px;
    }
}

/* Стили для прогресса вопроса */
.question-progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
}

.question-progress {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.question-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.05));
    z-index: -1;
    border-radius: 50px;
}

.question-progress-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    margin: 0 5px;
    position: relative;
    display: inline-block;
}

.question-progress-number::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #4f46e5;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.question-progress:hover .question-progress-number::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-progress {
    animation: fadeInUp 0.5s ease forwards;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .question-progress {
        font-size: 1.1rem;
        padding: 8px 16px;
    }
    
    .question-progress-number {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .question-progress {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .question-progress-number {
        font-size: 1.1rem;
    }
}
.question-progress i {
    margin-right: 8px;
    font-size: 1.2rem;
    color: #4f46e5;
}

.btn-finish:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Стили для неактивных кнопок "Далее" и "Завершить тест" */
.btn-next:disabled,
.btn-finish:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Добавить в конец файла style_index.css */
.hidden {
    display: none !important;
}

.tests-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.test-card {
    width: 300px;
    /* остальные стили test-card без изменений */
}

@media (max-width: 1100px) {
    .test-card {
        width: calc(50% - 30px);
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .test-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .test-card {
        max-width: 100%;
    }
}