/* ============================================
   recycle.games — Skeuomorphic Casino-Arcade
   Gold-Black-Luxury | HUD Overlay | Card Flip
   ============================================ */

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

:root {
    --obsidian-black: #0a0a0a;
    --deep-onyx: #141410;
    --antique-gold: #c9a84c;
    --burnished-bronze: #8b6f3a;
    --champagne-gleam: #e8d5a3;
    --warm-ivory: #f0e8d8;
    --pale-gold: #d4b968;
    --marble-white: #e8e0d0;
    --verdigris-green: #4a8c6a;
    --umber-dark: #2a1f0a;
    --gold-shadow: #7a5f1a;
    --charcoal-black: #1a1a14;
    --hud-size: 60px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--obsidian-black);
    color: var(--warm-ivory);
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, .card-title, .logo-text, .odometer-value, .stat-number {
    font-family: 'Playfair Display', serif;
    color: var(--antique-gold);
    text-shadow: 1px 1px 0 var(--gold-shadow), 2px 2px 4px rgba(0,0,0,0.6);
    letter-spacing: 0.03em;
}

.card-callout, .card-tip, .card-annotation {
    font-family: 'Bitter', serif;
    font-weight: 500;
    font-style: italic;
    color: var(--pale-gold);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
}

/* Gold shimmer on headings */
@keyframes goldShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

h2.card-title, h1.entry-title {
    background: linear-gradient(
        90deg,
        var(--antique-gold) 0%,
        var(--champagne-gleam) 40%,
        var(--antique-gold) 60%,
        var(--burnished-bronze) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShimmer 8s linear infinite;
    text-shadow: none;
}

/* --- HUD Frame --- */
#hud-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 100;
}

#hud-frame > * {
    pointer-events: auto;
}

/* Marble texture mixin via background */
.marble-bg {
    background:
        linear-gradient(15deg, rgba(232,224,208,0.05) 25%, transparent 25%),
        linear-gradient(135deg, rgba(232,224,208,0.03) 30%, transparent 30%),
        linear-gradient(75deg, rgba(200,190,170,0.04) 20%, transparent 20%);
}

/* --- Top HUD Bar --- */
#hud-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--hud-size);
    background: var(--obsidian-black);
    border-bottom: 1px solid var(--antique-gold);
    box-shadow: inset 0 -2px 8px rgba(0,0,0,0.8);
    z-index: 110;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#hud-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.hud-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 80px;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--antique-gold);
    text-shadow: 1px 1px 0 var(--gold-shadow), 2px 2px 4px rgba(0,0,0,0.6);
}

/* --- Odometer --- */
.hud-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.odometer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.odometer-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--burnished-bronze);
}

.odometer-value {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--champagne-gleam);
    text-shadow: 0 0 8px rgba(201,168,76,0.3);
}

/* Laurel wreath fragments */
.laurel-left, .laurel-right {
    width: 20px;
    height: 36px;
    position: relative;
}

.laurel-left::before, .laurel-left::after,
.laurel-right::before, .laurel-right::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 14px;
    border: 1.5px solid var(--burnished-bronze);
    border-radius: 50% 0;
}

.laurel-left::before {
    top: 4px;
    right: 2px;
    transform: rotate(-30deg);
}

.laurel-left::after {
    bottom: 4px;
    right: 2px;
    transform: rotate(-60deg);
}

.laurel-right::before {
    top: 4px;
    left: 2px;
    transform: rotate(30deg);
    border-radius: 0 50%;
}

.laurel-right::after {
    bottom: 4px;
    left: 2px;
    transform: rotate(60deg);
    border-radius: 0 50%;
}

/* --- Brass Toggle Navigation --- */
.hud-nav {
    display: flex;
    gap: 8px;
}

.brass-toggle {
    background: linear-gradient(180deg, #8b7a4a 0%, #5a4a2a 50%, #3a2f1a 100%);
    border: 1px solid var(--antique-gold);
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    position: relative;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(232,213,163,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.brass-toggle:active {
    transform: rotate(-2deg) translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.toggle-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--warm-ivory);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.brass-toggle.active {
    background: linear-gradient(180deg, #c9a84c 0%, #8b6f3a 50%, #5a4a2a 100%);
    box-shadow:
        0 2px 6px rgba(201,168,76,0.4),
        inset 0 1px 0 rgba(232,213,163,0.5);
}

.brass-toggle.active .toggle-label {
    color: var(--obsidian-black);
}

.toggle-switch {
    display: block;
    width: 16px;
    height: 3px;
    background: var(--champagne-gleam);
    border-radius: 1px;
    margin: 3px auto 0;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.brass-toggle.active .toggle-switch {
    opacity: 1;
    background: var(--obsidian-black);
}

/* --- Dentil Molding Border --- */
.dentil-border {
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--antique-gold) 0px,
        var(--antique-gold) 8px,
        var(--obsidian-black) 8px,
        var(--obsidian-black) 12px
    );
    opacity: 0.6;
}

.dentil-border.top {
    position: absolute;
    top: 0;
}

.dentil-border.bottom {
    position: absolute;
    bottom: 0;
}

/* --- Left Rail (Thermometer) --- */
#hud-left {
    position: fixed;
    top: var(--hud-size);
    left: 0;
    width: var(--hud-size);
    height: calc(100vh - var(--hud-size) * 2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

#hud-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.thermometer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thermometer-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    background: linear-gradient(180deg, var(--burnished-bronze), var(--umber-dark));
    border-radius: 10px 10px 20px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.thermometer-tube {
    width: 12px;
    height: 200px;
    background: rgba(232,224,208,0.1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--burnished-bronze);
}

.thermometer-mercury {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--verdigris-green), #3a7a5a);
    border-radius: 6px;
    transition: height 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.thermometer-bulb {
    width: 20px;
    height: 20px;
    background: var(--verdigris-green);
    border-radius: 50%;
    margin-top: -2px;
    box-shadow: 0 0 6px rgba(74,140,106,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-droplet {
    width: 8px;
    height: 10px;
    background: var(--champagne-gleam);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.6;
}

/* --- Right Rail (Section Badges) --- */
#hud-right {
    position: fixed;
    top: var(--hud-size);
    right: 0;
    width: var(--hud-size);
    height: calc(100vh - var(--hud-size) * 2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    padding: 20px 0;
    z-index: 110;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

#hud-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.section-badge {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--burnished-bronze);
    padding: 8px 4px;
    border: 1px solid rgba(139,111,58,0.3);
    border-radius: 3px;
    background:
        linear-gradient(15deg, rgba(232,224,208,0.04) 25%, transparent 25%),
        linear-gradient(135deg, rgba(232,224,208,0.02) 30%, transparent 30%),
        rgba(10,10,10,0.8);
    transition: color 0.3s, border-color 0.3s;
}

.section-badge.active {
    color: var(--antique-gold);
    border-color: var(--antique-gold);
}

/* --- Bottom HUD Bar --- */
#hud-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--hud-size);
    background: var(--obsidian-black);
    border-top: 1px solid var(--antique-gold);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
    z-index: 110;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#hud-bottom.visible {
    opacity: 1;
    transform: translateY(0);
}

.hud-bottom-content {
    text-align: center;
}

.bottom-text {
    font-family: 'Bitter', serif;
    font-weight: 500;
    font-style: italic;
    color: var(--pale-gold);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* --- Corner Rosettes --- */
.corner-rosette {
    position: fixed;
    width: var(--hud-size);
    height: var(--hud-size);
    z-index: 120;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s cubic-bezier(0.34,1.56,0.64,1), transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.corner-rosette.visible {
    opacity: 1;
    transform: scale(1);
}

.corner-rosette.top-left { top: 0; left: 0; }
.corner-rosette.top-right { top: 0; right: 0; }
.corner-rosette.bottom-left { bottom: 0; left: 0; }
.corner-rosette.bottom-right { bottom: 0; right: 0; }

.rosette-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--antique-gold);
    border-radius: 50%;
    box-shadow:
        0 0 6px rgba(201,168,76,0.3),
        inset 0 0 4px rgba(201,168,76,0.2);
}

.rosette-ring.inner {
    width: 26px;
    height: 26px;
    border-color: var(--burnished-bronze);
}

.ginkgo-leaf {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: linear-gradient(135deg, var(--antique-gold), var(--burnished-bronze));
    clip-path: polygon(50% 0%, 100% 35%, 85% 100%, 50% 80%, 15% 100%, 0% 35%);
    opacity: 0.7;
}

/* Slow rotation on rosettes */
@keyframes slowRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.corner-rosette.visible .rosette-ring {
    animation: slowRotate 120s linear infinite;
}

/* --- Central Stage --- */
#central-stage {
    position: relative;
    margin: var(--hud-size) var(--hud-size);
    min-height: calc(100vh - var(--hud-size) * 2);
    padding: 40px 20px;
    overflow: visible;
}

/* --- Entry Overlay --- */
#entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    background: var(--obsidian-black);
    transition: opacity 0.8s ease;
}

#entry-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.entry-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-top: 30px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.entry-title.visible {
    opacity: 1;
}

.entry-tagline {
    font-family: 'Bitter', serif;
    font-weight: 500;
    font-style: italic;
    color: var(--pale-gold);
    font-size: clamp(1.1rem, 3vw, 2.2rem);
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.entry-tagline.visible {
    opacity: 1;
}

/* --- Recycling Symbol (Entry) --- */
.recycling-symbol {
    width: 120px;
    height: 120px;
    position: relative;
}

.recycle-arrow {
    position: absolute;
    width: 0;
    height: 0;
    transition: clip-path 0.4s ease;
}

.recycling-symbol .arrow-1 {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--verdigris-green);
    clip-path: polygon(50% 0%, 80% 35%, 65% 35%, 65% 100%, 35% 100%, 35% 35%, 20% 35%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.recycling-symbol .arrow-2 {
    bottom: 10%;
    left: 5%;
    width: 40px;
    height: 40px;
    background: var(--verdigris-green);
    clip-path: polygon(0% 50%, 35% 20%, 35% 35%, 100% 35%, 100% 65%, 35% 65%, 35% 80%);
    transform: rotate(-120deg);
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

.recycling-symbol .arrow-3 {
    bottom: 10%;
    right: 5%;
    width: 40px;
    height: 40px;
    background: var(--verdigris-green);
    clip-path: polygon(100% 50%, 65% 80%, 65% 65%, 0% 65%, 0% 35%, 65% 35%, 65% 20%);
    transform: rotate(120deg);
    opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}

.recycling-symbol.animate .arrow-1,
.recycling-symbol.animate .arrow-2,
.recycling-symbol.animate .arrow-3 {
    opacity: 1;
}

/* --- Background Watermark --- */
.recycling-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.08;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.recycling-watermark {
    animation: spin 30s linear infinite;
}

.watermark-svg {
    width: 100%;
    height: 100%;
    color: var(--antique-gold);
}

/* --- Card Tableau --- */
#card-tableau {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 0;
    position: relative;
    z-index: 10;
}

/* --- Game Cards --- */
.game-card {
    perspective: 1200px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(60px) rotate(2deg);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.game-card.visible {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.game-card:hover {
    transform: translateY(-12px);
    z-index: 50;
}

.game-card:hover .card-inner:not(.flipped) {
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px rgba(201,168,76,0.15);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 350px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.6s ease;
    transform-style: preserve-3d;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

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

/* Card edge/thickness */
.card-inner::after {
    content: '';
    position: absolute;
    top: 4px;
    right: -8px;
    width: 8px;
    height: calc(100% - 8px);
    background: linear-gradient(180deg, #5a4a2a, #3a2f1a);
    border-radius: 0 4px 4px 0;
    transform: skewY(-2deg);
}

.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

/* --- Card Front (Marble) --- */
.card-front {
    background: var(--marble-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--burnished-bronze);
}

.marble-surface {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(15deg, rgba(200,190,170,0.15) 25%, transparent 25%),
        linear-gradient(135deg, rgba(180,170,150,0.1) 30%, transparent 30%),
        linear-gradient(75deg, rgba(210,200,180,0.12) 20%, transparent 20%),
        var(--marble-white);
}

.marble-surface.dark {
    background:
        linear-gradient(15deg, rgba(60,50,30,0.15) 25%, transparent 25%),
        linear-gradient(135deg, rgba(40,35,20,0.1) 30%, transparent 30%),
        linear-gradient(75deg, rgba(50,40,25,0.12) 20%, transparent 20%),
        var(--deep-onyx);
}

.card-front-label {
    position: relative;
    z-index: 2;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--charcoal-black);
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

.marble-surface.dark + .card-front-label {
    color: var(--antique-gold);
    text-shadow: 1px 1px 0 var(--gold-shadow), 2px 2px 4px rgba(0,0,0,0.6);
}

/* Recycling emboss on card fronts */
.recycling-emboss {
    position: absolute;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    border: 3px solid rgba(139,111,58,0.25);
    border-radius: 50%;
    z-index: 1;
}

.recycling-emboss::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    background: rgba(139,111,58,0.15);
    clip-path: polygon(50% 0%, 80% 35%, 65% 35%, 65% 100%, 35% 100%, 35% 35%, 20% 35%);
}

.recycling-emboss.large {
    width: 100px;
    height: 100px;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
}

/* Pulse animation for join card */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.recycling-emboss.pulse {
    animation: pulse 3s ease-in-out infinite;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
}

/* Kintsugi cracks */
.kintsugi-crack {
    position: absolute;
    z-index: 1;
}

.kintsugi-crack.crack-1 {
    top: 20%;
    left: 15%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--antique-gold), transparent);
    transform: rotate(-15deg);
}

.kintsugi-crack.crack-2 {
    top: 50%;
    left: 30%;
    width: 45%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--antique-gold), var(--champagne-gleam), var(--antique-gold), transparent);
    transform: rotate(25deg);
}

.kintsugi-crack.crack-3 {
    top: 70%;
    left: 10%;
    width: 55%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--burnished-bronze), transparent);
    transform: rotate(-8deg);
}

/* --- Card Back (Content) --- */
.card-back {
    background: var(--deep-onyx);
    transform: rotateY(180deg);
    padding: 40px 30px;
    border: 2px solid var(--burnished-bronze);
    display: flex;
    flex-direction: column;
}

/* Egg-and-dart border on card edges */
.card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        var(--burnished-bronze) 4px,
        var(--burnished-bronze) 12px,
        transparent 12px,
        transparent 16px
    );
    opacity: 0.5;
}

.card-title {
    font-size: clamp(1.6rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.card-title.small {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    margin-bottom: 12px;
}

.card-body {
    color: var(--warm-ivory);
    margin-bottom: 16px;
}

.card-annotation {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(139,111,58,0.3);
}

.card-tip {
    display: block;
    margin-top: auto;
    padding: 10px 14px;
    background: rgba(201,168,76,0.08);
    border-left: 3px solid var(--antique-gold);
    border-radius: 0 4px 4px 0;
}

/* --- Card Size Variants --- */
.card-large {
    grid-column: span 2;
}

.card-large .card-inner {
    min-height: 420px;
}

.card-standard .card-inner {
    min-height: 380px;
}

.card-small .card-inner {
    min-height: 280px;
}

.card-tall {
    grid-row: span 2;
}

.card-tall .card-inner {
    min-height: 600px;
}

.card-join {
    grid-column: 1 / -1;
    max-width: 600px;
    justify-self: center;
    width: 100%;
}

.card-join .card-inner {
    min-height: 400px;
}

/* --- Stat Medallions --- */
.stat-medallions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-medallion {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 20px 16px;
    border: 1px solid var(--burnished-bronze);
    border-radius: 8px;
    background:
        linear-gradient(15deg, rgba(232,224,208,0.03) 25%, transparent 25%),
        linear-gradient(135deg, rgba(232,224,208,0.02) 30%, transparent 30%),
        rgba(20,20,16,0.8);
}

.stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: var(--champagne-gleam);
    line-height: 1.4;
}

/* --- Material Icons --- */
.material-icon {
    position: relative;
    z-index: 2;
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-droplet-icon {
    width: 24px;
    height: 30px;
    background: linear-gradient(180deg, var(--antique-gold), var(--burnished-bronze));
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.crystal-icon {
    width: 24px;
    height: 28px;
    background: linear-gradient(135deg, var(--antique-gold), var(--champagne-gleam));
    clip-path: polygon(50% 0%, 100% 30%, 85% 100%, 15% 100%, 0% 30%);
}

.leaf-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--verdigris-green), var(--antique-gold));
    clip-path: polygon(50% 0%, 100% 35%, 85% 100%, 50% 80%, 15% 100%, 0% 35%);
}

.recycle-mini-icon {
    width: 26px;
    height: 26px;
    border: 3px solid var(--antique-gold);
    border-radius: 50%;
    position: relative;
}

.recycle-mini-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    background: var(--antique-gold);
    clip-path: polygon(50% 0%, 80% 35%, 65% 35%, 65% 100%, 35% 100%, 35% 35%, 20% 35%);
}

.fern-icon {
    width: 28px;
    height: 28px;
    border: 3px solid var(--verdigris-green);
    border-radius: 0 80% 0 80%;
    transform: rotate(-45deg);
    position: relative;
}

.fern-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 2px;
    background: var(--verdigris-green);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* --- Leaderboard --- */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.leader-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(139,111,58,0.2);
    transition: background 0.2s;
}

.leader-row:hover {
    background: rgba(201,168,76,0.05);
}

.leader-rank {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--burnished-bronze);
    width: 40px;
    text-align: center;
}

.rank-1 .leader-rank { color: var(--antique-gold); }
.rank-2 .leader-rank { color: var(--champagne-gleam); }
.rank-3 .leader-rank { color: var(--burnished-bronze); }

.leader-name {
    flex: 1;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--warm-ivory);
}

.leader-score {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--antique-gold);
    text-shadow: 1px 1px 0 var(--gold-shadow);
}

/* --- Plinth Decoration --- */
.plinth-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 1;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(139,111,58,0.1) 0px,
            rgba(139,111,58,0.1) 2px,
            transparent 2px,
            transparent 8px
        );
}

/* --- Join Card --- */
.join-recycling-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    opacity: 0.08;
    animation: pulse 3s ease-in-out infinite;
}

.join-recycling-bg .arrow-1,
.join-recycling-bg .arrow-2,
.join-recycling-bg .arrow-3 {
    position: absolute;
    opacity: 1;
}

.join-recycling-bg .arrow-1 {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--verdigris-green);
    clip-path: polygon(50% 0%, 80% 35%, 65% 35%, 65% 100%, 35% 100%, 35% 35%, 20% 35%);
}

.join-recycling-bg .arrow-2 {
    bottom: 10%;
    left: 5%;
    width: 60px;
    height: 60px;
    background: var(--verdigris-green);
    clip-path: polygon(0% 50%, 35% 20%, 35% 35%, 100% 35%, 100% 65%, 35% 65%, 35% 80%);
    transform: rotate(-120deg);
}

.join-recycling-bg .arrow-3 {
    bottom: 10%;
    right: 5%;
    width: 60px;
    height: 60px;
    background: var(--verdigris-green);
    clip-path: polygon(100% 50%, 65% 80%, 65% 65%, 0% 65%, 0% 35%, 65% 35%, 65% 20%);
    transform: rotate(120deg);
}

.join-cta {
    text-align: center;
    margin: 24px 0;
    position: relative;
    z-index: 2;
}

.brass-button {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--obsidian-black);
    background: linear-gradient(180deg, var(--champagne-gleam) 0%, var(--antique-gold) 40%, var(--burnished-bronze) 100%);
    border: 2px solid var(--antique-gold);
    border-radius: 50px;
    padding: 14px 40px;
    cursor: pointer;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.5),
        0 0 20px rgba(201,168,76,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.brass-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0,0,0,0.5),
        0 0 30px rgba(201,168,76,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.brass-button:active {
    transform: translateY(1px);
    box-shadow:
        0 2px 6px rgba(0,0,0,0.5),
        inset 0 2px 4px rgba(0,0,0,0.3);
}

/* --- Card Flip Edge Flash --- */
@keyframes edgeFlash {
    0% { box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(232,213,163,0.4); }
    100% { box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
}

.card-inner.flipping {
    animation: edgeFlash 0.6s ease;
}

/* --- Fern Curl Dividers --- */
.fern-divider {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 20px auto;
    z-index: 5;
    pointer-events: none;
    display: none;
}

.fern-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 3px solid var(--burnished-bronze);
    border-radius: 0 80% 0 80%;
    transform: translate(-50%, -50%) rotate(-45deg);
    opacity: 0.4;
}

/* --- Fluted Column Elements --- */
.card-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.8em;
    margin-right: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--burnished-bronze) 0px,
        var(--burnished-bronze) 1px,
        rgba(232,213,163,0.2) 1px,
        rgba(232,213,163,0.2) 2px
    );
    vertical-align: middle;
    border-radius: 1px;
}

.card-title::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.8em;
    margin-left: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--burnished-bronze) 0px,
        var(--burnished-bronze) 1px,
        rgba(232,213,163,0.2) 1px,
        rgba(232,213,163,0.2) 2px
    );
    vertical-align: middle;
    border-radius: 1px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --hud-size: 40px;
    }

    .hud-top-content {
        padding: 0 50px;
    }

    .hud-nav {
        gap: 4px;
    }

    .brass-toggle {
        padding: 4px 8px;
    }

    .toggle-label {
        font-size: 0.6rem;
    }

    .card-large {
        grid-column: span 1;
    }

    #card-tableau {
        grid-template-columns: 1fr;
    }

    .stat-medallions {
        flex-direction: column;
    }

    .hud-counter {
        display: none;
    }

    #hud-left, #hud-right {
        display: none;
    }

    .card-tall {
        grid-row: span 1;
    }

    .card-tall .card-inner {
        min-height: 450px;
    }
}

@media (max-width: 480px) {
    :root {
        --hud-size: 36px;
    }

    .hud-top-content {
        padding: 0 44px;
    }

    .hud-nav {
        gap: 2px;
    }

    .brass-toggle {
        padding: 3px 6px;
    }
}
