
:root {
    --card-bg: #1e1e24;
    --card-border: #3a3a44;
    --card-hover-border: #c83a3a;
    --star-color: #ffd700;
}

.enemies-main {
    max-width: 1200px;
    margin: 7rem auto;
    padding: 2rem;
}
.footer {
    background-color: var(--card-bg);
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--dashboard-text-muted);
}
a {
    color: var(--dashboard-accent);
    text-decoration: none;
}
.btn-secondary {
        border-radius: 8px;
    border: none;
    background-color: #ffffff;
    color: #000000;
}

.enemies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.enemies-header h2 {
    font-family: 'Cinzel', serif;
    color: var(--dashboard-text);
    margin: 0;
}

/* Filters */
.enemies-filters {
    flex-direction: row;
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 3rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--dashboard-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-tabs {
    display: flex;
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.filter-tab {
    padding: 0.5rem 1.2rem;
    border: none;
    background: none;
    color: var(--dashboard-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.filter-tab.active {
    background: var(--dashboard-accent);
    color: white;
}

/* Boss Final Styling */
.final-boss-section {
    margin-top: 2rem;
    margin-bottom: 4rem;
    padding: 2rem;
    background: radial-gradient(circle at center, rgba(139, 0, 0, 0.15) 0%, transparent 70%);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.boss-title {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    letter-spacing: 4px;
    text-transform: uppercase;
}

#final-boss-grid {
    display: flex;
    justify-content: center;
}

.enemy-card.final-boss {
    max-width: 350px;
    width: 100%;
    border: 2px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
    animation: bossGlow 4s infinite alternate;
}

.enemy-card.final-boss .enemy-image {
    height: 300px;
}

.enemy-card.final-boss .enemy-name {
    color: #ffd700;
    font-size: 1.8rem;
}

.enemy-card.final-boss .community-badge {
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.enemy-card.final-boss .community-badge::after {
    content: ' FINAL';
}

@keyframes bossGlow {
    from { box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); border-color: rgba(255, 215, 0, 0.5); }
    to { box-shadow: 0 0 50px rgba(255, 215, 0, 0.4); border-color: #ffd700; }
}

#enemies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.enemy-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.community-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--dashboard-accent);
    border: 1px solid var(--dashboard-accent);
    z-index: 2;
}

.creator-link {
    font-size: 0.75rem;
    color: var(--dashboard-text-muted);
    margin-top: 0.5rem;
    display: block;
    text-decoration: none;
    transition: color 0.3s;
}

.creator-link:hover {
    color: var(--dashboard-accent);
}

.creator-link strong {
    color: var(--dashboard-text);
}

.enemy-card:hover {
    transform: translateY(-10px);
    border-color: var(--card-hover-border);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--card-hover-border);
}

.enemy-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.enemy-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.enemy-card:hover .enemy-card-image img {
    transform: scale(1.1);
}

.enemy-card-content {
    padding: 1rem;
    text-align: center;
    border-top: 2px solid var(--card-border);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.enemy-name {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    color: var(--dashboard-text);
}

.enemy-type {
    font-size: 0.8rem;
    color: var(--dashboard-text-muted);
    margin-bottom: 1rem;
}

.enemy-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.enemy-stars .star {
    color: var(--star-color);
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    padding: 2rem 0;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    /* max-height: 90vh; */
    overflow-y: auto;
    position: relative;
    padding: 1rem;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    margin: auto; /* Centraliza verticalmente se couber, permite scroll se não */
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--dashboard-text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close-btn:hover {
    color: var(--dashboard-accent);
}

/* Enemy Modal Cinematic Style */
.enemy-modal-content {
    max-width: 800px;
    padding: 0;
    overflow: hidden;
    background: #121212;
    border: 1px solid #c83a3a44;
}

.enemy-modal-banner {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 3px solid var(--card-hover-border);
}

.enemy-modal-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, #121212, transparent);
}

.enemy-modal-info {
    padding: 0 2rem 2rem;
    position: relative;
    z-index: 2;
    margin-top: -60px;
}

.enemy-modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.enemy-modal-name {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.enemy-modal-type {
    color: var(--dashboard-accent);
    font-size: 1.1rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.enemy-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.enemy-modal-section h3 {
    font-family: 'Cinzel', serif;
    color: var(--dashboard-text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.enemy-modal-description {
    color: #b0b0b0;
    line-height: 1.8;
    font-size: 1.05rem;
}

.enemy-modal-content .modal-close-btn {
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.enemy-modal-content .modal-close-btn:hover {
    background: var(--dashboard-accent);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dashboard-text-muted);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dashboard-text);
}

.add-to-map-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
}

.modal-actions-container {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.delete-enemy-btn {
    flex: 1;
    background: #680202;
    border: 1px solid #ff4444;
    color: #fff;
    padding: 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.delete-enemy-btn:hover {
    background: #8b0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

/* Profile Popup Social Style */
.profile-modal-content {
    max-width: 450px;
    padding: 0;
    overflow: hidden;
    background: #121212;
    border: 1px solid #333;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.profile-popup-banner {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-popup-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #121212, transparent);
}

.profile-popup-info {
    position: relative;
    padding: 0 1.5rem 2rem;
    text-align: center;
    margin-top: -60px; /* Sobe para o avatar ficar sobre o banner */
    z-index: 2;
}

.profile-popup-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background-size: cover;
    background-position: center;
    background-color: #333;
    margin: 0 auto 0.8rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.6);
    position: relative;
    z-index: 2; /* Foto de perfil fica acima do brilho mas abaixo da moldura se necessário */
    transition: transform 0.3s ease;
    overflow: visible;
}

.profile-popup-avatar .frame-border {
    position: absolute;
    top: -22%;
    left: -22%;
    right: -22%;
    bottom: -22%;
    z-index: 10; /* Moldura PNG à frente da foto */
    pointer-events: none;
}

.profile-popup-avatar .frame-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Brilho atrás da foto */
    border-radius: 50%;
    pointer-events: none;
}

.profile-popup-name {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #fff;
    margin: 0;
    letter-spacing: 1px;
}

.profile-popup-subtitle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.2rem;
}

.profile-popup-nickname {
    color: var(--dashboard-accent);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.profile-popup-title {
    background: rgba(255, 255, 255, 0.1);
    color: #eee;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-premium {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(45deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    z-index: 10;
}

.profile-popup-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.profile-popup-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup-stat-label {
    font-size: 0.65rem;
    color: var(--dashboard-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.popup-stat-value {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.profile-popup-bio {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.8rem;
    font-style: italic;
    padding: 0 0.5rem;
}

.profile-popup-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.profile-popup-actions .btn-primary,
.profile-popup-actions .btn-secondary {
    color: white;
    flex: 1;
    min-width: 120px;
    padding: 0.8rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-popup-actions .btn-primary {
    background: var(--dashboard-accent);
    box-shadow: 0 4px 15px rgba(200, 58, 58, 0.3);
}

.profile-popup-actions .btn-primary:hover {
    background: #e04545;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 58, 58, 0.4);
}

.profile-popup-actions .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
}

.profile-popup-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

.profile-modal-content .modal-close-btn {
    top: 0.8rem;
    right: 0.8rem;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    /* padding-bottom: 4px; */
}

/* Add/Edit Form Modal */
.form-modal-content {
    max-width: 600px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    color: var(--dashboard-text-muted);
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.8rem;
    color: var(--dashboard-text);
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-divider {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--dashboard-accent);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--card-border);
    padding-top: 1.5rem;
}

/* Responsividade para Modais */
@media (max-width: 768px) {
    .enemy-modal-content {
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }

    .enemy-modal-banner {
        height: 200px;
    }

    .enemy-modal-info {
        padding: 0 1.2rem 1.5rem;
        margin-top: -40px;
    }

    .enemy-modal-name {
        font-size: 1.8rem;
    }

    .enemy-modal-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .enemy-modal-type {
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .stat-item {
        padding: 0.8rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .modal-actions-container {
        flex-direction: column;
        gap: 0.8rem;
    }

    .enemy-modal-content .modal-close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    /* Ajustes no Profile Popup Mobile */
    .profile-modal-content {
        width: 90vw;
    }

    .profile-popup-banner {
        height: 120px;
    }

    .profile-popup-avatar {
        width: 90px;
        height: 90px;
        border-width: 4px;
    }

    .profile-popup-name {
        font-size: 1.5rem;
    }
}
