body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 30px auto;
    line-height: 1.7;
    padding: 0 20px;
    color: #555;
    background-color: #fff9f0;
}

h1,
h2,
h3 {
    color: #d87000;
    margin-bottom: 10px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    padding: 2px 6px;
    border-radius: 16px;
    border: 1px solid #ffdab3;
    font-size: 0.78em;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(255, 140, 0, 0.08);
}

.lang-link {
    color: #b07830;
    text-decoration: none;
    padding: 1px 6px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.lang-link:hover {
    color: #d87000;
    background-color: #fff8eb;
}

.lang-link.active {
    color: #ffffff;
    background-color: #ff9900;
}

.lang-divider {
    color: #ffdab3;
}

.site-logo {
    width: 42px;
    height: auto;
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
}

h1.main-title {
    font-size: 1.18em;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    margin: 0;
}

h3 {
    font-weight: normal;
    text-align: center;
}

.upload-form {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.08);
    border: 1px solid #ffdab3;
}

.result {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.08);
    border: 1px solid #ffdab3;
    margin-top: 25px;
}

.result h2 {
    font-size: 1.25em;
    margin-top: 0;
}

.file-info {
    background: #fff8eb;
    padding: 15px 20px;
    border: 1px solid #ffdab3;
    border-left: 4px solid #ff9900;
    border-radius: 8px;
    margin-top: 15px;
}

.file-info strong {
    color: #d87000;
}

label {
    color: #d87000;
    margin-bottom: 6px;
    display: block;
}

input[type="file"] {
    width: 100%;
    padding: 20px 24px;
    border: 1px solid #e0b589;
    border-radius: 6px;
    background-color: #fff8eb;
    box-sizing: border-box;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    padding: 8px 16px;
    border: 1px solid #e0b589;
    border-radius: 5px;
    background-color: #ffffff;
    color: #d87000;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
    transition: background 0.2s, border-color 0.2s;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #fff8eb;
    border-color: #ff9900;
}

button {
    background-color: #ff9900;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease;
}

button:hover {
    background-color: #e08900;
}

button.loading {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.8;
}

button:disabled {
    cursor: not-allowed;
}

/* Крупный вывод счётчика */
.shutter-hero {
    text-align: center;
    margin: 16px 0 20px;
    padding: 30px 20px;
    background-color: #fff8eb;
    border-radius: 8px;
    border: 1px dashed #ff9900;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    flex-wrap: wrap;
}

.shutter-hero-item {
    display: inline-block;
    text-align: center;
}

.shutter-number {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #e08900;
    line-height: 1.1;
}

.shutter-label {
    display: block;
    font-size: 0.95em;
    color: #a06000;
    margin-top: 4px;
}

/* Кнопка "Проверить другой файл" */
.btn-again {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #ff9900;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn-again:hover {
    background-color: #e08900;
    color: #fff;
}

/* Блок ошибки загрузки */
.upload-error {
    background: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 10px;
    padding: 16px 20px;
    color: #c0392b;
    margin-bottom: 20px;
}

/* Превью файла в drop-зоне */
.preview-img {
    max-width: 120px;
    max-height: 120px;
    margin: 10px auto 4px;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.preview-icon {
    font-size: 2.5em;
    margin: 8px auto 0;
    text-align: center;
    position: relative;
    display: inline-block;
}

.preview-ext {
    position: absolute;
    bottom: -2px;
    right: -8px;
    font-size: 0.28em;
    background: #ff9900;
    color: #fff;
    border-radius: 3px;
    padding: 1px 3px;
    font-weight: 700;
    line-height: 1.4;
}

.preview-name {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
    word-break: break-all;
    text-align: center;
}

/* ─── Мобильный адаптив ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    body {
        margin: 16px auto;
        padding: 0 12px;
    }

    h1.main-title {
        font-size: 1.05em;
        line-height: 1.35;
    }

    h3 {
        font-size: 1.1em;
        line-height: 1.4;
    }

    .upload-form {
        padding: 16px;
    }

    #drop-area {
        padding: 18px 12px;
    }

    button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .btn-again {
        display: block;
        text-align: center;
    }

    .shutter-hero {
        padding: 20px 10px;
    }

    .shutter-number {
        font-size: 2.2em;
    }

    .result {
        padding: 14px;
    }

    .file-info {
        padding: 12px 14px;
    }

    .info-text {
        font-size: 0.88em;
    }

    ul {
        padding-left: 14px;
    }

    input[type="file"] {
        font-size: 14px;
    }

    .upload-error {
        padding: 12px 14px;
    }
}

.info-text {
    font-size: 0.92em;
    color: #666;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ffcc99;
}

ul {
    padding-left: 20px;
    margin-top: 10px;
}

li {
    margin-bottom: 6px;
}

#drop-area {
    border: 1px dashed #ff9900;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    background-color: #fff8eb;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

#drop-area.highlight {
    border-color: #e08900;
    background-color: #fff0d6;
}

#drop-area p {
    margin: 10px 0;
    color: #d87000;
}

#file-list {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

#file-list img {
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
    display: block;
}

.upload-options {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-direction: column;
    width: 100%;
}

.or-divider {
    margin: 10px 0;
    color: #d87000;
    font-weight: bold;
    text-align: center;
}

/* Ссылки "искать в Google" и "Узнать цену на eBay" рядом с моделью камеры */
.google-search-link,
.ebay-search-link {
    font-size: 0.78em;
    color: #e08900;
    text-decoration: none;
    border-bottom: 1px dotted #e08900;
    margin-left: 8px;
    white-space: nowrap;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.google-search-link:hover,
.ebay-search-link:hover {
    opacity: 1;
    border-bottom-style: solid;
}

/* Футер сайта */
.site-footer {
    margin-top: 45px;
    padding-top: 12px;
    border-top: 1px dashed #ffcc99;
    font-size: 0.92em;
    color: #b07830;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copyright {
    color: #b07830;
}

.footer-author {
    color: #d87000;
    font-weight: 600;
}

/* ─── SEO FAQ блок ─────────────────────────────────────────────────────────── */
.seo-faq {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #ffcc99;
}

.seo-faq h2 {
    font-size: 1.25em;
    font-weight: 600;
    color: #d87000;
    margin-bottom: 15px;
}

.faq-item {
    margin-bottom: 16px;
}

.faq-item h3 {
    font-size: 1.02em;
    font-weight: 600;
    color: #b05800;
    text-align: left;
    margin-bottom: 4px;
    padding-left: 10px;
}

.faq-item p {
    margin: 0;
    line-height: 1.6;
    color: #555;
    text-indent: 10px;
}

/* ─── Стили для раздела статей ───────────────────────────────────────────── */
.footer-articles-link {
    color: #e08900;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s, border-bottom 0.2s;
}

.footer-articles-link:hover {
    color: #d87000;
    text-decoration: underline;
}

.article-container {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.08);
    border: 1px solid #ffdab3;
    margin-top: 15px;
}

.article-card:hover {
    box-shadow: 0 3px 10px rgba(255, 140, 0, 0.15);
    border-color: #ff9900 !important;
}

.article-title-h1 {
    color: #d87000;
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.35;
}

.article-content h2 {
    font-size: 1.08em;
    font-weight: 600;
    color: #d87000;
    margin-top: 20px;
    margin-bottom: 8px;
}

.article-content h3 {
    font-size: 0.98em;
    font-weight: 600;
    color: #b05800;
    text-align: left;
    margin-top: 16px;
    margin-bottom: 6px;
}

.article-content p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.article-content ul,
.article-content ol {
    margin-bottom: 18px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 6px;
}

/* ─── Стили для пагинации статей ─────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 6px 14px;
    background: #fff8eb;
    border: 1px solid #ffdab3;
    color: #e08900;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.2s ease-in-out;
}

.page-link:hover {
    background: #ffecdb;
    border-color: #ff9900;
    color: #d87000;
}

.page-link.active {
    background: #ff9900;
    border-color: #d87000;
    color: #fff;
    cursor: default;
}