* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px;
}

/* Главная секция */
.hero-section {
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

.telegram-banner {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1em;
}

.instructions {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.instructions ol {
    margin-left: 20px;
    color: #555;
}

.instructions li {
    margin-bottom: 15px;
    line-height: 1.8;
}

.input-section {
    max-width: 800px;
    margin: 0 auto;
}

.url-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 20px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.url-input:focus {
    outline: none;
    border-color: #a73afd;
}

.radio-group {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1em;
    color: #555;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #a73afd;
}

.checkbox-group {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #a73afd;
}

.buttons-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-register {
    background: transparent;
    border: 2px solid #ff69b4;
    color: #ff69b4;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-register:hover {
    background: #ff69b4;
    color: white;
}

.btn-find {
    background: #a73afd;
    border: 2px solid #a73afd;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-find:hover {
    background: #8b2dd4;
    border-color: #8b2dd4;
}

.btn-find:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-find:disabled:hover {
    background: #ccc;
    border-color: #ccc;
}

.btn-new-search {
    background: #a73afd;
    border: 2px solid #a73afd;
    color: white;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-new-search:hover {
    background: #8b2dd4;
    border-color: #8b2dd4;
    transform: rotate(180deg);
}

.btn-new-search i {
    display: block;
}

.new-search-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Галерея */
#foundImagesTitle {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5em;
    color: #333;
    font-weight: 600;
}

#displayedImagesCount {
    margin-bottom: 10px;
}

.media-gallery-container {
    position: relative;
    margin-top: 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Чекбокс группировки в галерее */
.gallery-group-checkbox {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gallery-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.gallery-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #a73afd;
    flex-shrink: 0;
}

.gallery-checkbox-text {
    font-size: 0.95em;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
}

.gallery-checkbox-label:hover .gallery-checkbox-text {
    color: #a73afd;
}

.gallery-checkbox-label:active {
    opacity: 0.8;
}

.gallery-header-left h3 {
    margin: 0;
}

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

/* Кастомный select */
.custom-select {
    position: relative;
    min-width: 250px;
    max-width: 100%;
    z-index: 100;
    box-sizing: border-box;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95em;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    gap: 12px;
}

.custom-select-trigger:hover {
    border-color: #a73afd;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.custom-select.active .custom-select-trigger {
    border-color: #a73afd;
    box-shadow: 0 2px 12px rgba(0, 123, 255, 0.2);
}

.custom-select-value {
    flex: 1 1 auto;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.custom-select-arrow {
    font-size: 0.7em;
    color: #666;
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-block;
    width: auto;
    min-width: 12px;
    line-height: 1;
}

.custom-select.active .custom-select-arrow {
    transform: rotate(180deg);
    color: #a73afd;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #a73afd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
    z-index: 1000;
    padding: 4px 0;
}

.custom-select.active .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 300px;
}

.custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    color: #333;
    font-size: 0.95em;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    align-items: center;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: #f8f9fa;
    color: #a73afd;
}

.custom-select-option.selected {
    background: #e7f3ff;
    color: #a73afd;
    font-weight: 600;
}

.custom-select-option.selected::before {
    content: '✓';
    margin-right: 8px;
    font-weight: bold;
    color: #a73afd;
}

/* Анимация появления опций */
.custom-select.active .custom-select-option {
    animation: fadeInOption 0.3s ease forwards;
}

.custom-select.active .custom-select-option:nth-child(1) {
    animation-delay: 0.05s;
}

.custom-select.active .custom-select-option:nth-child(2) {
    animation-delay: 0.1s;
}

.custom-select.active .custom-select-option:nth-child(3) {
    animation-delay: 0.15s;
}

@keyframes fadeInOption {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-header h3 {
    font-size: 1.5em;
    color: #333;
}

.check18-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.check18-btn:hover {
    background: #c82333;
}

.check18-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.show-hot-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    white-space: nowrap;
}

.show-hot-btn:hover {
    background: #e55a2b;
}

.show-hot-btn.active {
    background: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

.download-archive-btn {
    background: #a73afd;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.download-archive-btn:hover {
    background: #8b2dd4;
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* Preloader */
.preloader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    margin-bottom: 20px;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #a73afd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.preloader-text {
    font-size: 1em;
    color: #666;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
}

.preloader-stop-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.preloader-stop-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.preloader-stop-btn:active {
    transform: translateY(0);
}

.preloader-stop-btn i {
    font-size: 0.9em;
}

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

/* Archive Preloader Overlay */
.archive-preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.archive-preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.archive-preloader-content .preloader-spinner {
    margin-bottom: 20px;
}

.archive-preloader-content .preloader-text {
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.media-item:hover {
    transform: scale(1.05);
}

.media-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.media-item {
    position: relative;
}

/* Контейнер для badge в одну строку */
.media-item-type-container {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
    z-index: 10;
}

.media-item-type {
    background: #a73afd;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75em;
    font-weight: bold;
    white-space: nowrap;
    display: inline-block;
    position: relative;
}

.media-item-hot {
    background: rgba(255, 69, 0, 0.9) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* HOT badge в миниатюрах галереи */
.gallery-thumbnail {
    position: relative;
}

.gallery-thumbnail .thumbnail-hot-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 69, 0, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Секция статистики */
.stats-section {
    margin: 40px 0;
    padding: 40px 0;
    border-radius: 20px;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #a73afd 0%, #a73afde6 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.stat-card-today::before {
    background: linear-gradient(90deg, #764ba2 0%, #764ba2 100%);
}

.stat-card-total::before {
    background: linear-gradient(90deg, #764ba2 0%, #764ba2 100%);
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 20px;
    opacity: 0.8;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.95em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    font-weight: 600;
}

.stat-value {
    font-size: 3em;
    font-weight: 800;
    color: #333;
    line-height: 1;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8b2dd4 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stat-value-large {
    font-size: 4em;
    font-weight: 800;
    color: #333;
    line-height: 1;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #8b2dd4 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stat-growth {
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.stat-growth.growth-positive {
    color: #28a745;
}

.stat-growth.growth-positive::before {
    content: '↑';
    font-size: 1.2em;
}

.stat-growth.growth-negative {
    color: #dc3545;
}

.stat-growth.growth-negative::before {
    content: '↓';
    font-size: 1.2em;
}

.stat-growth.growth-neutral {
    color: #6c757d;
}

.stat-growth.growth-neutral::before {
    content: '→';
    font-size: 1.2em;
}

.stat-sublabel {
    font-size: 0.9em;
    color: #999;
    margin-top: 8px;
}

/* Анимация обновления статистики */
.stat-value.stat-updated,
.stat-value-large.stat-updated {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Секция отзывов */
.reviews-section {
    margin-bottom: 80px;
    text-align: center;
}

.reviews-section h2 {
    font-size: 2em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.reviews-subtitle {
    color: #666;
    margin-bottom: 40px;
    font-size: 1em;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.review-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.quote-icon {
    font-size: 3em;
    color: #333;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 15px;
    opacity: 0.3;
}

.review-text {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.review-author {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.review-category {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.review-stars {
    color: #ffc107;
    font-size: 1.2em;
}

.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
}

.dot.active {
    background: #333;
}

/* FAQ секция */
.faq-section {
    margin-bottom: 80px;
    background: #f8f9fa;
    padding: 60px 40px;
    border-radius: 15px;
}

.faq-subtitle {
    text-align: center;
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.faq-section h2 {
    text-align: center;
    font-size: 2em;
    font-weight: 700;
    color: #333;
    margin-bottom: 50px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item h3 {
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.faq-item p {
    color: #555;
    line-height: 1.8;
    font-size: 0.95em;
}

/* Секция проекта */
.project-section {
    margin-bottom: 80px;
}

.project-section h2 {
    font-size: 2em;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.project-content {
    color: #555;
    line-height: 1.8;
    font-size: 1em;
    margin-bottom: 40px;
}

.project-content p {
    margin-bottom: 20px;
}

.btn-download {
    background: transparent;
    border: 2px solid #ff69b4;
    color: #ff69b4;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    display: block;
    margin: 0 auto;
}

.btn-download:hover {
    background: #ff69b4;
    color: white;
}

/* Футер */
.main-footer {
    border-top: 1px solid #eee;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9em;
}

.footer-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-right a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-right a:hover {
    color: #333;
}

.footer-right span {
    color: #ccc;
}

/* Модальное окно галереи */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.gallery-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.gallery-close:hover {
    color: #ff69b4;
}

.gallery-download {
    position: absolute;
    top: 70px;
    right: 35px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.gallery-download:hover {
    color: #ff69b4;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    padding: 20px;
    user-select: none;
    transition: color 0.3s;
}

.gallery-nav:hover {
    color: #ff69b4;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

#galleryImage {
    max-width: 100%;
    max-height: calc(90vh - 200px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.gallery-info {
    position: absolute;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10002;
}

/* Список миниатюр из того же отзыва */
.gallery-thumbnails-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 50px;
    max-height: 150px;
    overflow: hidden;
    border-radius: 8px;
    margin-top: 20px;
    position: relative;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    min-height: 100px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gallery-thumbnails-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    z-index: 10003;
    transition: all 0.3s;
    user-select: none;
}

.gallery-thumbnails-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-thumbnails-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-thumbnails-nav-left {
    left: 10px;
}

.gallery-thumbnails-nav-right {
    right: 10px;
}

.gallery-thumbnails-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-thumbnails-nav:disabled:hover {
    transform: translateY(-50%) scale(1);
    background: rgba(255, 255, 255, 0.9);
}

.gallery-thumbnail {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.gallery-thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
    border-color: #ff69b4;
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: #a73afd;
    border-width: 3px;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Alerts */
#alertContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert .btn-close {
    float: right;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0.5;
}

.alert .btn-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 968px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 1.8em;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .buttons-group {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gallery-header-left,
    .gallery-header-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .custom-select {
        width: 100%;
        min-width: auto;
    }
    
    .download-archive-btn {
        width: 100%;
    }
}

/* Стили для авторизации */
.auth-panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.auth-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-text {
    font-size: 1.5em;
    font-weight: 700;
    color: #a73afd;
    letter-spacing: 1px;
}

.auth-info {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.auth-info span {
    font-size: 0.95em;
    color: #666;
}

#authStatus {
    font-weight: 600;
    color: #333;
}

#articleLimitInfo {
    color: #a73afd;
    font-weight: 500;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-auth {
    background: #a73afd;
    border: 2px solid #a73afd;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-sizing: border-box;
    min-height: 38px;
    line-height: 1.4;
    vertical-align: middle;
    text-align: center;
    font-family: inherit;
}

.btn-auth:hover {
    background: #8b2dd4;
    border-color: #8b2dd4;
    color: white;
}

/* Модальное окно авторизации */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.auth-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.auth-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-modal-close:hover {
    color: #333;
}

.auth-modal-content h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.auth-form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #a73afd;
}

.captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-container input {
    flex: 1;
}

.captcha-container img {
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 6px;
    height: 50px;
    transition: border-color 0.3s ease;
}

.captcha-container img:hover {
    border-color: #a73afd;
}

.auth-form-error {
    color: #dc3545;
    font-size: 0.9em;
    margin-bottom: 15px;
    min-height: 20px;
    display: none;
}

.auth-form-error.show {
    display: block;
}

.btn-auth-submit {
    width: 100%;
    background: #a73afd;
    border: 2px solid #a73afd;
    color: white;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-auth-submit:hover {
    background: #8b2dd4;
    border-color: #8b2dd4;
}

.btn-auth-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .auth-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .auth-buttons {
        width: 100%;
    }
    
    .btn-auth {
        flex: 1;
    }
    
    .auth-modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}

/* Стили для красивого alert о превышении лимита */
.limit-alert-wrapper {
    background: linear-gradient(135deg, rgba(167, 58, 253, 0.1) 0%, rgba(167, 58, 253, 0.05) 100%);
    border: 2px solid #a73afd;
    border-radius: 12px;
    padding: 20px 25px;
    box-shadow: 0 4px 20px rgba(167, 58, 253, 0.2);
    animation: slideDown 0.3s ease-out;
    margin-bottom: 20px;
}

.limit-alert-wrapper.limit-alert-info {
    background: linear-gradient(135deg, rgba(167, 58, 253, 0.1) 0%, rgba(167, 58, 253, 0.05) 100%);
    border-color: #a73afd;
    box-shadow: 0 4px 20px rgba(167, 58, 253, 0.2);
}

.limit-alert-wrapper.limit-alert-info .limit-alert-title {
    color: #a73afd;
}

.limit-alert-wrapper.limit-alert-info .limit-alert-title::before {
    content: "ℹ️";
}

.limit-alert-wrapper.limit-alert-info .limit-alert-message {
    color: #a73afd;
}

.limit-alert-wrapper.limit-alert-info .limit-alert-message strong {
    color: #8b2dd4;
}

.limit-alert-content {
    width: 100%;
}

.limit-alert-title {
    font-size: 20px;
    font-weight: 700;
    color: #a73afd;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.limit-alert-title::before {
    content: "⚠️";
    font-size: 24px;
}

.limit-alert-message {
    font-size: 15px;
    color: #a73afd;
    line-height: 1.6;
    margin-bottom: 0;
}

.limit-alert-message strong {
    color: #8b2dd4;
    font-weight: 600;
}

.limit-alert-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.limit-alert-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.limit-alert-btn i {
    font-size: 16px;
}

.limit-alert-btn-primary {
    background: linear-gradient(135deg, #a73afd 0%, #8b2dd4 100%);
    color: white;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.limit-alert-btn-primary:hover {
    background: linear-gradient(135deg, #8b2dd4 0%, #7a25c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 58, 253, 0.4);
}

.limit-alert-btn-primary:active {
    transform: translateY(0);
}

.limit-alert-btn-secondary {
    background: white;
    color: #a73afd;
    border: 2px solid #a73afd;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.limit-alert-btn-secondary:hover {
    background: #a73afd;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 58, 253, 0.3);
}

.limit-alert-btn-secondary:active {
    transform: translateY(0);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .limit-alert-wrapper {
        text-align: center;
        padding: 18px;
    }
    
    .limit-alert-title {
        justify-content: center;
    }
    
    .limit-alert-buttons {
        flex-direction: column;
    }
    
    .limit-alert-btn {
        width: 100%;
        min-width: auto;
    }
}
