/* Обнуляем отступы и фиксируем высоту экрана */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f8f9fa;
    color: #212529;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}
header {
    background-color: #ffffff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 10;
    height: 60px; /* Фиксированная высота шапки */
    box-sizing: border-box;
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-link {
    text-decoration: none;
}
.logo {
    font-weight: bold;
    font-size: 1.1rem;
    color: #212529;
}
.nav-link {
    color: #505050;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-link:hover {
    color: #3372d3;
}
.github-link {
    gap: 5px;
}
.github-logo, .nav-icon {
    color: #505050;
    transition: color 0.2s;
    flex-shrink: 0;
}
.nav-link:hover .github-logo, 
.nav-link:hover .nav-icon {
    color: #3372d3;
}
.btn-download {
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-download:hover {
    background-color: #1651a8;
}
/* Главный контейнер теперь занимает ВСЁ оставшееся пространство экрана */
.main-content {
    flex: 1;
    position: relative;
    background-color: #f8f9fa;
}
/* Растягиваем галерею на всю доступную область */
#image-gallery {
    width: 100%;
    height: calc(100vh - 60px);
}
/* Стили самого плагина Viewer.js */
.viewer-container {
    background-color: #f8f9fa !important;
}
.viewer-prev, .viewer-next, .viewer-play, .viewer-fullscreen {
    display: none !important;
}
/* Стили для страницы инструкции и главной */
.scrollable {
    overflow-y: auto !important;
}
.instruction-page .main-content, .home-page .main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
}
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Landing content styles */
.landing-content {
    text-align: center;
}
.landing-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #212529;
}
.landing-content h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #212529;
}
.lead {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 40px;
    line-height: 1.6;
}
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
    text-align: left;
}
@media (max-width: 992px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
    }
}
.feature-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}
.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.feature-icon {
    color: #0d6efd;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.feature-card h3 {
    margin: 0;
    color: rgb(19 19 19 / 0.71);
    font-size: 1.2rem;
}
.feature-card p {
    color: #495057;
    line-height: 1.5;
    font-size: 0.95rem;
    margin-bottom: 0;
}
.cta-section {
    margin: 40px 0px;
}
.cta-section .btn-download {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.demo-image-container {
    margin-top: 30px;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}
.demo-image {
    width: 100%;
    display: block;
    height: auto;
}

.step {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}
.step h3 {
    margin-top: 0;
    color: #0d6efd;
}
pre {
    background-color: #f1f3f5;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #dee2e6;
}
code {
    font-family: 'Courier New', Courier, monospace;
    color: #212529;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}
pre code {
    padding: 0;
    border: none;
    background-color: transparent;
}
.text-link {
    color: #0d6efd;
    text-decoration: none;
}
.text-link:hover {
    text-decoration: underline;
}
.viewer-toolbar {
    bottom: 20px !important;
}

/* Стили для лоадера */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 120px);
    text-align: center;
    color: #6c757d;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #dee2e6;
    border-top: 5px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loader-container h2 {
    color: #212529;
    margin-bottom: 10px;
}

.footer {
    padding: 20px 0;
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}