/* 
 * Been Fast Test v5 
 * Стиль: Сетевой город. Образование
 * Минимализм, строгость, функциональность
 */

/* ===== ОСНОВНЫЕ НАСТРОЙКИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #000000;
    background: #f5f5f5;
    min-height: 100vh;
}

/* ===== ШАПКА САЙТА ===== */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #d0d0d0;
    padding: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: #551a8b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

.site-nav a {
    color: #333333;
    text-decoration: none;
    padding: 5px 10px;
    font-size: 14px;
}

.site-nav a:hover {
    color: #551a8b;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    font-size: 14px;
    color: #666666;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
.site-main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.content-header {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 15px;
    margin-bottom: 20px;
}

.content-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 5px;
}

.content-subtitle {
    font-size: 14px;
    color: #666666;
}

/* ===== КНОПКИ (сохраняем текущие) ===== */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 2px solid #551a8b;
    background: #551a8b;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-family: inherit;
}

.btn:hover {
    background: #6a1fa0;
    border-color: #6a1fa0;
}

.btn.secondary {
    background: #ffffff;
    color: #551a8b;
}

.btn.secondary:hover {
    background: #f5f5f5;
}

.btn.danger {
    background: #ff2323;
    border-color: #ff2323;
    color: #ffffff;
}

.btn.danger:hover {
    background: #ff3b3b;
    border-color: #ff3b3b;
}

.btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn.large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn.full {
    width: 100%;
}

/* ===== ФОРМЫ (сохраняем текущие) ===== */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333333;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #d0d0d0;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #ffffff;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #551a8b;
}

.form-error {
    color: #ff2323;
    font-size: 13px;
    margin-top: 3px;
}

/* ===== КАРТОЧКИ И БЛОКИ ===== */
.content-card {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    margin-bottom: 15px;
}

.card-header {
    background: #f8f8f8;
    border-bottom: 1px solid #d0d0d0;
    padding: 12px 15px;
    font-weight: 600;
    color: #333333;
    font-size: 15px;
}

.card-body {
    padding: 15px;
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.welcome-section {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
}

.welcome-title {
    font-size: 24px;
    color: #551a8b;
    margin-bottom: 10px;
}

.welcome-text {
    color: #666666;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.stat-item {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 600;
    color: #551a8b;
    margin-bottom: 5px;
}

.stat-label {
    color: #666666;
    font-size: 14px;
}

/* ===== СТРАНИЦА АВТОРИЗАЦИИ ===== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    background: #f8f8f8;
    border: 1px solid #d0d0d0;
    border-bottom: none;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-right: 1px solid #d0d0d0;
    cursor: pointer;
    font-size: 14px;
    color: #666666;
}

.auth-tab:last-child {
    border-right: none;
}

.auth-tab.active {
    background: #ffffff;
    color: #551a8b;
    font-weight: 500;
}

.auth-form-container {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 20px;
}

.form-actions {
    margin-top: 20px;
}

.auth-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
    color: #666666;
}

.auth-links a {
    color: #551a8b;
    text-decoration: none;
}

/* ===== СТРАНИЦА ГИБРИДОВ ===== */
.hybrids-section {
    background: #ffffff;
    border: 1px solid #d0d0d0;
}

.hybrids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 15px;
}

.hybrid-card {
    border: 1px solid #d0d0d0;
    padding: 20px;
}

.hybrid-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.hybrid-icon {
    width: 40px;
    height: 40px;
    background: #551a8b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.hybrid-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.hybrid-description {
    color: #666666;
    font-size: 13px;
    margin-bottom: 15px;
    min-height: 40px;
}

.hybrid-progress {
    margin: 15px 0;
    font-size: 13px;
    color: #666666;
}

.hybrid-actions {
    display: flex;
    gap: 10px;
}

/* ===== СТРАНИЦА ТЕСТА ===== */
.test-container {
    background: #ffffff;
    border: 1px solid #d0d0d0;
}

.test-header {
    background: #f8f8f8;
    border-bottom: 1px solid #d0d0d0;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.test-subtitle {
    font-size: 14px;
    color: #666666;
}

.test-timer {
    font-size: 18px;
    font-weight: 600;
    color: #ff2323;
}

.test-progress {
    padding: 15px;
    border-bottom: 1px solid #d0d0d0;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: #551a8b;
    transition: width 0.3s;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666666;
}

.test-body {
    padding: 20px;
}

.question-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.question-number {
    font-size: 14px;
    color: #666666;
    margin-bottom: 5px;
}

.question-text {
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    line-height: 1.5;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.answer-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff;
}

.answer-item:hover {
    border-color: #551a8b;
}

.answer-item.selected {
    border-color: #551a8b;
    background: #f5f0ff;
}

.answer-checkbox {
    margin-right: 12px;
    margin-top: 2px;
}

.answer-text {
    flex: 1;
    font-size: 14px;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-top: 1px solid #d0d0d0;
    background: #f8f8f8;
}

.questions-sidebar {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    margin-top: 20px;
}

.sidebar-header {
    background: #f8f8f8;
    border-bottom: 1px solid #d0d0d0;
    padding: 10px 15px;
    font-weight: 600;
    color: #333333;
    font-size: 14px;
}

.questions-list {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
}

.question-nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
}

.question-nav-btn:hover {
    border-color: #551a8b;
}

.question-nav-btn.current {
    background: #551a8b;
    color: #ffffff;
    border-color: #551a8b;
}

.question-nav-btn.answered {
    background: #e6ffed;
    color: #006600;
    border-color: #00aa00;
}

/* ===== СТРАНИЦА РЕЗУЛЬТАТОВ ===== */
.results-container {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    padding: 30px;
    text-align: center;
}

.result-header {
    margin-bottom: 30px;
}

.result-title {
    font-size: 24px;
    color: #333333;
    margin-bottom: 10px;
}

.result-subtitle {
    color: #666666;
    font-size: 16px;
}

.result-score {
    font-size: 72px;
    font-weight: 700;
    color: #551a8b;
    margin: 20px 0;
}

.result-status {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0;
}

.result-status.pass {
    color: #00aa00;
}

.result-status.fail {
    color: #ff2323;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.detail-item {
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.detail-value {
    font-size: 32px;
    font-weight: 600;
    color: #551a8b;
    margin-bottom: 5px;
}

.detail-label {
    color: #666666;
    font-size: 14px;
}

.result-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ===== СПИННЕР И ЗАГРУЗКА ===== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: #ffffff;
    border: 1px solid #d0d0d0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #551a8b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666666;
    font-size: 16px;
}

/* ===== СООБЩЕНИЯ ===== */
.message {
    padding: 12px 15px;
    margin: 15px 0;
    border: 1px solid;
    font-size: 14px;
}

.message.error {
    background: #ffe6e6;
    border-color: #ff2323;
    color: #cc0000;
}

.message.success {
    background: #e6ffe6;
    border-color: #00aa00;
    color: #006600;
}

.message.warning {
    background: #fff8e6;
    border-color: #ffaa00;
    color: #cc8800;
}

.message.info {
    background: #e6f2ff;
    border-color: #0066cc;
    color: #004d99;
}

/* ===== ПОДВАЛ САЙТА ===== */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #d0d0d0;
    padding: 20px 0;
    margin-top: 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
    color: #666666;
    font-size: 13px;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #551a8b;
    text-decoration: none;
    margin: 0 10px;
    font-size: 13px;
}

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

/* ===== УТИЛИТЫ ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .site-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hybrids-grid {
        grid-template-columns: 1fr;
    }
    
    .test-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .test-timer {
        align-self: flex-end;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .questions-list {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
}

@media (max-width: 480px) {
    .auth-tabs {
        flex-direction: column;
    }
    
    .auth-tab {
        border-right: none;
        border-bottom: 1px solid #d0d0d0;
    }
    
    .test-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .questions-list {
        grid-template-columns: repeat(5, 1fr);
    }
}