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

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --accent-green: #00ff88;
    --accent-orange: #ff6b35;
    --accent-red: #ff3d3d;
    --accent-yellow: #ffd93d;
    --accent-purple: #a855f7;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: #2a2a2a;
    --tier-s: #ff3d3d;
    --tier-a: #ff6b35;
    --tier-b: #ffd93d;
    --tier-c: #6b7280;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.9) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    color: var(--accent-green);
    text-shadow: 0 0 20px var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.logo h1 {
    font-family: 'Russo One', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 5px;
}

.nav-btn {
    font-family: 'Russo One', sans-serif;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    letter-spacing: 1px;
}

.nav-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.nav-btn.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--bg-dark);
}

/* Main Content */
.main {
    padding: 40px 20px;
    min-height: calc(100vh - 150px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.section-header h2 {
    font-family: 'Russo One', sans-serif;
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Search & Filter */
.search-filter {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.search-input,
.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input {
    flex: 1;
    max-width: 300px;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--accent-green);
}

.filter-select {
    cursor: pointer;
    min-width: 150px;
}

/* Heroes Grid */
.heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.hero-image {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
}

.hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-card));
}

.hero-card[data-rarity="legendary"] .hero-image { background: linear-gradient(135deg, #2a1a3a 0%, #1a1a2a 100%); }
.hero-card[data-rarity="epic"] .hero-image { background: linear-gradient(135deg, #1a2a3a 0%, #1a1a2a 100%); }
.hero-card[data-rarity="rare"] .hero-image { background: linear-gradient(135deg, #1a2a2a 0%, #1a1a2a 100%); }

.hero-info {
    padding: 15px;
}

.hero-name {
    font-family: 'Russo One', sans-serif;
    font-size: 14px;
    margin-bottom: 5px;
}

.hero-role {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-stats {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 11px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-icon {
    font-size: 10px;
}

.stat-atk { color: var(--accent-red); }
.stat-def { color: var(--accent-blue, #60a5fa); }
.stat-hp { color: var(--accent-green); }
.stat-ability { color: var(--accent-purple); }

/* Tier List */
.tier-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tier-row {
    display: flex;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    min-height: 80px;
}

.tier-label {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Russo One', sans-serif;
    font-size: 24px;
    flex-shrink: 0;
}

.tier-label.s { background: var(--tier-s); color: white; }
.tier-label.a { background: var(--tier-a); color: white; }
.tier-label.b { background: var(--tier-b); color: var(--bg-dark); }
.tier-label.c { background: var(--tier-c); color: white; }

.tier-heroes {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tier-hero {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-hero:hover {
    border-color: var(--accent-green);
    transform: scale(1.05);
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.team-name {
    font-family: 'Russo One', sans-serif;
    font-size: 18px;
}

.team-type {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-type.pve { background: var(--accent-green); color: var(--bg-dark); }
.team-type.pvp { background: var(--accent-red); color: white; }
.team-type.event { background: var(--accent-purple); color: white; }

.team-description {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.team-heroes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.team-hero-slot {
    width: 50px;
    height: 50px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
}

.team-hero-slot::after {
    content: attr(data-role);
    position: absolute;
    bottom: -8px;
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.event-card:hover {
    border-color: var(--accent-orange);
}

.event-banner {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
}

.event-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, var(--bg-card));
}

.event-card[data-type="limited"] .event-banner { background: linear-gradient(135deg, #3a2a1a 0%, #2a1a1a 100%); }
.event-card[data-type="permanent"] .event-banner { background: linear-gradient(135deg, #1a2a2a 0%, #1a1a2a 100%); }
.event-card[data-type="weekly"] .event-banner { background: linear-gradient(135deg, #2a1a3a 0%, #1a1a2a 100%); }

.event-info {
    padding: 15px;
}

.event-name {
    font-family: 'Russo One', sans-serif;
    font-size: 16px;
    margin-bottom: 8px;
}

.event-timer {
    font-size: 12px;
    color: var(--accent-orange);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

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

.modal-hero-header {
    padding: 30px;
    text-align: center;
    position: relative;
}

.modal-hero-icon {
    font-size: 80px;
    margin-bottom: 15px;
}

.modal-hero-name {
    font-family: 'Russo One', sans-serif;
    font-size: 24px;
    margin-bottom: 5px;
}

.modal-hero-title {
    color: var(--text-muted);
    font-size: 14px;
}

.modal-hero-body {
    padding: 0 30px 30px;
}

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

.modal-section h4 {
    font-family: 'Russo One', sans-serif;
    font-size: 14px;
    color: var(--accent-green);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.modal-stat {
    background: var(--bg-card-hover);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.modal-stat-value {
    font-family: 'Russo One', sans-serif;
    font-size: 20px;
    color: var(--accent-green);
}

.modal-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-input {
        max-width: 100%;
    }
    
    .heroes-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .teams-grid,
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .tier-row {
        flex-direction: column;
    }
    
    .tier-label {
        width: 100%;
        padding: 10px;
    }
}
