/* assets/style.css - Unified Edition v17 (Classic Button & Cinematic Crop) */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    background: #ffffff;
    color: #222;
    line-height: 1.5;
    min-height: 100vh;
}

/* Header */
.header {
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: #d32f2f;
    text-decoration: none;
    font-family: Arial, sans-serif;
    display: inline-block;
    letter-spacing: -0.5px;
}

.logo:hover {
    color: #b71c1c;
}

/* СЕТКА (ШИРОКАЯ) */
.main-wrapper { 
    max-width: 960px; 
    margin: 0 auto; 
    padding: 0 20px; 
}
.container { 
    width: 100%; 
    padding: 25px 0 40px; 
}

/* Article Header */
.article-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

h1 {
    font-size: 38px;
    line-height: 1.15;
    margin-bottom: 10px;
    font-weight: normal;
    color: #000;
    letter-spacing: -0.5px;
}

.article-meta {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.author {
    font-weight: bold;
    color: #333;
}

/* Start Screen Layout */
#startScreen {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Quiz Image - СИНЕМАТИК КРОП (Обрезается сверху и снизу) */
.quiz-image {
    text-align: center;
    margin: 0;
}

.quiz-image img {
    width: 100%;
    max-width: 860px; 
    height: auto;
    max-height: 320px; 
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.quiz-caption {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    font-style: italic;
}

/* Introduction Text */
.quiz-intro {
    font-size: 19px; 
    color: #333;
    max-width: 860px; 
    margin: 0 auto;
}

.quiz-intro p {
    margin-bottom: 12px; 
}

.quiz-intro p:last-child {
    margin-bottom: 0;
}

/* Start Button Container - Компактный */
.start-button-container {
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px; 
    text-align: center;
    margin: 0 auto;
    max-width: 760px; 
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.start-button-container:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* КЛАССИЧЕСКИЙ СЕРЫЙ ТЕКСТ */
.button-pretext {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* КЛАССИЧЕСКАЯ КНОПКА (Без пульсации, с мягкой тенью) */
.start-button {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 18px 65px;
    font-size: 26px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.start-button:hover {
    background: #b71c1c;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.4);
}

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

/* Quiz Container */
.quiz-container {
    display: none;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.question-header {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.question-text {
    font-size: 26px;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #000;
}

/* Answer Options */
.answer-option {
    background: white;
    border: 2px solid #ddd;
    padding: 16px 20px;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.answer-option:hover {
    background: #f8f8f8;
    border-color: #999;
}

.answer-option input[type="radio"] {
    margin-right: 18px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.answer-option.selected {
    background: #e8f5e9;
    border-color: #4caf50;
}

.answer-option.correct {
    background: #e8f5e9;
    border-color: #4caf50;
    font-weight: bold;
}

.answer-option.wrong {
    background: #ffebee;
    border-color: #f44336;
}

/* Answer Feedback */
.answer-feedback {
    margin-top: 24px;
    padding: 18px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    display: none;
    border-radius: 4px;
}

.answer-feedback.correct {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.answer-feedback.wrong {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Next Button */
.next-button {
    margin-top: 24px;
    background: #333;
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    display: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.next-button:hover {
    background: #555;
}

.next-button.show {
    display: inline-block;
}

.progress-indicator {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #666;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Results Container */
.results-container {
    display: none;
    background: linear-gradient(135deg, #f9f9f9 0%, #fff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.score-display {
    font-size: 64px;
    color: #d32f2f;
    font-weight: bold;
    margin-bottom: 12px;
    font-family: Arial, sans-serif;
}

.score-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: #000;
}

.result-description {
    font-size: 19px;
    color: #333;
    margin-bottom: 30px;
    max-width: 800px; 
    margin-left: auto;
    margin-right: auto;
}

.retake-button {
    background: #888;
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    margin: 10px auto;
    display: inline-block;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: bold;
    text-transform: uppercase;
}

.retake-button:hover {
    background: #666;
}

/* Share Section */
.share-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.share-text {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.share-btn {
    padding: 12px 30px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    margin: 0 6px;
    font-family: Arial, sans-serif;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: bold;
}

.share-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* --- FIXED FOOTER (ПРИКЛЕЕННЫЙ К НИЗУ) --- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95); /* Белый фон с легкой прозрачностью (смотрится дорого) */
    padding: 12px 0; /* Делаем его компактным */
    border-top: 1px solid #e0e0e0;
    font-family: Arial, sans-serif;
    font-size: 12px; /* Уменьшили шрифт, чтобы не отвлекал */
    color: #666;
    text-align: center;
    z-index: 999; /* Поверх всего контента */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); /* Легкая тень сверху */
}

.footer-links {
    margin-bottom: 5px; /* Уменьшили отступ между ссылками и копирайтом */
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 12px;
    transition: color 0.2s ease;
}

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

/* ВАЖНО: Добавляем отступ для всего документа снизу, 
чтобы контент (например, кнопки шеринга) не прятался под приклеенным футером */
body {
    padding-bottom: 70px; 
}

/* Картинки внутри вопросов (Оставляем крупными) */
.question-image {
    width: 100%;
    height: auto;
    max-height: 480px; 
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

#answersContainer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 4fr));
    gap: 15px;
}

/* СТИЛИ ДЛЯ CPA БЛОКА В РЕЗУЛЬТАТАХ (IQ CHALLENGE Now) */
.iq-challenge-box { 
    background: #f9f9f9; 
    border: 1px solid #e0e0e0; 
    padding: 30px; 
    border-radius: 12px; 
    margin: 30px auto; 
    text-align: center;
    max-width: 800px;
}
.iq-challenge-box p { 
    margin-bottom: 20px; 
    font-size: 18px; 
    color: #333; 
    font-family: Georgia, serif;
}
.iq-challenge-button { 
    background: #4caf50; 
    color: white; 
    padding: 16px 35px; 
    border-radius: 4px; 
    text-decoration: none; 
    display: inline-block; 
    font-weight: bold; 
    font-family: Arial, sans-serif; 
    font-size: 18px; 
    text-transform: uppercase;
    transition: background 0.2s;
}
.iq-challenge-button:hover { 
    background: #43a047; 
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .container { padding: 25px; }
    h1 { font-size: 34px; }
    .start-button { padding: 18px 50px; font-size: 22px; }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-content { padding: 0 20px; }
    .container { padding: 20px; }
    h1 { font-size: 28px; }
    .article-meta { flex-wrap: wrap; gap: 10px; }
    .quiz-image img { max-height: 250px; }
    .quiz-intro { font-size: 17px; }
    .start-button-container { padding: 20px; }
    .start-button { padding: 16px 40px; font-size: 20px; width: 100%; }
    .question-text { font-size: 22px; }
    .answer-option { font-size: 16px; padding: 14px 18px; }
    .score-display { font-size: 48px; }
    #answersContainer { grid-template-columns: 1fr; } 
}

/* Large Desktop */
@media (min-width: 1440px) {
    .main-wrapper { max-width: 1040px; }
    .container { padding: 35px 48px; }
    h1 { font-size: 44px; }
    .quiz-image img { max-height: 380px; } 
    .quiz-intro { font-size: 20px; }
    .start-button { padding: 20px 70px; }
}