/* ============================================
   BESTIARY STYLES - MARNYL Wiki
   Same style as main page - brutal & pink
   ============================================ */

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

/* Custom Scrollbar - MARNYL Style (острая, без закруглений!) */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    border-radius: 0 !important;
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 4px solid #ff69b4;
    border-radius: 0 !important;
}

::-webkit-scrollbar-track-piece {
    background: #000;
    border-radius: 0 !important;
}

::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border: 3px solid #000;
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
    border-radius: 0 !important;
}

::-webkit-scrollbar-corner {
    background: #000;
    border-radius: 0 !important;
}

::-webkit-scrollbar-button {
    display: none;
}

/* Firefox scrollbar */
* {
    scrollbar-width: auto;
    scrollbar-color: #ff69b4 #000;
}

/* Force no border-radius on html/body scrollbar */
html, body {
    scrollbar-width: auto;
    scrollbar-color: #ff69b4 #000;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    border-radius: 0 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ff69b4;
    color: #000;
    min-height: 100vh;
}

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

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main */
.main {
    padding: 20px 0;
}

.title {
    font-size: clamp(3rem, 8vw, 5rem);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: #000;
}

.subtitle {
    text-align: center;
    color: #000;
    margin-bottom: 40px;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    border: 3px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 #000;
}

.filter-btn.active {
    background: #000;
    color: #ff69b4;
}

/* Enemy Grid */
.enemies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Enemy Card */
.enemy-card {
    background: #fff;
    border: 4px solid #000;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s ease;
}

.enemy-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 #000;
}

.enemy-card.boss {
    border-width: 6px;
    background: #ffd700;
}

.enemy-card.elite {
    background: #e0b0ff;
}

/* Card Preview (3D) */
.card-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #eee;
    position: relative;
    border-bottom: 4px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-preview canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-preview .no-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1rem;
    font-weight: 700;
}

/* Card Info */
.card-info {
    padding: 20px;
}

.card-type {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    border: 2px solid #000;
}

.card-type.basic {
    background: #fff;
    color: #000;
}

.card-type.elite {
    background: #9932cc;
    color: #fff;
}

.card-type.boss {
    background: #000;
    color: #ffd700;
}

.card-name {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #000;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Card Stats */
.card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.stat {
    text-align: center;
    padding: 10px 4px;
    background: #ff69b4;
    border: 2px solid #000;
}

.stat-icon {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 900;
    color: #000;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: #000;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-desc {
    font-size: 1rem;
    color: #000;
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 500;
}

.card-spawn {
    font-size: 0.9rem;
    color: #000;
    font-weight: 700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border: 6px solid #000;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #000;
    border: none;
    color: #ff69b4;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 50px;
    height: 50px;
    font-weight: 900;
    transition: all 0.15s;
}

.modal-close:hover {
    background: #ff69b4;
    color: #000;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-preview {
    width: 100%;
    height: 400px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 6px solid #000;
}

.modal-preview canvas {
    width: 400px;
    height: 400px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-info {
    padding: 30px;
    background: #ff69b4;
}

.modal-type {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    border: 3px solid #000;
}

.modal-type.basic {
    background: #fff;
}

.modal-type.elite {
    background: #9932cc;
    color: #fff;
}

.modal-type.boss {
    background: #ffd700;
    color: #000;
}

.modal-info h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #000;
}

/* Modal Stats */
.modal-stats {
    margin-bottom: 25px;
    background: #fff;
    border: 4px solid #000;
    padding: 20px;
}

.modal-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.modal-stat:last-child {
    margin-bottom: 0;
}

.modal-stat .stat-label {
    width: 150px;
    font-size: 1rem;
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-bar {
    flex: 1;
    height: 20px;
    background: #eee;
    border: 2px solid #000;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.stat-fill.hp {
    background: #ff4444;
}

.stat-fill.damage {
    background: #ff8800;
}

.stat-fill.speed {
    background: #00aaff;
}

.stat-fill.xp {
    background: #aa00ff;
}

.stat-fill.range {
    background: #00cc66;
}

.modal-stat .stat-value {
    width: 60px;
    text-align: right;
    font-weight: 900;
    font-size: 1.2rem;
    color: #000;
}

.modal-description {
    background: #fff;
    border: 4px solid #000;
    padding: 20px;
    margin-top: 20px;
}

.modal-description h3 {
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.modal-description p {
    color: #000;
    line-height: 1.6;
    font-size: 1.1rem;
}

.modal-spawn {
    margin-top: 20px;
    padding: 15px 20px;
    background: #000;
    color: #ff69b4;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer spacing */
.main {
    margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }

    .enemies-grid {
        grid-template-columns: 1fr;
    }

    .card-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        width: 100%;
        max-height: 100vh;
        border-width: 0;
    }

    .modal-stat {
        flex-wrap: wrap;
    }

    .modal-stat .stat-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}
