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

body {
    font-family: 'Cal Sans', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.title-evo {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-pedia {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes glow {
    from { text-shadow: 0 0 30px rgba(255, 255, 255, 0.3); }
    to { text-shadow: 0 0 40px rgba(255, 255, 255, 0.5), 0 0 60px rgba(78, 205, 196, 0.3); }
}

.subtitle {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 30px;
    font-family: 'Space Mono', monospace;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 15px;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

.nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* Planet Selector */
.planet-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.planet-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.planet-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.planet-btn.active {
    background: linear-gradient(45deg, #45b7d1, #96ceb4);
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(69, 183, 209, 0.4);
}

.planet-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Biome Selector */
.biome-selector {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.biome-btn {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.biome-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.biome-btn.active {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    color: #333;
    border-color: #ffffff;
    font-weight: 600;
}

/* Creatures Grid */
.creatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.creature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.creature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.creature-card:hover::before {
    left: 100%;
}

.creature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(78, 205, 196, 0.5);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(78, 205, 196, 0.2);
}

.creature-card.imposter {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.05);
}

.creature-card.imposter:hover {
    border-color: rgba(255, 107, 107, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 107, 107, 0.3);
}

.creature-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 15px;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.creature-card:hover .creature-image {
    transform: scale(1.1) rotate(2deg);
}

.creature-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.creature-size {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-bottom: 5px;
    font-family: 'Space Mono', monospace;
}

.creature-stats {
    font-size: 0.85rem;
    color: #4ecdc4;
    font-weight: 500;
    font-family: 'Space Mono', monospace;
}

.creature-card.imposter .creature-stats {
    color: #ff6b6b;
}

/* Detail Modal */
.creature-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.detail-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    max-width: 600px;
    width: 100%;
    position: relative;
    backdrop-filter: blur(20px);
    animation: slideUp 0.4s ease;
    overflow: hidden;
}

.detail-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.detail-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.detail-content {
    display: flex;
    padding: 30px;
    gap: 30px;
    align-items: flex-start;
}

.detail-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 15px;
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
}

.detail-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-stats {
    margin-bottom: 20px;
    font-family: 'Space Mono', monospace;
}

.detail-stats div {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.detail-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #d0d0d0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 200px;
        justify-content: center;
    }
    
    .planet-selector {
        flex-direction: column;
        align-items: center;
    }
    
    .planet-btn {
        width: 150px;
        justify-content: center;
    }
    
    .creatures-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .detail-content {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-image {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .creatures-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-content {
        padding: 20px;
    }
}

