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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 100, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Effet d'écran Pokédex */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 100, 0.03) 2px,
            rgba(0, 255, 100, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: 
        linear-gradient(145deg, rgba(220, 38, 38, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 
        0 0 50px rgba(255, 0, 0, 0.3),
        inset 0 0 50px rgba(255, 255, 255, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

/* LED indicateur style Pokédex */
.container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 15px;
    height: 15px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 
        0 0 10px #00ff88,
        0 0 20px #00ff88,
        0 0 30px #00ff88;
    animation: pulse 2s infinite;
}

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

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

.header h1 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(0, 255, 200, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    letter-spacing: 2px;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Panneau de contrôle style Pokédex */
.filters {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

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

.filter-group label {
    font-weight: bold;
    color: #ffffff;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

select, input {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 160px;
}

select:focus, input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

select option {
    background: #1a1a2e;
    color: white;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.reset-btn {
    padding: 12px 25px;
    background: linear-gradient(145deg, #ff4757, #ff3838);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.reset-btn:hover {
    background: linear-gradient(145deg, #ff3838, #ff2f2f);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.stats-info {
    text-align: center;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    perspective: 1000px;
}

/* Carte Pokémon SANS effet 3D */
.pokemon-card {
    width: 100%;
    height: 450px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

/* Suppression de l'effet hover 3D */
.pokemon-card:hover {
    /* Effet hover simplifié */
    transform: translateY(-5px);
}

.pokemon-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.card-front {
    background: 
        linear-gradient(145deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(240, 248, 255, 0.95) 50%, 
            rgba(230, 240, 255, 0.95) 100%
        );
}

.card-back {
    background: 
        radial-gradient(circle at center, #ff6b6b 0%, #4ecdc4 100%),
        linear-gradient(45deg, transparent 25%, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.1) 50%, transparent 50%, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 100%, 20px 20px;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.pokeball-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: 
        linear-gradient(to bottom, 
            #ff4757 0%, #ff4757 45%, 
            #2f3640 45%, #2f3640 55%, 
            #ffffff 55%, #ffffff 100%);
    position: relative;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.pokeball-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border: 8px solid #2f3640;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.card-back-text {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Styles pour les cartes normales */
.pokemon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pokemon-id {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.pokemon-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    text-transform: capitalize;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.pokemon-image {
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    display: block;
    background: 
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(200, 220, 255, 0.6) 100%);
    border-radius: 50%;
    padding: 15px;
    object-fit: contain;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

/* Simplification de l'effet hover de l'image */
.pokemon-card:hover .pokemon-image {
    transform: scale(1.05);
}

.pokemon-types {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.type-badge {
    padding: 8px 16px;
    border-radius: 25px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.pokemon-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 14px;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-name {
    font-weight: bold;
    color: #7f8c8d;
}

.stat-value {
    color: #2c3e50;
    font-weight: bold;
}

.generation-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 3px 8px rgba(155, 89, 182, 0.3);
}

/* Effets spéciaux pour les légendaires */
.pokemon-card.legendary {
    animation: legendaryGlow 3s ease-in-out infinite alternate;
}

.pokemon-card.legendary .card-front {
    background: 
        linear-gradient(145deg, 
            rgba(255, 215, 0, 0.95) 0%, 
            rgba(255, 223, 0, 0.95) 25%,
            rgba(255, 255, 255, 0.95) 50%, 
            rgba(255, 223, 0, 0.95) 75%,
            rgba(255, 215, 0, 0.95) 100%
        );
    border: 3px solid gold;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pokemon-card.legendary .pokemon-image {
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.2);
    animation: float 2s ease-in-out infinite;
}

@keyframes legendaryGlow {
    0% {
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.3),
            0 15px 35px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 0.8),
            0 15px 35px rgba(0, 0, 0, 0.3);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1.1); }
    50% { transform: translateY(-10px) scale(1.15); }
}

/* Effets pour les shinies */
.pokemon-card.shiny {
    animation: shinySparkle 2s linear infinite;
}

.pokemon-card.shiny .card-front {
    background: 
        linear-gradient(145deg, 
            rgba(255, 255, 255, 0.95) 0%, 
            rgba(255, 192, 203, 0.95) 25%,
            rgba(255, 255, 255, 0.95) 50%, 
            rgba(173, 216, 230, 0.95) 75%,
            rgba(255, 255, 255, 0.95) 100%
        );
    border: 3px solid #ff69b4;
}

@keyframes shinySparkle {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    25% { filter: hue-rotate(90deg) brightness(1.2); }
    50% { filter: hue-rotate(180deg) brightness(1); }
    75% { filter: hue-rotate(270deg) brightness(1.2); }
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: rgba(255, 255, 255, 0.9);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Types Colors - Version améliorée */
.type-normal { background: linear-gradient(45deg, #A8A878, #9C9C6C); }
.type-fire { background: linear-gradient(45deg, #F08030, #DD6610); }
.type-water { background: linear-gradient(45deg, #6890F0, #4870D0); }
.type-electric { background: linear-gradient(45deg, #F8D030, #F0C010); }
.type-grass { background: linear-gradient(45deg, #78C850, #60B040); }
.type-ice { background: linear-gradient(45deg, #98D8D8, #80C8C8); }
.type-fighting { background: linear-gradient(45deg, #C03028, #A02018); }
.type-poison { background: linear-gradient(45deg, #A040A0, #903090); }
.type-ground { background: linear-gradient(45deg, #E0C068, #D0B058); }
.type-flying { background: linear-gradient(45deg, #A890F0, #9080E0); }
.type-psychic { background: linear-gradient(45deg, #F85888, #E84878); }
.type-bug { background: linear-gradient(45deg, #A8B820, #98A810); }
.type-rock { background: linear-gradient(45deg, #B8A038, #A89028); }
.type-ghost { background: linear-gradient(45deg, #705898, #604888); }
.type-dragon { background: linear-gradient(45deg, #7038F8, #6028E8); }
.type-dark { background: linear-gradient(45deg, #705848, #604838); }
.type-steel { background: linear-gradient(45deg, #B8B8D0, #A8A8C0); }
.type-fairy { background: linear-gradient(45deg, #EE99AC, #DE89AC); }

/* Modal Styles - Style Pokédex */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: 
        radial-gradient(circle at center, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.9) 100%);
    animation: fadeIn 0.3s;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: 
        linear-gradient(145deg, rgba(220, 38, 38, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    margin: 3% auto;
    padding: 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 
        0 0 50px rgba(255, 0, 0, 0.3),
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.close {
    color: rgba(255, 255, 255, 0.8);
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.close:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.modal-pokemon-image {
    width: 250px;
    height: 250px;
    margin: 0 auto 30px;
    display: block;
    background: 
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(200, 220, 255, 0.7) 100%);
    border-radius: 50%;
    padding: 25px;
    object-fit: contain;
    box-shadow: 
        0 0 30px rgba(255, 255, 255, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-pokemon-name {
    text-align: center;
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 15px;
    text-transform: capitalize;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.modal-pokemon-id {
    text-align: center;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

.modal-stat {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-stat span:first-child {
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
}

.modal-stat span:last-child {
    font-weight: bold;
    color: #ffffff;
}

.footer {
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 25px 25px;
}

.footer .author {
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

.footer .social-links {
    margin-top: 15px;
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer .social-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(0,0,0,0.25));
    border: 1px solid rgba(255,255,255,0.2);
}

.footer .social-links a svg {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.footer .social-links a:hover {
    color: #00ff88;
    text-shadow: 0 0 8px #00ff88;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.footer .social-links a:hover svg {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px #00ff88);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .pokemon-grid {
        grid-template-columns: 1fr;
    }
    
    .pokemon-card {
        height: 400px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 25px;
    }
    
    .modal-pokemon-name {
        font-size: 2rem;
    }
    
    .modal-stats {
        grid-template-columns: 1fr;
    }
}