/* ===========================
   quirk.bar - Electric Happy Hour
   =========================== */

/* --- CSS Custom Properties --- */
:root {
    --void-purple: #1A1128;
    --soft-mauve: #2D2243;
    --serotonin: #FF6B9D;
    --caffeine: #C8FF2E;
    --aperol: #FF7F3F;
    --curacao: #3BCEAC;
    --blacklight: #9B5DE5;
    --chalk: #F0EDE8;
    --haze: #8B8698;
    --deep-bottom: #221838;
    --bar-surface: #1A1128;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--chalk);
    background: linear-gradient(180deg, var(--void-purple) 0%, var(--deep-bottom) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 80px;
}

/* --- Dot-Matrix Overlay --- */
.dot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: radial-gradient(circle, var(--chalk) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.04;
}

/* --- Confetti Container --- */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    pointer-events: none;
    animation: confettiFall 1.5s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0);
        opacity: 0;
    }
}

/* --- Masonry Grid --- */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
    gap: 16px;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* --- Quirk Cards --- */
.quirk-card {
    background: var(--soft-mauve);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-width 0.3s ease;
    border-top: 4px solid transparent;
    perspective: 800px;
    overflow: hidden;
}

/* Signature colors for cards */
.quirk-card[data-color="serotonin"] {
    border-top-color: var(--serotonin);
}
.quirk-card[data-color="caffeine"] {
    border-top-color: var(--caffeine);
}
.quirk-card[data-color="aperol"] {
    border-top-color: var(--aperol);
}
.quirk-card[data-color="curacao"] {
    border-top-color: var(--curacao);
}
.quirk-card[data-color="blacklight"] {
    border-top-color: var(--blacklight);
}

/* Card hover states */
.quirk-card:hover {
    transform: translateY(-8px) translateZ(40px);
    border-top-width: 6px;
}

.quirk-card[data-color="serotonin"]:hover {
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.2),
                0 0 60px rgba(255, 107, 157, 0.1),
                0 0 100px rgba(255, 107, 157, 0.05);
}
.quirk-card[data-color="caffeine"]:hover {
    box-shadow: 0 0 20px rgba(200, 255, 46, 0.2),
                0 0 60px rgba(200, 255, 46, 0.1),
                0 0 100px rgba(200, 255, 46, 0.05);
}
.quirk-card[data-color="aperol"]:hover {
    box-shadow: 0 0 20px rgba(255, 127, 63, 0.2),
                0 0 60px rgba(255, 127, 63, 0.1),
                0 0 100px rgba(255, 127, 63, 0.05);
}
.quirk-card[data-color="curacao"]:hover {
    box-shadow: 0 0 20px rgba(59, 206, 172, 0.2),
                0 0 60px rgba(59, 206, 172, 0.1),
                0 0 100px rgba(59, 206, 172, 0.05);
}
.quirk-card[data-color="blacklight"]:hover {
    box-shadow: 0 0 20px rgba(155, 93, 229, 0.2),
                0 0 60px rgba(155, 93, 229, 0.1),
                0 0 100px rgba(155, 93, 229, 0.05);
}

/* Speed up animations on hover */
.quirk-card:hover .quirk-shape {
    animation-duration: 3s !important;
}

/* Click spring effect */
.quirk-card.clicked {
    transform: scale(1.02);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Card expanded state */
.quirk-card.expanded .card-detail {
    max-height: 200px;
    opacity: 1;
    margin-top: 12px;
}

/* Card sizes */
.title-card {
    grid-column: span 3;
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    text-align: center;
}

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

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

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

/* --- Card Inner Content --- */
.card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 12px;
    color: var(--chalk);
}

.card-desc {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    color: var(--haze);
    margin-top: 4px;
}

.card-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.4s ease;
}

.card-detail p {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.75rem, 1.3vw, 0.9rem);
    color: var(--haze);
    line-height: 1.5;
}

/* --- Title Card --- */
.site-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--serotonin);
}

.site-title span {
    display: inline-block;
    animation: colorCycle 10s infinite linear;
}

.site-title span:nth-child(1) { animation-delay: 0s; }
.site-title span:nth-child(2) { animation-delay: 0.5s; }
.site-title span:nth-child(3) { animation-delay: 1.0s; }
.site-title span:nth-child(4) { animation-delay: 1.5s; }
.site-title span:nth-child(5) { animation-delay: 2.0s; }
.site-title span:nth-child(6) { animation-delay: 2.5s; }
.site-title span:nth-child(7) { animation-delay: 3.0s; }
.site-title span:nth-child(8) { animation-delay: 3.5s; }
.site-title span:nth-child(9) { animation-delay: 4.0s; }

@keyframes colorCycle {
    0%, 100% { color: var(--serotonin); }
    20% { color: var(--caffeine); }
    40% { color: var(--aperol); }
    60% { color: var(--curacao); }
    80% { color: var(--blacklight); }
}

.site-subtitle {
    font-family: 'Architects Daughter', cursive;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--haze);
    margin-top: 12px;
}

/* --- Quirk Shapes --- */
.quirk-shape {
    width: 80px;
    height: 80px;
    margin: 8px auto;
    position: relative;
}

/* Morphing Circle */
.morph-circle {
    background: var(--caffeine);
    border-radius: 50%;
    animation: morphShape 6s ease-in-out infinite;
}

@keyframes morphShape {
    0%, 100% { border-radius: 50%; transform: rotate(0deg); }
    33% { border-radius: 8px; transform: rotate(60deg); }
    66% { border-radius: 50% 0 50% 0; transform: rotate(120deg); }
}

/* Dot Grid */
.dot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 80px;
    height: 80px;
}

.dot-grid::before,
.dot-grid::after {
    content: '';
    display: none;
}

/* Spinning Hexagon */
.spin-hex {
    width: 70px;
    height: 40px;
    background: var(--curacao);
    position: relative;
    margin: 20px auto;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: spinHex 4s linear infinite;
}

@keyframes spinHex {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Bounce Rect */
.bounce-rect {
    width: 50px;
    height: 50px;
    background: var(--blacklight);
    border-radius: 12px;
    margin: 15px auto;
    animation: bounceSquash 1.5s ease-in-out infinite;
}

@keyframes bounceSquash {
    0%, 100% { transform: translateY(0) scaleX(1) scaleY(1); }
    30% { transform: translateY(-30px) scaleX(0.9) scaleY(1.1); }
    50% { transform: translateY(0) scaleX(1.15) scaleY(0.85); }
    70% { transform: translateY(-15px) scaleX(0.95) scaleY(1.05); }
}

/* Breathing Square */
.breathe-square {
    width: 60px;
    height: 60px;
    margin: 10px auto;
    border-radius: 8px;
    animation: breatheColor 8s ease-in-out infinite;
}

@keyframes breatheColor {
    0%, 100% { background: var(--serotonin); transform: scale(1); }
    20% { background: var(--caffeine); transform: scale(1.1); }
    40% { background: var(--aperol); transform: scale(0.95); }
    60% { background: var(--curacao); transform: scale(1.08); }
    80% { background: var(--blacklight); transform: scale(1); }
}

/* Rotating Triangle */
.rotate-triangle {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid var(--caffeine);
    background: transparent;
    margin: 5px auto;
    animation: rotateTriangle 8s linear infinite;
}

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

/* Concentric Circles */
.concentric-circles {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--aperol);
    position: relative;
    margin: 0 auto;
    animation: pulseConc 3s ease-in-out infinite;
}

.concentric-circles::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 3px solid var(--aperol);
    animation: pulseConc 3s ease-in-out 0.3s infinite;
}

.concentric-circles::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid var(--aperol);
    animation: pulseConc 3s ease-in-out 0.6s infinite;
}

@keyframes pulseConc {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.6; }
}

/* Fix first concentric circle which doesn't need translate */
.concentric-circles {
    animation: pulseConcOuter 3s ease-in-out infinite;
}

@keyframes pulseConcOuter {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* Wave Bars */
.wave-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 80px;
    width: 80px;
    margin: 0 auto;
}

/* Orbit Dots */
.orbit-dots {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto;
    animation: orbitSpin 4s linear infinite;
}

.orbit-dots::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--blacklight);
    border-radius: 50%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.orbit-dots::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--blacklight);
    border-radius: 50%;
    bottom: 10px;
    right: 5px;
    opacity: 0.6;
}

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

/* Glitch Square */
.glitch-square {
    width: 60px;
    height: 60px;
    background: var(--serotonin);
    margin: 10px auto;
    animation: glitchJitter 0.3s steps(5) infinite;
}

@keyframes glitchJitter {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3px, 2px); }
    40% { transform: translate(3px, -2px); }
    60% { transform: translate(-2px, -3px); }
    80% { transform: translate(2px, 3px); }
    100% { transform: translate(0, 0); }
}

/* Scale Diamond */
.scale-diamond {
    width: 50px;
    height: 50px;
    background: var(--caffeine);
    margin: 15px auto;
    transform: rotate(45deg);
    animation: scalePulse 2s ease-in-out infinite;
}

@keyframes scalePulse {
    0%, 100% { transform: rotate(45deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.25); box-shadow: 0 0 30px rgba(200, 255, 46, 0.4); }
}

/* Crosshair */
.crosshair {
    width: 70px;
    height: 70px;
    position: relative;
    margin: 5px auto;
    animation: crosshairSpin 6s linear infinite;
}

.crosshair::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--aperol);
    transform: translateY(-50%);
}

.crosshair::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--aperol);
    transform: translateX(-50%);
}

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

/* Stacked Bars */
.stacked-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

/* Pulse Ring */
.pulse-ring {
    width: 60px;
    height: 60px;
    border: 4px solid var(--blacklight);
    border-radius: 50%;
    margin: 10px auto;
    animation: pulseRing 2s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); border-width: 4px; opacity: 1; }
    50% { transform: scale(1.3); border-width: 2px; opacity: 0.6; }
}

/* Zigzag Line */
.zigzag-line {
    width: 80px;
    height: 40px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
}

.zigzag-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -80px;
    width: 160px;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--serotonin) 0px,
        var(--serotonin) 10px,
        transparent 10px,
        transparent 12px
    );
    transform: translateY(-50%);
    animation: zigzagScroll 2s linear infinite;
}

@keyframes zigzagScroll {
    0% { transform: translateY(-50%) translateX(0); }
    100% { transform: translateY(-50%) translateX(80px); }
}

/* Rotate Plus */
.rotate-plus {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 10px auto;
    animation: rotatePlus 4s linear infinite;
}

.rotate-plus::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 10px;
    background: var(--caffeine);
    transform: translateY(-50%);
    border-radius: 5px;
}

.rotate-plus::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    width: 10px;
    height: 80%;
    background: var(--caffeine);
    transform: translateX(-50%);
    border-radius: 5px;
}

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

/* Blink Eye */
.blink-eye {
    width: 80px;
    height: 40px;
    background: var(--aperol);
    border-radius: 80px 80px 80px 80px / 40px 40px 40px 40px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    animation: blinkEye 4s ease-in-out infinite;
}

.blink-eye::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--void-purple);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes blinkEye {
    0%, 40%, 50%, 100% { transform: scaleY(1); }
    45% { transform: scaleY(0.05); }
}

/* Expanding Squares */
.expand-squares {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto;
}

.expand-squares::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--curacao);
    transform: translate(-50%, -50%);
    animation: expandSq 3s ease-out infinite;
}

.expand-squares::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--curacao);
    transform: translate(-50%, -50%);
    animation: expandSq 3s ease-out 1s infinite;
}

@keyframes expandSq {
    0% { width: 10px; height: 10px; opacity: 1; }
    100% { width: 80px; height: 80px; opacity: 0; }
}

/* Flip Disc */
.flip-disc {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--blacklight);
    margin: 10px auto;
    animation: flipDisc 2s ease-in-out infinite;
}

@keyframes flipDisc {
    0%, 100% { transform: rotateY(0deg); background: var(--blacklight); }
    50% { transform: rotateY(180deg); background: var(--serotonin); }
}

/* Particle Cloud */
.particle-cloud {
    width: 120px;
    height: 60px;
    position: relative;
    margin: 10px auto;
}

/* Pendulum */
.pendulum {
    width: 4px;
    height: 60px;
    background: var(--caffeine);
    margin: 0 auto;
    transform-origin: top center;
    animation: pendulumSwing 2s ease-in-out infinite;
    border-radius: 2px;
    position: relative;
}

.pendulum::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--caffeine);
    border-radius: 50%;
}

@keyframes pendulumSwing {
    0%, 100% { transform: rotate(30deg); }
    50% { transform: rotate(-30deg); }
}

/* Loading Spinner */
.loading-spin {
    width: 60px;
    height: 60px;
    border: 5px solid var(--caffeine);
    border-top-color: transparent;
    border-radius: 50%;
    margin: 10px auto;
    animation: loadSpin 1s linear infinite;
}

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

/* DNA Helix */
.dna-helix {
    width: 40px;
    height: 100px;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.dna-helix::before,
.dna-helix::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--curacao);
    border-radius: 50%;
}

.dna-helix::before {
    animation: dnaLeft 2s ease-in-out infinite;
}

.dna-helix::after {
    animation: dnaRight 2s ease-in-out infinite;
}

@keyframes dnaLeft {
    0% { top: 0; left: 0; }
    25% { top: 25%; left: 30px; }
    50% { top: 50%; left: 0; }
    75% { top: 75%; left: 30px; }
    100% { top: 100%; left: 0; }
}

@keyframes dnaRight {
    0% { top: 0; left: 30px; }
    25% { top: 25%; left: 0; }
    50% { top: 50%; left: 30px; }
    75% { top: 75%; left: 0; }
    100% { top: 100%; left: 30px; }
}

/* Radar Sweep */
.radar-sweep {
    width: 70px;
    height: 70px;
    border: 2px solid var(--blacklight);
    border-radius: 50%;
    margin: 5px auto;
    position: relative;
    overflow: hidden;
}

.radar-sweep::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: var(--blacklight);
    transform-origin: left center;
    animation: radarSweep 3s linear infinite;
}

.radar-sweep::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(155, 93, 229, 0.3) 30deg, transparent 60deg);
    transform-origin: left top;
    animation: radarSweep 3s linear infinite;
}

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

/* Blob */
.blob {
    width: 70px;
    height: 70px;
    background: var(--serotonin);
    margin: 5px auto;
    animation: blobMorph 6s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 50% 70% 60%; }
    75% { border-radius: 40% 60% 50% 40% / 60% 40% 60% 30%; }
}

/* --- Emoji Markers --- */
.emoji-marker {
    grid-column: span 3;
    text-align: center;
    font-size: clamp(4rem, 8vw, 8rem);
    padding: 24px 0;
    animation: emojiPulse 2s ease-in-out infinite;
    text-shadow: 0 0 30px var(--blacklight), 0 0 60px rgba(155, 93, 229, 0.3);
    line-height: 1;
}

@keyframes emojiPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* --- Featured Quirks --- */
.featured-quirk {
    grid-column: 1 / -1;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    padding: 48px 24px;
}

.featured-1 {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, var(--soft-mauve) 50%, rgba(255, 107, 157, 0.1) 100%);
    border: 2px solid rgba(255, 107, 157, 0.3);
}

.featured-2 {
    background: linear-gradient(135deg, rgba(200, 255, 46, 0.1) 0%, var(--soft-mauve) 50%, rgba(200, 255, 46, 0.08) 100%);
    border: 2px solid rgba(200, 255, 46, 0.3);
}

.featured-3 {
    background: linear-gradient(135deg, rgba(255, 127, 63, 0.12) 0%, var(--soft-mauve) 50%, rgba(255, 127, 63, 0.08) 100%);
    border: 2px solid rgba(255, 127, 63, 0.3);
}

.featured-inner {
    max-width: 600px;
}

.featured-label {
    font-family: 'Architects Daughter', cursive;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--haze);
    text-transform: lowercase;
    display: block;
    margin-bottom: 16px;
}

.featured-title {
    font-family: 'Bungee', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 32px;
}

.featured-1 .featured-title { color: var(--serotonin); }
.featured-2 .featured-title { color: var(--caffeine); }
.featured-3 .featured-title { color: var(--aperol); }

.featured-caption {
    font-family: 'Architects Daughter', cursive;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    color: var(--haze);
    margin-top: 32px;
}

/* Featured Shapes */
.featured-shape {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

/* Dopamine Drip */
.dopamine-drip {
    width: 40px;
    height: 40px;
    background: var(--serotonin);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: dripFall 3s ease-in infinite;
}

.dopamine-drip::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: var(--serotonin);
    border-radius: 50%;
    opacity: 0.3;
    animation: dripPool 3s ease-in infinite;
}

@keyframes dripFall {
    0% { top: 0; width: 40px; height: 40px; opacity: 1; }
    60% { top: 0; width: 35px; height: 50px; opacity: 1; }
    80% { top: 130px; width: 30px; height: 30px; opacity: 0.8; }
    100% { top: 150px; width: 80px; height: 15px; opacity: 0.3; border-radius: 50%; }
}

@keyframes dripPool {
    0%, 60% { width: 0; opacity: 0; }
    80% { width: 60px; opacity: 0.2; }
    100% { width: 120px; opacity: 0.1; }
}

/* Caffeine Cascade */
.caffeine-cascade {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Aperol Spritz */
.aperol-spritz {
    width: 40px;
    height: 40px;
    border: 4px solid var(--aperol);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spritzExpand 3s ease-out infinite;
}

.aperol-spritz::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--aperol);
    border-radius: 50%;
    animation: spritzExpand 3s ease-out 1s infinite;
}

.aperol-spritz::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--aperol);
    border-radius: 50%;
    animation: spritzExpand 3s ease-out 2s infinite;
}

@keyframes spritzExpand {
    0% { width: 40px; height: 40px; opacity: 1; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

/* --- Bottom Bar --- */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 70px;
    background: var(--bar-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bar-surface {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 107, 157, 0.4) 20%,
        rgba(200, 255, 46, 0.4) 40%,
        rgba(255, 127, 63, 0.4) 60%,
        rgba(59, 206, 172, 0.4) 80%,
        transparent 100%
    );
}

.bar-categories {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 16px;
}

.bar-category {
    font-family: 'Architects Daughter', cursive;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: var(--haze);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}

.bar-category:hover {
    animation: neonFlicker 0.4s ease-in-out;
}

.bar-category.active {
    color: var(--chalk);
    text-shadow: 0 0 10px var(--serotonin),
                 0 0 30px rgba(255, 107, 157, 0.3);
}

@keyframes neonFlicker {
    0% { opacity: 1; }
    20% { opacity: 0.3; }
    40% { opacity: 1; }
    60% { opacity: 0.6; }
    80% { opacity: 1; }
    100% { opacity: 1; }
}

/* --- Card Filtering --- */
.quirk-card.filter-hidden {
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.quirk-card.filter-visible {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .title-card {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 240px;
    }

    .card-2x1 {
        grid-column: span 2;
    }

    .emoji-marker {
        grid-column: span 2;
    }

    .featured-quirk {
        min-height: 60vh;
    }
}

@media (max-width: 560px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .title-card {
        grid-column: span 1;
        min-height: 200px;
    }

    .card-2x1,
    .card-1x2 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .emoji-marker {
        grid-column: span 1;
    }

    .bar-categories {
        gap: 12px;
    }

    .featured-quirk {
        min-height: 50vh;
    }
}
