script {
        display: none;
}

:root {
    --primary-color: #F7F7F7;
    --dark-color:rgba(43, 43, 43, 0.8);
    --secondary-color: #EEEEEE;
    --accent-color: #343434;
    --text-color: #2a2a2a;
    --transition-speed: 0.3s;
}

body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    font-family: "Didact Gothic",sans-serif;
    background-image: url(https://raw.githubusercontent.com/Aksel911/R2-HTML-DB/refs/heads/main/static/bg/BG.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    color: var(--text-color);
    transition: background-color var(--transition-speed)
}


body.light-theme {
    --primary-color: #ffffff;
    --secondary-color: #f5f5f5;
    --accent-color: #FCFAF1;
    --text-color: #2a2a2a;
}

body.dark-theme {
    background-image: url('https://raw.githubusercontent.com/Aksel911/R2-HTML-DB/refs/heads/main/static/bg/BG_black.jpg') !important;
    color: var(--text-dark);
    background-color: var(--dark-color);
}


/* Header styles */
h1 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 1s ease-in-out;
}

/* Table styles */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.table {
        width: 100%;
        border-collapse: collapse;
        animation: fadeIn 1s;
        table-layout: fixed;
}

.table th,
    .table td {
        padding: 12px;
        border: 1px solid #dee2e6;
        font-size: 14px;
        text-align: center;
        vertical-align: middle;
}

.table th {
        background-color: #343a40;
        color: #fff;
        font-weight: bold;
        text-transform: uppercase;
        white-space: nowrap;
}

.table-hover tbody tr:hover {
        background-color: rgba(0,0,0,0.075);
        transition: background-color 0.3s;
        cursor: pointer;
    }
/* Responsive Styles */
/* Для экранов до 960px показываем первые три столбца */
@media (max-width: 960px) {
    .table {
        table-layout: auto;
    }
    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        display: none;
    }

    /* Растягиваем 3-ю ячейку под текст */
    .table th:nth-child(3),
    .table td:nth-child(3) {
        width: auto;
        text-align: left; /* Для улучшения читаемости длинного текста */
        word-wrap: break-word; /* Перенос длинных слов */
    }
}


/* Для экранов до 768px показываем только первые два столбца */
@media (max-width: 768px) {
    .table th:nth-child(n+3),
    .table td:nth-child(n+3) {
        display: none;
    }
}



/* Search styles */
    .search-container {
        max-width: 600px;
        margin: 0 auto 20px;
        padding: 20px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

.search-input {
        width: 100%;
        padding: 12px 20px;
        border: 2px solid #ddd;
        border-radius: 25px;
        transition: all 0.3s;
        font-size: 16px;
        background: white;
    }

.search-input:focus {
        border-color: #2196F3;
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
        outline: none;
    }
    
/* Image zoom */
.item-image {
    transition: transform 0.3s, box-shadow 0.3s;
}

.item-image:hover {
        transform: scale(2);
        z-index: 100;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

@keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

@keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

/* Export button */
    .export-btn {
        padding: 10px 20px; /* Увеличено для лучшего визуального эффекта */
        background: linear-gradient(145deg, #1976D2, #1565C0); /* Градиентный фон */
        color: white;
        border: none;
        border-radius: 8px; /* Закругленные углы */
        cursor: pointer;
        transition: all 0.3s ease-in-out;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Легкая тень */
        margin-bottom: 10px;
    }

.export-btn:hover {
        background: linear-gradient(145deg, #2196F3, #1976D2); /* Более светлый градиент при наведении */
        transform: translateY(-5px); /* Легкое поднятие */
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Увеличенная тень */
    }

.export-btn:active {
        background: linear-gradient(145deg, #1565C0, #0D47A1); /* Тёмный градиент при нажатии */
        transform: translateY(0); /* Убираем эффект поднятия */
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Легкая тень при нажатии */
    }

/* Dark Theme */
    :root {
        --bg-light: #ffffff;
        --text-light: #333333;
        --bg-dark: #1a1a1a;
        --text-dark: #ffffff;
    }

.dark-theme .table-wrapper {
        background: rgba(40, 40, 40, 0.95);
    }

.dark-theme .table th {
        background-color: #2c3e50;
    }

.dark-theme .table td {
        border-color: #2c3e50;
        color: white;
    }

.dark-theme .search-container {
        background: rgba(40, 40, 40, 0.95);
    }

.dark-theme .search-input {
        background: #2c3e50;
        color: white;
        border-color: #34495e;
    }

/* Кнопка переключения темы */
.theme-toggle {
    position: fixed; 
    bottom: 5px;
    right: 20px;
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f1f1, #e0e0e0);
    border: 0;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease, transform 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 9999;
}

.theme-toggle i {
    font-size: 22px;
    line-height: 1;
    color: #333;
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    background: linear-gradient(135deg, rgb(0, 174, 255), #0077cc);
    color: #fff;
    transform: rotate(360deg) scale(1.1);
}

.theme-toggle:active {
    background: linear-gradient(135deg, #0077cc, rgb(0, 174, 255));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transform: scale(0.95); 
}

body.dark-theme .theme-toggle {
    background: linear-gradient(135deg, #333, #555);
    color: #f1f1f1;
}

body.dark-theme .theme-toggle:hover {
    background: linear-gradient(135deg, #555, #777);
}
.theme-toggle.bouncing {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Добавляем белый цвет для всего текста в темной теме */
    .dark-theme h1,
    .dark-theme p,
    .dark-theme label,
    .dark-theme .table {
        color: white !important;
    }

/* Изменяем цвет фона для меню в темной теме */
    .dark-theme .navbar {
        background-color: rgba(40, 40, 40, 0.95) !important;
    }

/* Добавляем стили для navbar и пагинации в темной теме */
    .dark-theme .navbar-light .navbar-brand,
    .dark-theme .navbar-light .navbar-nav .nav-link,
    .dark-theme .navbar-light .navbar-text {
        color: white !important;
    }

/* Стили для пагинации в темной теме */
    .dark-theme .page-link {
        background-color: #2c3e50 !important;
        border-color: #34495e !important;
        color: white !important;
    }

.dark-theme .page-item.active .page-link {
        background-color: #3498db !important;
        border-color: #3498db !important;
        color: white !important;
    }

.dark-theme .page-item.disabled .page-link {
        background-color: #1a1a1a !important;
        border-color: #34495e !important;
        color: #6c757d !important;
    }

.dark-theme a {
        color: #FFF5E6 !important; /* Кремово-белый цвет */
    }

.dark-theme a:hover {
        color: #FFE4B5 !important; /* Чуть темнее оттенок при наведении */
        text-decoration: underline !important;
    }

/* Hover эффект для пагинации */
    .dark-theme .page-link:hover {
        background-color: #34495e !important;
        border-color: #2c3e50 !important;
        color: white !important;
    }

/* Стили для активной страницы */
    .dark-theme .page-item.active .page-link:hover {
        background-color: #2980b9 !important;
        border-color: #2980b9 !important;
    }

/* Skill image and hover text */

    .hover-text-wrapper {
        position: relative;
        display: inline-block;
    }

.abnormal-image {
        transition: transform 0.3s, box-shadow 0.3s;
    }

.item-image {
        transition: transform 0.3s, box-shadow 0.3s;
    }

.monster-image {
        transition: transform 0.3s, box-shadow 0.3s;
    }

.hover-text {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 14px;
        width: max-content;
        max-width: 200px;
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        margin-top: 10px;
        text-align: left;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

.hover-text-wrapper:hover .abnormal-image {
        transform: scale(2);
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.hover-text-wrapper:hover .item-image {
        transform: scale(2);
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.hover-text-wrapper:hover .monster-image {
        transform: scale(2);
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.hover-text-wrapper:hover .hover-text {
        opacity: 1;
        visibility: visible;
    }

/* Dark theme support for hover text */
    .dark-theme .hover-text {
        background: rgba(44, 62, 80, 0.95);
        color: white;
    }


/* Image zoom */
    .monster-image {
        transition: transform 0.3s, box-shadow 0.3s;
    }

.monster-image:hover {
        transform: scale(2);
        z-index: 100;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.skill-image {
        transition: transform 0.3s, box-shadow 0.3s;
    }

.hover-text-wrapper:hover .skill-image {
        transform: scale(2);
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

/* Skill image and hover text */
    .skill-image-container {
        position: relative;
    }

.skill-wrapper {
        position: relative;
        display: inline-block;
    }

.skill-hover-text {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 14px;
        width: max-content;
        max-width: 200px;
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        margin-top: 10px;
        text-align: left;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

.skill-wrapper:hover .skill-image {
        transform: scale(2);
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.skill-wrapper:hover .skill-hover-text {
        opacity: 1;
        visibility: visible;
    }

/* Dark theme support for hover text */
.dark-theme .skill-hover-text {
    background: rgba(44, 62, 80, 0.95);
    color: white;
}
