/* Подключаем кастомный шрифт */
@font-face {
    font-family: 'CustomFont';
    src: url('font.ttf') format('truetype'),
         url('font.otf') format('opentype'),
         url('font.woff') format('woff'),
         url('font.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333333;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background-color: #f8f8f8;
    border: 2px dashed #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #999;
    font-size: 12px;
    text-align: center;
    padding: 5px;
    display: none;
}

.company-name {
    font-family: 'CustomFont', 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #000000;
    font-weight: 700;
    letter-spacing: 1px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.link-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: #d0d0d0;
}

/* Скрываем drag-handle на главной странице */
.link-card .drag-handle {
    display: none;
}

.icon {
    font-size: 2.2rem;
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f8f8;
}

.link-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #000000;
}

.btn {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    border: 1px solid #000000;
}

.btn:hover {
    background: #ffffff;
    color: #000000;
}

/* Заголовок игры */
.game-title-section {
    text-align: center;
    margin: 60px 0 40px 0;
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.game-title {
    font-family: 'CustomFont', 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #000000;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.game-subtitle {
    font-size: 1.4rem;
    color: #666;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

/* Карусель секция для мобильных устройств */
.carousel-section {
    margin: 40px 0 40px 0;
    width: 100%;
    display: block;
}

/* Карусель секция для десктопов */
.carousel-section-desktop {
    display: block;
}

/* Основная секция с каруселью и текстом */
.main-content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 40px 0 60px 0;
    align-items: start;
}

/* Карусель изображений */
.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f8f8f8;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-image {
    transform: scale(1.02);
}

.carousel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-container:hover .carousel-control {
    opacity: 1;
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.9);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.carousel-container:hover .carousel-dots {
    opacity: 1;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Модальное окно для увеличенного изображения */
.zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.zoom-modal.active {
    display: flex;
}

.zoom-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: white;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.zoom-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2001;
}

.zoom-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Стрелки для увеличенного изображения */
.zoom-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 2001;
}

.zoom-control:hover {
    background: rgba(0, 0, 0, 0.9);
}

.zoom-control.prev {
    left: 20px;
}

.zoom-control.next {
    right: 20px;
}

/* Точки для увеличенного изображения */
.zoom-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2001;
}

.zoom-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-dot.active {
    background: white;
    transform: scale(1.2);
}

.zoom-dot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Секция с текстом */
.text-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-text {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #000000;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #000000;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.about-text ul {
    margin: 15px 0;
    padding-left: 20px;
}

.about-text li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.about-text strong {
    color: #000000;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 20px;
    color: #999999;
    font-size: 0.9rem;
    border-top: 1px solid #f0f0f0;
}

/* Скрытая админ-панель */
.admin-panel {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: none;
    background: rgba(51, 51, 51, 0.9);
    padding: 10px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.admin-btn {
    background: #333;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 2px;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #555;
}

.admin-btn.active {
    background: #000000;
}

/* Окно ввода пароля */
.password-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1002;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.password-modal.active {
    display: flex;
}

.password-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: zoomIn 0.3s ease;
    position: relative;
}

.password-content h3 {
    font-family: 'CustomFont', 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #000000;
}

.password-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.password-input:focus {
    outline: none;
    border-color: #000000;
}

.password-btn {
    background: #000000;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.password-btn:hover {
    background: #333333;
}

.password-cancel {
    background: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.3s ease;
}

.password-cancel:hover {
    background: #f8f8f8;
}

.password-error {
    color: #ff4444;
    margin-top: 10px;
    font-size: 0.9rem;
    display: none;
}

/* Окно статистики */
.stats-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.stats-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.stats-header h3 {
    font-family: 'CustomFont', 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #000000;
}

.close-stats {
    background: #f8f8f8;
    color: #333;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.close-stats:hover {
    background: #eeeeee;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.stats-table th, .stats-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.stats-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #000000;
    position: sticky;
    top: 0;
}

.stats-table tr:hover {
    background: #f9f9f9;
}

.stats-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stats-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.export-btn {
    background: #000000;
    color: white;
}

.export-btn:hover {
    background: #333333;
}

.clear-btn {
    background: #f8f8f8;
    color: #333;
    border: 1px solid #e0e0e0;
}

.clear-btn:hover {
    background: #eeeeee;
}

/* Новые стили для графика и кнопок фильтрации */
.chart-container {
    margin: 20px 0;
    position: relative;
    height: 300px;
    width: 100%;
}

.time-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.time-filter-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #f8f8f8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.time-filter-btn.active {
    background: #000000;
    color: white;
    border-color: #000000;
}

.time-filter-btn:hover:not(.active) {
    background: #e8e8e8;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #000000;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Стили для карты */
.map-container {
    height: 400px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

/* Стили для управления контентом */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 10px 20px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-tab.active {
    background: #000000;
    color: white;
    border-color: #000000;
}

.admin-tab:hover:not(.active) {
    background: #e8e8e8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #000000;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-primary {
    background: #000000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #333333;
}

.btn-secondary {
    background: #f8f8f8;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-show {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-show:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #c82333;
}

/* УЛУЧШЕННЫЕ СТИЛИ ДЛЯ РЕДАКТОРА ССЫЛОК С ПЕРЕТАСКИВАНИЕМ */
.links-management-container {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.links-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #000000;
}

.links-management-header h4 {
    font-size: 1.4rem;
    color: #000000;
    margin: 0;
}

.links-counter {
    background: #000000;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    cursor: grab;
}

.link-item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #000000;
}

.link-item-card.dragging {
    opacity: 0.5;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.link-item-card.hidden {
    background: #f8f8f8;
    border-left: 4px solid #999999;
}

.link-item-card.visible {
    border-left: 4px solid #000000;
}

.link-item-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 50%;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.drag-handle {
    width: 30px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: #999;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.drag-handle:hover {
    color: #000000;
}

.link-item-content {
    flex: 1;
    min-width: 0;
}

.link-item-title {
    font-weight: 600;
    color: #000000;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.link-item-url {
    color: #666;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-item-status {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.link-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

.action-btn:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.add-link-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
    margin-top: 25px;
}

.add-link-form h5 {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 20px;
    text-align: center;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* УЛУЧШЕННЫЕ СТИЛИ ДЛЯ РЕДАКТОРА КОНТЕНТА */
.content-management-container {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.content-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #000000;
}

.content-management-header h4 {
    font-size: 1.4rem;
    color: #000000;
    margin: 0;
}

.game-info-editor {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.game-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.game-info-header i {
    font-size: 1.4rem;
    color: #000000;
}

.game-info-header h5 {
    font-size: 1.3rem;
    color: #000000;
    margin: 0;
}

.section-editor-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.section-editor-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-header:hover {
    background: #f0f0f0;
}

.section-header h4 {
    font-size: 1.2rem;
    color: #000000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    color: #000000;
}

.section-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #333;
}

.control-btn:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.control-btn:disabled {
    background: #f8f8f8;
    color: #ccc;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

.control-btn:disabled:hover {
    background: #f8f8f8;
    border-color: #e0e0e0;
    color: #ccc;
}

.delete-section-btn:hover {
    background: #000000;
    color: white;
    border-color: #000000;
}

.section-body {
    padding: 0;
    background: white;
}

.section-body.collapsed {
    display: none;
}

.editor-container {
    padding: 25px;
}

.editor-toolbar {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    border-radius: 8px 8px 0 0;
}

.editor-btn {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #333;
}

.editor-btn:hover {
    background: #f0f0f0;
    border-color: #000000;
}

.editor-btn.active {
    background: #000000;
    color: white;
    border-color: #000000;
}

.editor-content {
    padding: 25px;
    min-height: 300px;
    outline: none;
    line-height: 1.7;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
}

.editor-content:focus {
    background: #fcfcfc;
    border-color: #000000;
}

.editor-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
}

.add-section-btn {
    background: #000000;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.add-section-btn:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.content-preview {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-top: 25px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.preview-header i {
    font-size: 1.4rem;
    color: #000000;
}

.preview-header h5 {
    font-size: 1.3rem;
    color: #000000;
    margin: 0;
}

/* УЛУЧШЕННЫЙ СТИЛЬ ДЛЯ ГАЛЕРЕИ ИКОНОК */
.icon-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2002;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.icon-gallery-modal.active {
    display: flex;
}

.icon-gallery-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.icon-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #000000;
}

.icon-gallery-header h3 {
    font-size: 1.5rem;
    color: #000000;
    margin: 0;
}

.icon-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.icon-gallery-option {
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1.5rem;
    color: #000000;
}

.icon-gallery-option:hover {
    transform: scale(1.1);
    background: #000000;
    color: white;
    border-color: #000000;
}

.icon-gallery-option.selected {
    background: #000000;
    color: white;
    border-color: #000000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Стили для вкладки логов */
.logs-container {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #000000;
}

.logs-header h4 {
    font-size: 1.4rem;
    color: #000000;
    margin: 0;
}

.logs-counter {
    background: #000000;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.85rem;
}

.logs-table th, .logs-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.logs-table th {
    background: #000000;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.logs-table tr:hover {
    background: #f0f0f0;
}

.logs-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.log-stat-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.log-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 5px;
}

.log-stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* Цвета иконок для ссылок на главном сайте */
.fa-telegram { color: #0088cc; }
.fa-vk { color: #4c75a3; }
.fa-reddit { color: #ff4500; }
.fa-youtube { color: #ff0000; }
.fa-tiktok { color: #000000; }
.fa-steam { color: #000000; }
.fa-discord { color: #5865f2; }
.fa-kickstarter { color: #05ce78; }

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.link-card {
    animation: fadeIn 0.3s ease forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    /* Изменение порядка отображения: карусель сверху */
    .carousel-section {
        display: block !important;
        order: 1;
        margin: 20px 0 40px 0;
    }
    
    .carousel-section-desktop {
        display: none !important;
    }
    
    .main-content-section {
        grid-template-columns: 1fr;
        gap: 30px;
        order: 2;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .company-name {
        font-size: 2.2rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }

    .game-title {
        font-size: 2.5rem;
    }

    .game-subtitle {
        font-size: 1.1rem;
    }

    .carousel-control {
        opacity: 1;
        width: 40px;
        height: 40px;
    }

    .carousel-dots {
        opacity: 1;
    }

    .zoom-content {
        max-width: 95%;
        max-height: 95%;
    }

    .zoom-control {
        width: 40px;
        height: 40px;
    }

    .stats-table th, .stats-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .logs-table th, .logs-table td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .stats-actions {
        flex-direction: column;
    }

    .time-filter {
        flex-wrap: wrap;
    }

    .chart-container {
        height: 250px;
    }

    .stats-modal {
        width: 98%;
        padding: 20px;
    }

    .form-row, .form-grid {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 300px;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

    .link-item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .link-item-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .admin-panel {
        top: 5px;
        right: 5px;
        padding: 8px;
    }

    .admin-btn {
        padding: 6px 10px;
        font-size: 10px;
    }

    .editor-toolbar {
        justify-content: center;
    }

    .editor-btn {
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .section-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .form-actions {
        flex-direction: column;
    }

    .editor-actions {
        flex-direction: column;
    }

    .icon-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 10px;
    }

    .icon-gallery-option {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    .logs-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .control-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

@media (min-width: 769px) {
    .carousel-section {
        display: none !important;
    }
    
    .carousel-section-desktop {
        display: block !important;
    }
}