/* Основные стили для детской энциклопедии о ледоколах */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(180deg, #e0f7ff 0%, #b3e0ff 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
    background-size: 50px 50px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Шапка сайта */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 0;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.header-content {
    position: relative;
    z-index: 2;
}

.logo {
    text-align: center;
    padding: 20px 0;
}

.logo-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

.logo h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.8rem;
    margin-bottom: 5px;
    text-shadow: 3px 3px 0 #0a1f44;
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 1.5rem;
    color: #a3d5ff;
    font-weight: bold;
}

.header-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
}

.wave {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.wave1 {
    height: 25px;
    animation: waveMove 15s linear infinite;
}

.wave2 {
    height: 20px;
    bottom: 5px;
    animation: waveMove 12s linear infinite reverse;
    opacity: 0.7;
}

.wave3 {
    height: 15px;
    bottom: 10px;
    animation: waveMove 10s linear infinite;
    opacity: 0.5;
}

.iceberg {
    position: absolute;
    bottom: 0;
    right: 10%;
    width: 40px;
    height: 60px;
    background: white;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    opacity: 0.8;
    animation: icebergFloat 20s ease-in-out infinite;
}

/* Навигация по вкладкам */
.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #1e3c72;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: #ffeb3b;
    color: #1a237e;
}

.tab-btn.active {
    background: #1e3c72;
    color: white;
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
}

.tab-btn i {
    font-size: 1.5rem;
}

/* Основное содержимое */
.main-content {
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px dashed #4a9eff;
}

.section-header h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 10px;
}

.section-header h2 i {
    margin-right: 15px;
    color: #4a9eff;
}

.section-subtitle {
    font-size: 1.3rem;
    color: #666;
}

/* Карточки ледоколов */
.icebreaker-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.icebreaker-card {
    background: #f8fbff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #c3e0ff;
}

.icebreaker-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.card-image {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.ship-animation {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    height: 100px;
}

.ship-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 60px;
    background: #ff6b6b;
    border-radius: 10px 10px 0 0;
    animation: shipMove 6s ease-in-out infinite;
}

.ship-smoke {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    opacity: 0.7;
    animation: smoke 3s ease-in-out infinite;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #1e3c72;
    margin-bottom: 5px;
}

.card-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.card-details p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.info-btn {
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    width: 100%;
}

.info-btn:hover {
    background: #1e3c72;
    transform: scale(1.05);
}

/* Интересный факт */
.fun-fact {
    background: linear-gradient(135deg, #ffeb3b, #ff9800);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    animation: pulse 2s infinite;
}

.fact-icon {
    font-size: 3rem;
}

.fact-text h4 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #1a237e;
}

.fact-text p {
    font-size: 1.2rem;
    color: #333;
}

/* Таймлайн истории */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: #4a9eff;
    border-radius: 3px;
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: #1e3c72;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    z-index: 1;
    width: 120px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    background: #f0f8ff;
    border-radius: 20px;
    padding: 20px;
    width: calc(50% - 80px);
    margin: 0 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #c3e0ff;
}

.timeline-content h3 {
    font-family: 'Fredoka One', cursive;
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.timeline-image-placeholder {
    height: 100px;
    background: linear-gradient(135deg, #a3d5ff, #4a9eff);
    border-radius: 10px;
    margin-top: 15px;
}

/* Галерея */
.history-gallery {
    margin-top: 40px;
}

.gallery {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.gallery-item {
    text-align: center;
    width: 200px;
}

.gallery-img {
    height: 150px;
    border-radius: 15px;
    margin-bottom: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.05);
}

.gallery-item p {
    font-weight: bold;
    color: #1e3c72;
}

/* Диаграмма строения ледокола */
.ship-diagram {
    background: #f0f8ff;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 3px dashed #4a9eff;
}

.diagram-container {
    position: relative;
    height: 500px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    overflow: hidden;
}

.scheme-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.scheme-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    z-index: 1;
    position: relative;
}

.scheme-point {
    position: absolute;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.3s ease;
    width: 32px;
    height: 32px;
    display: block !important;
}

.scheme-point:hover {
    transform: scale(1.1);
}

.point-marker {
    width: 32px;
    height: 32px;
    background-color: #ff3b3b;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 11;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.point-label {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e3c72;
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 12;
}

.point-description {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #333;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 12;
}

.scheme-point:hover .point-label,
.scheme-point:hover .point-description {
    opacity: 1;
}

/* Старые стили для совместимости (можно удалить, если не используются) */
.diagram-part {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    width: 18%;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    z-index: 2;
}

.diagram-part:hover {
    background: white;
    transform: translateY(-10px);
    border-color: #ffeb3b;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.part-label {
    font-family: 'Fredoka One', cursive;
    color: #1e3c72;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.part-desc {
    font-size: 0.9rem;
    color: #666;
}

/* Информационные карточки */
.structure-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-top: 5px solid #4a9eff;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-10px);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.info-card h3 {
    font-family: 'Fredoka One', cursive;
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Игры и факты */
.game-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .game-container {
        grid-template-columns: 1fr;
    }
}

.game {
    background: #f0f8ff;
    border-radius: 20px;
    padding: 25px;
    border: 3px solid #c3e0ff;
}

.drag-game {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.drag-parts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 40%;
}

.drag-item {
    background: #4a9eff;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    cursor: move;
    font-family: 'Fredoka One', cursive;
    transition: all 0.3s ease;
    user-select: none;
}

.drag-item:hover {
    background: #1e3c72;
    transform: scale(1.05);
}

.drop-zone {
    width: 60%;
    background: white;
    border-radius: 15px;
    border: 3px dashed #4a9eff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.ship-scheme {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    opacity: 0.8;
}

.drop-targets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.drop-target {
    position: absolute;
    border: 2px dashed transparent;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.drop-target.highlight {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

.drop-target.correct {
    border-color: #4caf50;
    background-color: rgba(76, 175, 80, 0.3);
}

.drop-target.incorrect {
    border-color: #f44336;
    background-color: rgba(244, 67, 54, 0.3);
}

.game-btn {
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.game-btn:hover {
    background: #f57c00;
    transform: scale(1.05);
}

.facts {
    background: #fff9e6;
    border-radius: 20px;
    padding: 25px;
    border: 3px solid #ffeb3b;
}

.fact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ffd54f;
}

.fact-number {
    background: #ff9800;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Викторина */
.quiz {
    background: #e8f5e9;
    border-radius: 20px;
    padding: 25px;
    border: 3px solid #4caf50;
}

.quiz-question {
    margin-bottom: 20px;
}

.quiz-question p {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 600px) {
    .quiz-options {
        grid-template-columns: 1fr;
    }
}

.quiz-option {
    background: white;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 15px;
    font-family: 'Comic Neue', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: #c8e6c9;
    transform: scale(1.03);
}

.quiz-option.correct {
    /* Стили будут применены через JavaScript после выбора ответа */
}

.quiz-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    text-align: center;
    font-size: 1.2rem;
    display: none;
}

/* Дополнительные стили для расширенной викторины */
.quiz-stats {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #4caf50;
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
}

.quiz-stats span {
    color: #1e3c72;
    font-size: 1.4rem;
}

.quiz-questions {
    margin-bottom: 25px;
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
}

.question-result {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    display: none;
    font-size: 1.1rem;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
    padding: 15px;
    background: white;
    border-radius: 15px;
    border: 2px solid #4caf50;
}

.quiz-counter {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #1e3c72;
    font-weight: bold;
}

#prevQuestion, #nextQuestion {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

#prevQuestion:disabled, #nextQuestion:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

#prevQuestion:hover:not(:disabled), #nextQuestion:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

#resetQuiz {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto 0;
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.4);
}

#resetQuiz:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.6);
}

.quiz-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Подвал */
.footer {
    background: linear-gradient(135deg, #1e3c72 0%, #0a1f44 100%);
    color: white;
    padding: 40px 0 20px;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #a3d5ff;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a:hover {
    color: #ffeb3b;
}

.footer-credits {
    text-align: center;
    grid-column: 1 / -1;
}

.copyright {
    margin-top: 10px;
    color: #a3d5ff;
    font-size: 0.9rem;
}

.footer-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
}

.wave-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50% 50% 0 0;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 30px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

.modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 30px;
}

.modal-ship {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #4a9eff, #1e3c72);
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.modal-ship::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #ff6b6b;
    border-radius: 10px 10px 0 0;
}

.modal-body h3 {
    font-family: 'Fredoka One', cursive;
    color: #1e3c72;
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-details {
    margin-top: 20px;
    background: #f0f8ff;
    padding: 20px;
    border-radius: 15px;
}

.modal-details p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Стили для расширенного модального окна */
.expanded-modal {
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 10px;
}

.modal-left {
    flex: 1;
    min-width: 300px;
}

.modal-right {
    flex: 1;
    min-width: 300px;
}

.modal-ship-image {
    width: 100%;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #4a9eff, #1e3c72);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-ship-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-basic-info h3 {
    font-family: 'Fredoka One', cursive;
    color: #1e3c72;
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.modal-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.stat {
    display: flex;
    align-items: center;
    background: #f0f8ff;
    padding: 15px;
    border-radius: 12px;
    border-left: 5px solid #4a9eff;
}

.stat-icon {
    font-size: 1.8rem;
    margin-right: 12px;
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-text strong {
    color: #555;
    font-size: 0.9rem;
}

.stat-text span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1e3c72;
}

.modal-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #5cb85c;
}

.modal-section h4 {
    font-family: 'Fredoka One', cursive;
    color: #2a5298;
    font-size: 1.4rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.modal-section h4 i {
    margin-right: 10px;
    color: #4a9eff;
}

.modal-section p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #444;
}

.modal-fun {
    background: linear-gradient(135deg, #fff9c4, #ffecb3);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    border-left: 5px solid #ff9800;
}

.fun-icon {
    font-size: 3rem;
    margin-right: 20px;
}

.modal-fun p {
    font-size: 1.1rem;
    color: #5d4037;
    font-style: italic;
}

/* Видео-контейнер в модальном окне */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 соотношение сторон */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    margin-bottom: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Анимации */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@keyframes icebergFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(0) rotate(0); }
    75% { transform: translateY(-5px) rotate(-2deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes shipMove {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes smoke {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.7; }
    50% { transform: translateX(-50%) scale(1.2); opacity: 0.4; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .logo-subtitle {
        font-size: 1.2rem;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .icebreaker-cards {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
    }
    
    .timeline-year {
        width: 80px;
        font-size: 1.2rem;
        margin-right: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 120px);
    }
    
    .diagram-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }
    
    .diagram-part {
        width: 90%;
    }
    
    .game-container {
        grid-template-columns: 1fr;
    }
    
    .drag-game {
        flex-direction: column;
    }
    
    .drag-parts, .drop-zone {
        width: 100%;
    }
}

/* Эффекты для детского стиля */
::selection {
    background: #ffeb3b;
    color: #1e3c72;
}

/* Добавим снежинки для атмосферы */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 1rem;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Пузырьки в воде */
.bubble {
    position: fixed;
    bottom: -50px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-50vh) scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) scale(0.8);
        opacity: 0;
    }
}

/* Плавающие льдины */
.floating-ice {
    position: absolute;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 1;
    pointer-events: none;
    animation: iceFloat linear infinite;
}

@keyframes iceFloat {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(20px) translateY(-10px) rotate(5deg);
    }
    50% {
        transform: translateX(0) translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateX(-20px) translateY(-10px) rotate(-5deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

/* Анимация для кнопок при нажатии */
.tab-btn:active, .info-btn:active, .game-btn:active, .quiz-option:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* Анимация появления элементов при прокрутке */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация для иконок в карточках */
.card-image:hover .ship-animation {
    animation-play-state: paused;
}

.card-image:hover .ship-body {
    background: #ff5252 !important;
    transition: background 0.3s ease;
}

/* Мигающая анимация для привлечения внимания */
.blink {
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Анимация вращения для иконок */
.spin {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Эффект "волны" при наведении на кнопки */
.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.wave-effect:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Анимация для появления модального окна */
@keyframes modalAppear {
    0% {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-content {
    animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Анимация для успешного действия */
.success-animation {
    animation: success 0.6s ease;
}

@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Анимация для ошибки */
.error-shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Стили для секции "Книги о ледоколах" */
.books-intro {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-size: 1.2rem;
    line-height: 1.6;
    color: #444;
}

.books-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

.book-card {
    display: flex;
    flex-wrap: wrap;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.book-image {
    flex: 0 0 250px;
    max-width: 250px;
    height: 300px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-content {
    flex: 1;
    padding: 25px;
    min-width: 300px;
}

.book-content h3 {
    font-family: 'Fredoka One', cursive;
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 1.8rem;
    line-height: 1.3;
}

.book-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
    font-size: 1.1rem;
}

.book-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.book-links a {
    display: inline-block;
    background: #2a5298;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.book-links a:hover {
    background: #1e3c72;
    transform: scale(1.05);
}

.books-note {
    background: #e0f7ff;
    border-left: 5px solid #2a5298;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #1e3c72;
    margin-top: 30px;
}

/* Адаптивность для книг */
@media (max-width: 768px) {
    .book-card {
        flex-direction: column;
    }
    
    .book-image {
        flex: 0 0 auto;
        max-width: 100%;
        height: 250px;
    }
    
    .book-content {
        min-width: auto;
    }
    
    .book-content h3 {
        font-size: 1.5rem;
    }
}