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

/* STYLE GLOBAL */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #050508;
    color: #f5f5f5;
    line-height: 1.5;
    padding: 20px;
    transition: background 0.5s ease, color 0.5s ease;
}

body.brainrot-mode {
    background: radial-gradient(circle at top, #ff69b4 0, #050508 45%, #120022 100%);
}

header {
    margin-bottom: 30px;
}

.header-top {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.logo-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

#logo-brainrot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

h1 {
    font-size: 2.4rem;
}

#subtitle {
    margin-bottom: 10px;
}

#btn-brainrot-mode {
    margin-top: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #ff6bd6;
    color: #050508;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(255, 107, 214, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#btn-brainrot-mode:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 0 18px rgba(255, 107, 214, 0.9);
}

#status-text {
    margin-top: 6px;
    font-size: 0.9rem;
    opacity: 0.8;
}

main {
    max-width: 1100px;
    margin: 0 auto;
}

/* INTRO */
#intro {
    margin-bottom: 32px;
    background: rgba(20, 20, 35, 0.9);
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* MUSEUM */
#museum h2 {
    margin-bottom: 8px;
}

#contamination-text {
    margin-bottom: 14px;
    font-style: italic;
}

/* GRID DE CARTES */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.card {
    background: #141427;
    border-radius: 16px;
    padding: 10px 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card img {
    width: 100%;
    height: 170px;
    border-radius: 12px;
    object-fit: cover;
}

.card h3 {
    font-size: 1.1rem;
}

.card-short {
    font-size: 0.9rem;
    opacity: 0.9;
}

.card-details {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 4px;
    display: none;
}

/* Carte ouverte */
.card.open {
    border-color: #ff6bd6;
    box-shadow: 0 0 18px rgba(255, 107, 214, 0.7);
    transform: translateY(-3px) scale(1.01);
}

.card.open .card-details {
    display: block;
}

/* Mise en avant aléatoire en mode brainrot */
.card.highlight {
    animation: wiggle 0.4s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.7);
}

/* Animation goofy */
@keyframes wiggle {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* OVERLAY DE CHAOS */
#chaos-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 50;
}

#chaos-overlay.visible {
    opacity: 1;
}

#chaos-image {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 24px;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    animation: spinZoom 0.4s ease-out;
}

@keyframes spinZoom {
    0% {
        transform: scale(0.3) rotate(-20deg);
    }
    50% {
        transform: scale(1.05) rotate(8deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* FOOTER */
footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}
