/* ============================================
   miris.monster - Pop-Art Creature Museum
   Bento Grid Bestiary
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Pop-Art Palette */
    --pop-red: #FF3B6F;
    --pop-yellow: #FFD23F;
    --pop-blue: #3B82F6;
    --pop-green: #34D399;
    --deep-panel: #1A1A2E;
    --light-panel: #F5F0FF;
    --dark-ink: #2A2A3C;
    --light-text: #E8E0F0;

    /* Grid gap color */
    --grid-gap-color: rgba(255, 59, 111, 0.6);

    /* Ben-Day dot pattern */
    --benday-dot: radial-gradient(circle, currentColor 1px, transparent 1px);
    --benday-size: 4px 4px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Merriweather', Georgia, serif;
    background-color: var(--deep-panel);
    color: var(--dark-ink);
    overflow-x: hidden;
    line-height: 1.75;
}

/* --- Typography --- */
.creature-name,
.hero-creature-name {
    font-family: 'Archivo Black', 'Impact', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: clamp(1.5rem, 3.5vw, 3rem);
}

.hero-creature-subtitle {
    font-family: 'Merriweather', Georgia, serif;
    font-style: italic;
    font-size: 1.1rem;
    margin-top: 0.25em;
}

.hero-creature-lore,
.creature-lore {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.75;
    font-weight: 400;
}

.stat {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* --- Ben-Day Dot Pattern Mixin --- */
.benday-bg::before,
.creature-card .card-front::before,
.creature-card .card-back::before,
.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, currentColor 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

/* ============================================
   HERO SECTION - Featured Monster
   ============================================ */
.hero-card {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    overflow: hidden;
    background: var(--deep-panel);
    color: var(--light-text);
}

.hero-card::before {
    color: var(--pop-red);
}

/* Diagonal split - left (creature) */
.hero-diagonal-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(135deg, var(--deep-panel) 0%, #252540 100%);
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Diagonal split - right (lore) */
.hero-diagonal-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, #252540 0%, var(--deep-panel) 100%);
    clip-path: polygon(35% 0, 100% 0, 100% 100%, 10% 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 5rem 4rem 8rem;
    z-index: 2;
}

.hero-creature-name {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--pop-red);
    text-shadow: 3px 3px 0 rgba(255, 59, 111, 0.3);
    margin-bottom: 0.1em;
}

.hero-creature-subtitle {
    color: var(--pop-yellow);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 600ms 800ms ease-out forwards;
}

.hero-creature-lore {
    color: var(--light-text);
    max-width: 500px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 600ms 1000ms ease-out forwards;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 600ms 1200ms ease-out forwards;
}

.hero-stats .stat {
    color: var(--pop-yellow);
    background: rgba(255, 210, 63, 0.1);
    padding: 0.4em 0.8em;
    border: 1px solid rgba(255, 210, 63, 0.3);
    border-radius: 4px;
}

/* --- Hero Creature CSS Silhouette --- */
.hero-creature {
    position: relative;
    width: 350px;
    height: 400px;
}

.hero-creature .creature-shape {
    position: absolute;
    opacity: 0;
    transform: scale(0.5);
    animation: shapeAssemble 400ms ease-out forwards;
}

.hero-creature .body-main {
    width: 180px;
    height: 200px;
    background: radial-gradient(ellipse at 40% 30%, var(--pop-red), #a11040);
    border-radius: 50% 50% 45% 45%;
    top: 80px;
    left: 85px;
    animation-delay: 0ms;
}

.hero-creature .eye-1 {
    width: 45px;
    height: 45px;
    background: radial-gradient(circle at 60% 40%, #fff 30%, var(--pop-yellow) 60%, var(--pop-red) 100%);
    border-radius: 50%;
    top: 100px;
    left: 110px;
    z-index: 2;
    animation-delay: 100ms;
    box-shadow: 0 0 12px rgba(255, 210, 63, 0.6);
}

.hero-creature .eye-2 {
    width: 55px;
    height: 55px;
    background: radial-gradient(circle at 60% 40%, #fff 30%, var(--pop-blue) 60%, var(--pop-red) 100%);
    border-radius: 50%;
    top: 85px;
    left: 165px;
    z-index: 2;
    animation-delay: 200ms;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.hero-creature .eye-3 {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at 60% 40%, #fff 30%, var(--pop-green) 60%, var(--pop-red) 100%);
    border-radius: 50%;
    top: 130px;
    left: 190px;
    z-index: 2;
    animation-delay: 300ms;
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.hero-creature .teeth-1,
.hero-creature .teeth-2,
.hero-creature .teeth-3 {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 25px solid #fff;
    z-index: 2;
    background: transparent;
}

.hero-creature .teeth-1 {
    top: 260px;
    left: 130px;
    animation-delay: 400ms;
}

.hero-creature .teeth-2 {
    top: 260px;
    left: 165px;
    animation-delay: 500ms;
}

.hero-creature .teeth-3 {
    top: 260px;
    left: 200px;
    animation-delay: 600ms;
}

.hero-creature .tentacle-1,
.hero-creature .tentacle-2,
.hero-creature .tentacle-3 {
    width: 20px;
    height: 100px;
    border-radius: 50% 50% 50% 50% / 0% 0% 100% 100%;
    z-index: 0;
}

.hero-creature .tentacle-1 {
    background: linear-gradient(180deg, var(--pop-red) 0%, rgba(255, 59, 111, 0.2) 100%);
    top: 270px;
    left: 100px;
    transform-origin: top center;
    animation-delay: 700ms;
}

.hero-creature .tentacle-2 {
    background: linear-gradient(180deg, var(--pop-red) 0%, rgba(255, 59, 111, 0.2) 100%);
    top: 275px;
    left: 170px;
    transform-origin: top center;
    animation-delay: 800ms;
    height: 120px;
}

.hero-creature .tentacle-3 {
    background: linear-gradient(180deg, var(--pop-red) 0%, rgba(255, 59, 111, 0.2) 100%);
    top: 265px;
    left: 235px;
    transform-origin: top center;
    animation-delay: 900ms;
    height: 90px;
}

/* Tentacle wave animation on hover */
.hero-creature:hover .tentacle-1 {
    animation: tentacleWave 1.5s ease-in-out infinite;
}
.hero-creature:hover .tentacle-2 {
    animation: tentacleWave 1.5s 0.2s ease-in-out infinite;
}
.hero-creature:hover .tentacle-3 {
    animation: tentacleWave 1.5s 0.4s ease-in-out infinite;
}

/* Eye blink animation on hover */
.hero-creature:hover .eye-1,
.hero-creature:hover .eye-2,
.hero-creature:hover .eye-3 {
    animation: eyeBlink 2s ease-in-out infinite;
}

/* --- Speech Bubble --- */
.speech-bubble {
    position: absolute;
    background: var(--pop-yellow);
    color: var(--dark-ink);
    padding: 1em 1.5em;
    border-radius: 20px;
    font-family: 'Archivo Black', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    max-width: 280px;
    z-index: 10;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 18px solid var(--pop-yellow);
}

.hero-bubble {
    bottom: 15%;
    right: 8%;
    opacity: 0;
    transform: translateX(100px);
    animation: bubbleBounceIn 700ms 1400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* --- Pop Text (ROAR!) --- */
.pop-text {
    position: absolute;
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--pop-red);
    text-shadow: 4px 4px 0 var(--pop-yellow), -2px -2px 0 var(--pop-blue);
    transform: rotate(-5deg);
    z-index: 5;
    top: 15%;
    left: 50%;
    pointer-events: none;
    opacity: 0;
    animation: popTextFlash 400ms 600ms ease-out forwards;
    letter-spacing: 0.05em;
}

/* ============================================
   BENTO GRID - Creature Cards
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 4px;
    padding: 4px;
    background: var(--grid-gap-color);
    max-width: 1400px;
    margin: 0 auto;
}

/* Card sizes */
.card-large {
    grid-column: span 3;
    grid-row: span 3;
}

.card-medium {
    grid-column: span 2;
    grid-row: span 2;
}

.card-small {
    grid-column: span 1;
    grid-row: span 1;
}

/* --- Creature Card Base --- */
.creature-card {
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    border-radius: 12px;
    overflow: visible;
}

.creature-card .card-front,
.creature-card .card-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
}

.creature-card .card-front {
    z-index: 2;
}

.creature-card .card-back {
    transform: rotateY(180deg);
    z-index: 1;
}

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

.creature-card.flipped .card-back {
    transform: rotateY(0deg);
}

/* --- Card Color Themes --- */
/* Pop Red cards */
.creature-card[data-color="red"] .card-front,
.creature-card[data-color="red"] .card-back {
    background: var(--light-panel);
    border: 3px solid var(--pop-red);
    color: var(--dark-ink);
}
.creature-card[data-color="red"] .card-front::before,
.creature-card[data-color="red"] .card-back::before {
    color: var(--pop-red);
}
.creature-card[data-color="red"] .creature-name {
    color: var(--pop-red);
}
.creature-card[data-color="red"] .stat {
    color: var(--pop-red);
}
.creature-card[data-color="red"]:hover .card-front {
    border-color: var(--pop-red);
    box-shadow: 0 0 20px rgba(255, 59, 111, 0.4), inset 0 0 20px rgba(255, 59, 111, 0.05);
}

/* Pop Yellow cards */
.creature-card[data-color="yellow"] .card-front,
.creature-card[data-color="yellow"] .card-back {
    background: var(--deep-panel);
    border: 3px solid var(--pop-yellow);
    color: var(--light-text);
}
.creature-card[data-color="yellow"] .card-front::before,
.creature-card[data-color="yellow"] .card-back::before {
    color: var(--pop-yellow);
}
.creature-card[data-color="yellow"] .creature-name {
    color: var(--pop-yellow);
}
.creature-card[data-color="yellow"] .stat {
    color: var(--pop-yellow);
}
.creature-card[data-color="yellow"] .creature-lore {
    color: var(--light-text);
}
.creature-card[data-color="yellow"]:hover .card-front {
    border-color: var(--pop-yellow);
    box-shadow: 0 0 20px rgba(255, 210, 63, 0.4), inset 0 0 20px rgba(255, 210, 63, 0.05);
}

/* Pop Blue cards */
.creature-card[data-color="blue"] .card-front,
.creature-card[data-color="blue"] .card-back {
    background: var(--light-panel);
    border: 3px solid var(--pop-blue);
    color: var(--dark-ink);
}
.creature-card[data-color="blue"] .card-front::before,
.creature-card[data-color="blue"] .card-back::before {
    color: var(--pop-blue);
}
.creature-card[data-color="blue"] .creature-name {
    color: var(--pop-blue);
}
.creature-card[data-color="blue"] .stat {
    color: var(--pop-blue);
}
.creature-card[data-color="blue"]:hover .card-front {
    border-color: var(--pop-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4), inset 0 0 20px rgba(59, 130, 246, 0.05);
}

/* Pop Green cards */
.creature-card[data-color="green"] .card-front,
.creature-card[data-color="green"] .card-back {
    background: var(--deep-panel);
    border: 3px solid var(--pop-green);
    color: var(--light-text);
}
.creature-card[data-color="green"] .card-front::before,
.creature-card[data-color="green"] .card-back::before {
    color: var(--pop-green);
}
.creature-card[data-color="green"] .creature-name {
    color: var(--pop-green);
}
.creature-card[data-color="green"] .stat {
    color: var(--pop-green);
}
.creature-card[data-color="green"] .creature-lore {
    color: var(--light-text);
}
.creature-card[data-color="green"]:hover .card-front {
    border-color: var(--pop-green);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4), inset 0 0 20px rgba(52, 211, 153, 0.05);
}

/* --- Card Content Layout --- */
.creature-card .creature-name {
    font-size: clamp(0.9rem, 2vw, 1.5rem);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.card-large .creature-name {
    font-size: clamp(1.5rem, 3.5vw, 3rem);
}

/* --- Creature Illustration Area --- */
.creature-illustration {
    position: relative;
    flex: 1;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.creature-illustration .creature-shape {
    position: absolute;
    transition: transform 0.3s ease;
}

/* --- Creature Shape Primitives --- */

/* Circles */
.creature-shape.cir {
    border-radius: 50%;
}

/* Triangles */
.creature-shape.tri {
    width: 0;
    height: 0;
    background: transparent;
}

/* Rectangles */
.creature-shape.rect {
    border-radius: 3px;
}

/* Wave shapes */
.creature-shape.wave {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

/* ===========================================
   INDIVIDUAL CREATURE ILLUSTRATIONS
   =========================================== */

/* --- Phosphora (red, large) --- */
.creature-card[data-index="0"] .c-eye-1 {
    width: 24px; height: 24px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-red));
    top: 25%; left: 32%;
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 59, 111, 0.5);
}
.creature-card[data-index="0"] .c-eye-2 {
    width: 20px; height: 20px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-red));
    top: 30%; left: 55%;
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 59, 111, 0.5);
}
.creature-card[data-index="0"] .c-body-1 {
    width: 90px; height: 80px;
    background: radial-gradient(ellipse at 40% 30%, var(--pop-red), #8b1a3a);
    top: 20%; left: 25%;
    border-radius: 50% 50% 40% 40%;
}
.creature-card[data-index="0"] .c-body-2 {
    width: 60px; height: 55px;
    background: radial-gradient(ellipse at 50% 40%, var(--pop-red), #8b1a3a);
    top: 50%; left: 45%;
    border-radius: 40% 50% 50% 40%;
    opacity: 0.8;
}
.creature-card[data-index="0"] .c-wing-1 {
    border-left: 45px solid transparent;
    border-right: 45px solid transparent;
    border-bottom: 70px solid rgba(255, 59, 111, 0.4);
    top: 5%; left: 10%;
    transform: rotate(-15deg);
}
.creature-card[data-index="0"] .c-wing-2 {
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 60px solid rgba(255, 59, 111, 0.4);
    top: 8%; left: 55%;
    transform: rotate(15deg);
}
.creature-card[data-index="0"] .c-glow-1 {
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255, 59, 111, 0.3) 0%, transparent 70%);
    top: 15%; left: 20%;
    z-index: 0;
}

/* --- Thornwick (yellow, medium) --- */
.creature-card[data-index="1"] .c-eye-1 {
    width: 16px; height: 16px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-yellow));
    top: 22%; left: 42%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.6);
}
.creature-card[data-index="1"] .c-body-cactus {
    width: 50px; height: 70px;
    background: linear-gradient(180deg, var(--pop-yellow) 0%, #b8940a 100%);
    top: 25%; left: 32%;
    border-radius: 35% 35% 10% 10%;
}
.creature-card[data-index="1"] .c-spike-1 {
    width: 6px; height: 25px;
    background: var(--pop-yellow);
    top: 18%; left: 30%;
    transform: rotate(-30deg);
}
.creature-card[data-index="1"] .c-spike-2 {
    width: 6px; height: 20px;
    background: var(--pop-yellow);
    top: 15%; left: 55%;
    transform: rotate(25deg);
}
.creature-card[data-index="1"] .c-spike-3 {
    width: 6px; height: 22px;
    background: var(--pop-yellow);
    top: 35%; left: 62%;
    transform: rotate(35deg);
}
.creature-card[data-index="1"] .c-flower {
    width: 20px; height: 20px;
    background: radial-gradient(circle, var(--pop-red) 30%, var(--pop-yellow) 100%);
    top: 12%; left: 48%;
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 59, 111, 0.4);
}

/* --- Vexmist (blue, medium) --- */
.creature-card[data-index="2"] .c-eye-1 {
    width: 14px; height: 14px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-blue));
    top: 25%; left: 30%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}
.creature-card[data-index="2"] .c-eye-2 {
    width: 18px; height: 18px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-blue));
    top: 20%; left: 48%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}
.creature-card[data-index="2"] .c-eye-3 {
    width: 12px; height: 12px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-blue));
    top: 30%; left: 60%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}
.creature-card[data-index="2"] .c-mist-1 {
    width: 80px; height: 50px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.5) 0%, rgba(59, 130, 246, 0.15) 100%);
    top: 30%; left: 20%;
}
.creature-card[data-index="2"] .c-mist-2 {
    width: 70px; height: 45px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.5) 100%);
    top: 45%; left: 35%;
}
.creature-card[data-index="2"] .c-core {
    width: 25px; height: 25px;
    background: radial-gradient(circle, #fff 20%, var(--pop-blue) 80%);
    top: 38%; left: 42%;
    z-index: 2;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.7);
}

/* --- Nublet (green, small) --- */
.creature-card[data-index="3"] .c-eye-single {
    width: 14px; height: 14px;
    background: radial-gradient(circle at 55% 45%, #fff 40%, var(--pop-green));
    top: 28%; left: 47%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}
.creature-card[data-index="3"] .c-blob {
    width: 40px; height: 38px;
    background: radial-gradient(ellipse at 40% 30%, var(--pop-green), #15724d);
    top: 30%; left: 32%;
}

/* --- Embrix (red, small) --- */
.creature-card[data-index="4"] .c-flame {
    border-left: 22px solid transparent;
    border-right: 22px solid transparent;
    border-bottom: 40px solid var(--pop-red);
    top: 18%; left: 30%;
}
.creature-card[data-index="4"] .c-eye-single {
    width: 10px; height: 10px;
    background: radial-gradient(circle at 55% 45%, #fff 40%, var(--pop-yellow));
    top: 42%; left: 45%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.6);
}
.creature-card[data-index="4"] .c-ember-1 {
    width: 8px; height: 8px;
    background: var(--pop-yellow);
    top: 60%; left: 30%;
    box-shadow: 0 0 6px rgba(255, 210, 63, 0.8);
}
.creature-card[data-index="4"] .c-ember-2 {
    width: 6px; height: 6px;
    background: var(--pop-yellow);
    top: 55%; left: 60%;
    box-shadow: 0 0 6px rgba(255, 210, 63, 0.8);
}

/* --- Quilljaw (yellow, medium) --- */
.creature-card[data-index="5"] .c-eye-1 {
    width: 14px; height: 14px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-yellow));
    top: 28%; left: 35%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.6);
}
.creature-card[data-index="5"] .c-eye-2 {
    width: 14px; height: 14px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-yellow));
    top: 28%; left: 55%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.6);
}
.creature-card[data-index="5"] .c-round {
    width: 60px; height: 55px;
    background: radial-gradient(ellipse at 40% 30%, var(--pop-yellow), #9e8200);
    top: 25%; left: 28%;
}
.creature-card[data-index="5"] .c-quill-1 {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 30px solid var(--pop-yellow);
    top: 8%; left: 32%;
    transform: rotate(-20deg);
}
.creature-card[data-index="5"] .c-quill-2 {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 28px solid var(--pop-yellow);
    top: 5%; left: 45%;
}
.creature-card[data-index="5"] .c-quill-3 {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 30px solid var(--pop-yellow);
    top: 8%; left: 58%;
    transform: rotate(20deg);
}
.creature-card[data-index="5"] .c-quill-4 {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 25px solid var(--pop-yellow);
    top: 12%; left: 68%;
    transform: rotate(35deg);
}
.creature-card[data-index="5"] .c-jaw {
    width: 40px; height: 12px;
    background: var(--pop-red);
    top: 55%; left: 35%;
    border-radius: 0 0 8px 8px;
}

/* --- Celestrix (blue, large) --- */
.creature-card[data-index="6"] .c-eye-1 {
    width: 22px; height: 22px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-blue));
    top: 32%; left: 38%;
    z-index: 3;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}
.creature-card[data-index="6"] .c-eye-2 {
    width: 18px; height: 18px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-blue));
    top: 28%; left: 55%;
    z-index: 3;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}
.creature-card[data-index="6"] .c-nebula {
    width: 100px; height: 90px;
    background: radial-gradient(ellipse at 45% 45%, rgba(59, 130, 246, 0.7), rgba(59, 130, 246, 0.1));
    top: 22%; left: 25%;
    border-radius: 50%;
}
.creature-card[data-index="6"] .c-ring-1 {
    width: 130px; height: 30px;
    background: transparent;
    border: 2px solid rgba(59, 130, 246, 0.5);
    top: 38%; left: 18%;
    border-radius: 50%;
    transform: rotate(-10deg);
}
.creature-card[data-index="6"] .c-ring-2 {
    width: 110px; height: 25px;
    background: transparent;
    border: 2px solid rgba(255, 210, 63, 0.4);
    top: 42%; left: 24%;
    border-radius: 50%;
    transform: rotate(5deg);
}
.creature-card[data-index="6"] .c-star-1 {
    width: 8px; height: 8px;
    background: #fff;
    top: 18%; left: 60%;
    box-shadow: 0 0 8px #fff, 0 0 16px var(--pop-blue);
}
.creature-card[data-index="6"] .c-star-2 {
    width: 6px; height: 6px;
    background: #fff;
    top: 55%; left: 20%;
    box-shadow: 0 0 6px #fff, 0 0 12px var(--pop-yellow);
}
.creature-card[data-index="6"] .c-star-3 {
    width: 5px; height: 5px;
    background: #fff;
    top: 65%; left: 70%;
    box-shadow: 0 0 6px #fff, 0 0 12px var(--pop-green);
}

/* --- Drizzle (green, small) --- */
.creature-card[data-index="7"] .c-eye-single {
    width: 10px; height: 10px;
    background: radial-gradient(circle at 55% 45%, #fff 40%, var(--pop-green));
    top: 30%; left: 47%;
    z-index: 3;
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}
.creature-card[data-index="7"] .c-drop {
    width: 32px; height: 36px;
    background: radial-gradient(ellipse at 40% 35%, var(--pop-green), #0d7a4f);
    top: 25%; left: 36%;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.creature-card[data-index="7"] .c-splash-1 {
    width: 10px; height: 10px;
    background: rgba(52, 211, 153, 0.5);
    top: 62%; left: 32%;
}
.creature-card[data-index="7"] .c-splash-2 {
    width: 8px; height: 8px;
    background: rgba(52, 211, 153, 0.4);
    top: 60%; left: 55%;
}

/* --- Shriekfang (red, medium) --- */
.creature-card[data-index="8"] .c-eye-1 {
    width: 14px; height: 14px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-red));
    top: 22%; left: 36%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 59, 111, 0.6);
}
.creature-card[data-index="8"] .c-eye-2 {
    width: 14px; height: 14px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-red));
    top: 22%; left: 55%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 59, 111, 0.6);
}
.creature-card[data-index="8"] .c-bat {
    border-left: 35px solid transparent;
    border-right: 35px solid transparent;
    border-bottom: 50px solid var(--pop-red);
    top: 25%; left: 22%;
}
.creature-card[data-index="8"] .c-wing-1 {
    border-left: 30px solid transparent;
    border-right: 0 solid transparent;
    border-bottom: 35px solid rgba(255, 59, 111, 0.5);
    top: 20%; left: 8%;
    transform: rotate(-10deg);
}
.creature-card[data-index="8"] .c-wing-2 {
    border-left: 0 solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 35px solid rgba(255, 59, 111, 0.5);
    top: 20%; left: 65%;
    transform: rotate(10deg);
}
.creature-card[data-index="8"] .c-fang-1 {
    width: 4px; height: 14px;
    background: #fff;
    top: 52%; left: 40%;
    border-radius: 0 0 2px 2px;
}
.creature-card[data-index="8"] .c-fang-2 {
    width: 4px; height: 14px;
    background: #fff;
    top: 52%; left: 55%;
    border-radius: 0 0 2px 2px;
}

/* --- Fizzbot (yellow, small) --- */
.creature-card[data-index="9"] .c-box {
    width: 30px; height: 28px;
    background: linear-gradient(135deg, var(--pop-yellow) 0%, #b89500 100%);
    top: 30%; left: 35%;
    border-radius: 4px;
}
.creature-card[data-index="9"] .c-eye-single {
    width: 12px; height: 12px;
    background: radial-gradient(circle at 55% 45%, #fff 40%, var(--pop-red));
    top: 33%; left: 44%;
    z-index: 3;
    box-shadow: 0 0 6px rgba(255, 59, 111, 0.6);
}
.creature-card[data-index="9"] .c-antenna {
    width: 3px; height: 18px;
    background: var(--pop-yellow);
    top: 15%; left: 50%;
}
.creature-card[data-index="9"] .c-spark {
    width: 8px; height: 8px;
    background: #fff;
    top: 12%; left: 48%;
    box-shadow: 0 0 8px var(--pop-yellow);
}

/* --- Glint (blue, small) --- */
.creature-card[data-index="10"] .c-eye-single {
    width: 10px; height: 10px;
    background: radial-gradient(circle at 55% 45%, #fff 40%, var(--pop-blue));
    top: 30%; left: 48%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
}
.creature-card[data-index="10"] .c-crystal {
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 35px solid var(--pop-blue);
    top: 22%; left: 30%;
}
.creature-card[data-index="10"] .c-shine {
    width: 10px; height: 10px;
    background: #fff;
    top: 18%; left: 55%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--pop-blue);
}

/* --- Mossgrip (green, medium) --- */
.creature-card[data-index="11"] .c-eye-1 {
    width: 16px; height: 16px;
    background: radial-gradient(circle at 60% 40%, #fff 35%, var(--pop-yellow));
    top: 20%; left: 45%;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255, 210, 63, 0.6);
}
.creature-card[data-index="11"] .c-trunk {
    width: 45px; height: 65px;
    background: linear-gradient(180deg, var(--pop-green) 0%, #0d6b3f 100%);
    top: 22%; left: 34%;
    border-radius: 30% 30% 10% 10%;
}
.creature-card[data-index="11"] .c-branch-1 {
    width: 30px; height: 6px;
    background: var(--pop-green);
    top: 30%; left: 18%;
    transform: rotate(-20deg);
    border-radius: 3px;
}
.creature-card[data-index="11"] .c-branch-2 {
    width: 28px; height: 6px;
    background: var(--pop-green);
    top: 35%; left: 58%;
    transform: rotate(15deg);
    border-radius: 3px;
}
.creature-card[data-index="11"] .c-leaf-1 {
    width: 16px; height: 16px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.7), rgba(52, 211, 153, 0.2));
    top: 22%; left: 12%;
}
.creature-card[data-index="11"] .c-leaf-2 {
    width: 14px; height: 14px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.7), rgba(52, 211, 153, 0.2));
    top: 18%; left: 65%;
}
.creature-card[data-index="11"] .c-leaf-3 {
    width: 12px; height: 12px;
    background: radial-gradient(circle, rgba(255, 210, 63, 0.6), rgba(255, 210, 63, 0.1));
    top: 28%; left: 72%;
}

/* --- Card Stats Bar --- */
.card-stats {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    position: relative;
    z-index: 1;
}

.card-stats .stat {
    padding: 0.2em 0.5em;
    background: rgba(128, 128, 128, 0.08);
    border-radius: 3px;
    font-size: 0.6rem;
    white-space: nowrap;
}

.card-small .card-stats .stat {
    font-size: 0.5rem;
    padding: 0.15em 0.35em;
}

.card-small .creature-name {
    font-size: clamp(0.7rem, 1.5vw, 1rem);
}

/* --- Card Back Styles --- */
.card-back .creature-name {
    margin-bottom: 0.8rem;
}

.card-back .creature-lore {
    font-size: 0.85rem;
    line-height: 1.65;
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-small .card-back .creature-lore {
    font-size: 0.72rem;
    line-height: 1.5;
}

/* --- Card Speech Bubbles --- */
.card-bubble {
    position: absolute;
    bottom: 55%;
    right: -15px;
    font-size: 0.75rem;
    padding: 0.6em 1em;
    max-width: 200px;
    opacity: 0;
    transform: scale(0.8) translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.creature-card:hover .card-bubble {
    opacity: 1;
    transform: scale(1) translateX(0);
}

/* --- Fade Reveal Animation (scroll reveal) --- */
.creature-card {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
    transition: opacity 0.5s ease-out, clip-path 0.5s ease-out, box-shadow 0.3s ease;
}

.creature-card.revealed {
    opacity: 1;
    clip-path: inset(0 0 0 0);
}

/* --- Creature Hover Animations --- */
.creature-card:hover .c-eye,
.creature-card:hover .c-eye-single,
.creature-card:hover .c-eye-1,
.creature-card:hover .c-eye-2,
.creature-card:hover .c-eye-3 {
    animation: eyeBlink 2s ease-in-out infinite;
}

.creature-card:hover .c-wing-1 {
    animation: wingFlap 0.8s ease-in-out infinite alternate;
}

.creature-card:hover .c-wing-2 {
    animation: wingFlap 0.8s 0.1s ease-in-out infinite alternate;
}

.creature-card:hover .c-tentacle,
.creature-card:hover .c-branch-1,
.creature-card:hover .c-branch-2 {
    animation: tentacleWave 1.5s ease-in-out infinite;
}

.creature-card:hover .c-ember-1 {
    animation: emberFloat 1s ease-in-out infinite;
}

.creature-card:hover .c-ember-2 {
    animation: emberFloat 1.2s 0.3s ease-in-out infinite;
}

.creature-card:hover .c-spark {
    animation: sparkle 0.6s ease-in-out infinite;
}

.creature-card:hover .c-splash-1 {
    animation: splashBounce 0.7s ease-in-out infinite;
}

.creature-card:hover .c-splash-2 {
    animation: splashBounce 0.7s 0.2s ease-in-out infinite;
}

.creature-card:hover .c-ring-1 {
    animation: ringPulse 2s ease-in-out infinite;
}

.creature-card:hover .c-ring-2 {
    animation: ringPulse 2s 0.5s ease-in-out infinite;
}

.creature-card:hover .c-star-1,
.creature-card:hover .c-star-2,
.creature-card:hover .c-star-3 {
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.creature-card:hover .c-shine {
    animation: sparkle 0.8s ease-in-out infinite;
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes shapeAssemble {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bubbleBounceIn {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translateX(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes popTextFlash {
    0% {
        opacity: 0;
        transform: rotate(-5deg) scale(0.7);
    }
    50% {
        opacity: 1;
        transform: rotate(-5deg) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: rotate(-5deg) scale(1);
    }
}

@keyframes eyeBlink {
    0%, 40%, 60%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.1);
    }
}

@keyframes tentacleWave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(8deg);
    }
    75% {
        transform: rotate(-8deg);
    }
}

@keyframes wingFlap {
    0% {
        transform: rotate(-15deg) scaleY(1);
    }
    100% {
        transform: rotate(-15deg) scaleY(0.7);
    }
}

@keyframes emberFloat {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-8px);
        opacity: 0.6;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(1.5);
    }
}

@keyframes splashBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.2);
    }
}

@keyframes ringPulse {
    0%, 100% {
        transform: rotate(-10deg) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: rotate(-10deg) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.5);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet: 3 columns */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(150px, auto);
    }

    .card-large {
        grid-column: span 3;
        grid-row: span 2;
    }

    .card-medium {
        grid-column: span 2;
        grid-row: span 2;
    }

    .card-small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .hero-diagonal-right {
        padding: 3rem 3rem 3rem 5rem;
    }
}

/* Mobile: 1 column, vertical hero split */
@media (max-width: 640px) {
    .hero-card {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .hero-diagonal-left {
        position: relative;
        width: 100%;
        height: 50vh;
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    }

    .hero-diagonal-right {
        position: relative;
        width: 100%;
        height: auto;
        clip-path: none;
        padding: 2rem 1.5rem 3rem;
    }

    .hero-creature-name {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .hero-bubble {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1.5rem;
        display: inline-block;
    }

    .pop-text {
        font-size: clamp(3rem, 15vw, 5rem);
        top: 20%;
        left: 30%;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(200px, auto);
    }

    .card-large,
    .card-medium,
    .card-small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .card-large {
        min-height: 350px;
    }

    .card-medium {
        min-height: 280px;
    }

    .card-small {
        min-height: 200px;
    }

    .card-bubble {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 0.5rem;
        opacity: 1;
        transform: none;
    }

    .hero-stats {
        gap: 0.8rem;
    }
}

/* ============================================
   ADDITIONAL POLISH
   ============================================ */

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--deep-panel);
}

::-webkit-scrollbar-thumb {
    background: var(--pop-red);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pop-yellow);
}

/* Selection color */
::selection {
    background: var(--pop-red);
    color: #fff;
}
