/* ИДИ НАХУЙ ДОЛБАЕБ HTTPS://WINCHANII.RU */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 60px 20px 100px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.main-title {
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 800px;
    text-align: center;
    z-index: 2;
}

.main-title::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 30px;
    background: linear-gradient(45deg, #5a5a5a, #000000);
    filter: blur(5px);
    z-index: -1;
}

.main-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
}

h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
}

.add-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 1001; /* Было: 10, стало: 1001 (выше, чем .form-modal: 1000 и .modal: 1000) */
}

.add-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}
.form-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.form-content {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    z-index: 1001; 
    /* УБРАНО: box-shadow, backdrop-filter, border, outline, ::before, ::after */
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    z-index: 1002; 

}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

input[type="text"],
textarea,
input[type="file"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
textarea:focus,
input[type="file"]:focus {
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    font-size: 16px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 5px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.enemies-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
}

.enemy-card {
    position: relative;
    background: transparent;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    backdrop-filter: blur(5px);
}

.enemy-card:hover {
    transform: scale(1.05);
}

.enemy-card::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 20px;
    background: linear-gradient(45deg, #5a5a5a, #000000);
    filter: blur(5px);
    z-index: -1;
}

.enemy-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.enemy-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.enemy-info {
    padding: 15px;
}

.enemy-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.enemy-added-by {
    font-size: 14px;
    color: #ccc;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000; 
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001; 

}


.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    z-index: 1002;
}

.modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.modal-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}

.modal-description {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ccc;
    white-space: pre-wrap;
}

.modal-added-by {
    font-size: 14px;
    color: #aaa;
}

.contacts-section {
    margin-top: 60px;
    text-align: center;
    width: 100%;
    padding: 20px;
}

.contact-link {
    display: inline-block;
    margin: 10px;
    padding: 10px 20px;
    color: #00ffff;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5), 0 0 10px rgba(0, 255, 255, 0.3);
    opacity: 0.8;
    background: transparent;
}

.contact-link:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .main-title {
        padding: 20px 20px 60px 20px;
    }

    .add-btn {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .container {
        padding: 20px 10px 80px;
    }

    .enemies-board {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 20px;
    }

    .contacts-section {
        margin-top: 40px;
    }
}
.pagination-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 15px; margin-top: 30px; padding: 20px;
}
.pagination-controls button {
    padding: 10px 20px; background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4); border-radius: 8px;
    color: #fff; cursor: pointer; transition: all 0.3s;
}
.pagination-controls button:hover:not(:disabled) {
    background: rgba(255,255,255,0.4); transform: scale(1.05);
}
.pagination-controls button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-controls span { color: #ccc; font-size: 14px; }

/* Анимация для блока со ссылкой */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#added-link-container {
    animation: slideDown 0.3s ease;
}

#added-link-container a:hover {
    background: rgba(0,255,255,0.2) !important;
}

#added-link-container button:hover {
    transform: scale(1.05) !important;
}

/* 🔧 FIX: Гарантируем, что кнопки в блоке со ссылкой кликабельны */
/* 🔧 FIX: Гарантируем, что кнопки в блоке со ссылкой кликабельны */
#added-link-container,
#added-link-container *,
#added-link-container button,
#added-link-container a {
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none;
}

#added-link-container {
    position: relative !important;
    z-index: 99999 !important;
}

#added-link-container button {
    position: relative !important;
    z-index: 100000 !important;
}

/* Анимация появления */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Пагинация */
.pagination-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 15px; margin-top: 30px; padding: 20px;
}
.pagination-controls button {
    padding: 10px 20px; background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4); border-radius: 8px;
    color: #fff; cursor: pointer; transition: all 0.3s;
}
.pagination-controls button:hover:not(:disabled) {
    background: rgba(255,255,255,0.4); transform: scale(1.05);
}
.pagination-controls button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-controls span { color: #ccc; font-size: 14px; }

/* Бейджи в модальном окне */
.person-card-badge {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    font-weight: bold; font-size: 13px; margin: 10px 0;
}
.enemy-badge {
    background: linear-gradient(45deg, #ff4757, #ff3838);
    color: white; box-shadow: 0 0 15px rgba(255, 56, 56, 0.5);
}
.ally-badge {
    background: linear-gradient(45deg, #2ed573, #1e90ff);
    color: white; box-shadow: 0 0 15px rgba(46, 213, 115, 0.5);
}

/* Адаптивность */
@media (max-width: 480px) {
    #added-link-container {
        padding: 12px 15px !important;
        margin: 15px auto 0 !important;
    }
    #added-link-container h3 { font-size: 16px !important; }
    #added-link-container a { font-size: 14px !important; padding: 8px !important; }
    #added-link-container button {
        padding: 8px 15px !important; font-size: 13px !important;
    }
    .pagination-controls { flex-wrap: wrap; }
}