/* Brawlers Page Styles */
.brawlers-page {
    padding: 40px 0;
}

/* Filters Section */
.filters-section {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.filters-section:hover {
    border-color: var(--brawl-yellow);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 700;
    color: var(--brawl-yellow);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    padding: 12px 15px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    background: rgba(15, 52, 96, 0.8);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover,
.filter-group select:focus {
    border-color: var(--brawl-yellow);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
    outline: none;
}

.filter-group select option {
    background: var(--brawl-darker);
    color: var(--text-primary);
}

/* Search Box */
.search-section {
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--radius-xl);
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    background: rgba(15, 52, 96, 0.8);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:hover,
.search-input:focus {
    border-color: var(--brawl-yellow);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
    outline: none;
}

/* Brawlers Grid */
.brawlers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.brawler-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
    animation-fill-mode: both;
}

.brawler-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.brawler-card.common::before { background: var(--rarity-common); }
.brawler-card.rare::before { background: var(--rarity-rare); }
.brawler-card.epic::before { background: var(--rarity-epic); }
.brawler-card.legendary::before { background: var(--rarity-legendary); }
.brawler-card.mythic::before { background: var(--rarity-mythic); }
.brawler-card.chromatic::before { background: var(--rarity-chromatic); }

.brawler-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--brawl-yellow);
    box-shadow: var(--shadow-glow);
}

.brawler-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 3px solid var(--brawl-yellow);
    transition: all 0.3s ease;
}

.brawler-card:hover .brawler-image {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.brawler-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

.brawler-name {
    font-family: 'Lilita One', cursive;
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.brawler-rarity {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.brawler-rarity.common { color: var(--rarity-common); }
.brawler-rarity.rare { color: var(--rarity-rare); }
.brawler-rarity.epic { color: var(--rarity-epic); }
.brawler-rarity.legendary { color: var(--rarity-legendary); }
.brawler-rarity.mythic { color: var(--rarity-mythic); }
.brawler-rarity.chromatic { color: var(--rarity-chromatic); }

.brawler-class {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 193, 7, 0.2);
    padding: 6px 18px;
    border-radius: var(--radius-xl);
    display: inline-block;
    font-weight: 600;
    border: 1px solid var(--brawl-yellow);
}

/* Modal Styles */
.brawler-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--brawl-yellow);
    animation: slideIn 0.4s ease-out;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--brawl-red);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-glow);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 35px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(15, 52, 96, 0.9) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: 3px solid var(--brawl-yellow);
}

.modal-brawler-image {
    width: 180px;
    height: 180px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
    border: 4px solid var(--brawl-yellow);
    overflow: hidden;
}

.modal-brawler-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

.modal-brawler-info h2 {
    font-family: 'Lilita One', cursive;
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.modal-brawler-info .rarity {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.modal-brawler-info .class {
    font-size: 1.1rem;
    color: var(--text-secondary);
    background: rgba(255, 193, 7, 0.2);
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    display: inline-block;
    font-weight: 600;
    border: 1px solid var(--brawl-yellow);
}

.modal-body {
    padding: 35px;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    font-family: 'Lilita One', cursive;
    font-size: 1.8rem;
    color: var(--brawl-yellow);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brawl-orange);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-item {
    background: rgba(15, 52, 96, 0.6);
    padding: 18px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--brawl-yellow);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.stat-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brawl-yellow);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Powers, Gadgets, Gears */
.power-item,
.gadget-item,
.gear-item {
    background: rgba(15, 52, 96, 0.6);
    padding: 15px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 4px solid var(--brawl-orange);
    transition: all 0.3s ease;
}

.power-item:hover,
.gadget-item:hover,
.gear-item:hover {
    transform: translateX(5px);
    border-left-color: var(--brawl-yellow);
    box-shadow: var(--shadow-sm);
}

.power-item strong,
.gadget-item strong,
.gear-item strong {
    color: var(--brawl-yellow);
    font-size: 1.1rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tag {
    background: var(--brawl-blue);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tag:hover {
    transform: scale(1.05);
    border-color: var(--brawl-yellow);
    box-shadow: var(--shadow-glow);
}

.tag.counter {
    background: var(--brawl-green);
}

.tag.countered {
    background: var(--brawl-red);
}

/* Responsive */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .brawlers-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-brawler-image {
        width: 150px;
        height: 150px;
    }
    
    .modal-brawler-image img {
        width: 130px;
        height: 130px;
    }
    
    .modal-brawler-info h2 {
        font-size: 2.2rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Brawl Icons Styling */
.brawl-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.modal-section h3 .brawl-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.stat-label .brawl-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}
