/* ============================================
   recycle.games - Luxury Premium Gaming Greenhouse
   Dopamine-Neon Palette on Electric Black
   ============================================ */

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

:root {
    --electric-black: #0A0A14;
    --neon-magenta: #FF00FF;
    --cyber-yellow: #FFFF00;
    --hot-pink: #FF69B4;
    --soft-white: #F0F0F5;
    --dark-panel: #1A1A28;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--electric-black);
    color: var(--soft-white);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 400;
    overflow-x: hidden;
}

/* --- Header --- */
#site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 0, 255, 0.15);
    padding: 1rem 2rem;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--neon-magenta), var(--cyber-yellow));
    display: block;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 3px solid var(--electric-black);
    border-radius: 50%;
    border-top-color: transparent;
    border-bottom-color: transparent;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--soft-white);
    letter-spacing: -0.02em;
}

.logo-dot {
    color: var(--neon-magenta);
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(240, 240, 245, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyber-yellow);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cyber-yellow);
    border-radius: 1px;
}

/* --- Main Content --- */
#main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-areas:
        "a a b"
        "a a c"
        "d e c";
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.bento-grid-secondary {
    grid-template-areas:
        "f g h h"
        "i i h h";
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
}

.cell-a { grid-area: a; }
.cell-b { grid-area: b; }
.cell-c { grid-area: c; }
.cell-d { grid-area: d; }
.cell-e { grid-area: e; }
.cell-f { grid-area: f; }
.cell-g { grid-area: g; }
.cell-h { grid-area: h; }
.cell-i { grid-area: i; }

/* --- Bento Cell Base --- */
.bento-cell {
    background: var(--dark-panel);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 255, 0.1);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    min-height: 220px;
}

.bento-cell:hover {
    border-color: rgba(255, 0, 255, 0.35);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.08);
}

/* Featured cells (A, H) with direct content */
.cell-a,
.cell-h {
    display: flex;
    align-items: stretch;
}

.cell-a .cell-content,
.cell-h .cell-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.cell-a {
    min-height: 420px;
}

/* --- Cell Content --- */
.cell-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--cyber-yellow);
    background: rgba(255, 255, 0, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    width: fit-content;
}

.cell-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    color: var(--soft-white);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.cell-a .cell-title {
    font-size: clamp(2rem, 4.5vw, 4rem);
    margin-bottom: 1rem;
}

.cell-h .cell-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.cell-desc {
    font-size: 0.95rem;
    color: rgba(240, 240, 245, 0.7);
    line-height: 1.65;
    max-width: 500px;
}

.cell-hint {
    font-size: 0.75rem;
    color: rgba(240, 240, 245, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.cell-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.meta-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    display: inline-block;
}

.badge-magenta {
    color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.12);
    border: 1px solid rgba(255, 0, 255, 0.25);
}

.badge-yellow {
    color: var(--cyber-yellow);
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid rgba(255, 255, 0, 0.2);
}

.badge-pink {
    color: var(--hot-pink);
    background: rgba(255, 105, 180, 0.12);
    border: 1px solid rgba(255, 105, 180, 0.25);
}

/* --- Neon Pulse Effect (Featured cells) --- */
.neon-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
    box-shadow: inset 0 0 60px rgba(255, 0, 255, 0.05);
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: inset 0 0 40px rgba(255, 0, 255, 0.04), 0 0 20px rgba(255, 0, 255, 0.02);
    }
    50% {
        box-shadow: inset 0 0 80px rgba(255, 0, 255, 0.1), 0 0 40px rgba(255, 0, 255, 0.06);
    }
}

/* --- Card Flip --- */
.card-flip {
    width: 100%;
    height: 100%;
    min-height: 220px;
    position: relative;
    perspective: 1000px;
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-front {
    background: var(--dark-panel);
    z-index: 2;
    transform: rotateY(0deg);
}

.card-back {
    background: linear-gradient(145deg, var(--dark-panel), rgba(26, 26, 40, 0.95));
    border: 1px solid rgba(255, 0, 255, 0.2);
    transform: rotateY(180deg);
    z-index: 1;
}

.bento-cell:hover .card-front {
    transform: rotateY(-180deg);
}

.bento-cell:hover .card-back {
    transform: rotateY(0deg);
}

.card-back .cell-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--cyber-yellow);
}

.card-back .cell-desc {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* --- Game Icons (CSS-rendered) --- */
.game-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    position: relative;
    flex-shrink: 0;
}

/* Diamond icon via clip-path */
.game-icon-diamond {
    background: linear-gradient(135deg, var(--neon-magenta), var(--hot-pink));
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* Cards icon */
.game-icon-cards {
    width: 48px;
    height: 48px;
    position: relative;
}

.game-icon-cards::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 42px;
    background: var(--cyber-yellow);
    border-radius: 4px;
    top: 3px;
    left: 4px;
    transform: rotate(-8deg);
}

.game-icon-cards::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 42px;
    background: var(--neon-magenta);
    border-radius: 4px;
    top: 0;
    left: 14px;
    transform: rotate(5deg);
}

/* Token / Circle icon */
.game-icon-token {
    background: linear-gradient(135deg, var(--cyber-yellow), var(--neon-magenta));
    border-radius: 50%;
    position: relative;
}

.game-icon-token::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 3px solid var(--electric-black);
    border-radius: 50%;
}

/* Dice icon */
.game-icon-dice {
    background: var(--hot-pink);
    border-radius: 8px;
    position: relative;
}

.game-icon-dice::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--electric-black);
    border-radius: 50%;
    top: 10px;
    left: 10px;
    box-shadow:
        20px 0 0 var(--electric-black),
        10px 10px 0 var(--electric-black),
        0 20px 0 var(--electric-black),
        20px 20px 0 var(--electric-black);
}

/* Recycle icon */
.game-icon-recycle {
    position: relative;
}

.game-icon-recycle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    border: 5px solid transparent;
    border-top-color: var(--neon-magenta);
    border-right-color: var(--cyber-yellow);
    border-bottom-color: var(--hot-pink);
    border-radius: 50%;
}

.game-icon-recycle::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    border: 4px solid transparent;
    border-top-color: var(--cyber-yellow);
    border-right-color: var(--hot-pink);
    border-bottom-color: var(--neon-magenta);
    border-radius: 50%;
    transform: rotate(60deg);
}

/* Featured cell larger icon */
.cell-a .game-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

/* --- Floral-Botanical Ornaments --- */
.floral-ornament {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 3;
    opacity: 0.5;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.bento-cell:hover .floral-ornament {
    opacity: 0.85;
    transform: scale(1.15);
}

/* Petal generator using pseudo-elements */
.floral-ornament::before,
.floral-ornament::after {
    content: '';
    position: absolute;
}

/* Top-left flower */
.floral-top-left {
    top: -8px;
    left: -8px;
}

.floral-top-left::before {
    width: 20px;
    height: 20px;
    background: var(--neon-magenta);
    border-radius: 50% 0 50% 50%;
    top: 8px;
    left: 8px;
    opacity: 0.6;
}

.floral-top-left::after {
    width: 14px;
    height: 14px;
    background: var(--cyber-yellow);
    border-radius: 50%;
    top: 4px;
    left: 20px;
    opacity: 0.5;
}

/* Top-right flower */
.floral-top-right {
    top: -8px;
    right: -8px;
}

.floral-top-right::before {
    width: 18px;
    height: 18px;
    background: var(--hot-pink);
    border-radius: 0 50% 50% 50%;
    top: 10px;
    right: 10px;
    opacity: 0.6;
}

.floral-top-right::after {
    width: 12px;
    height: 12px;
    background: var(--neon-magenta);
    border-radius: 50%;
    top: 6px;
    right: 26px;
    opacity: 0.4;
}

/* Bottom-right flower */
.floral-bottom-right {
    bottom: -8px;
    right: -8px;
}

.floral-bottom-right::before {
    width: 22px;
    height: 22px;
    background: var(--cyber-yellow);
    border-radius: 50% 50% 0 50%;
    bottom: 8px;
    right: 8px;
    opacity: 0.5;
}

.floral-bottom-right::after {
    width: 14px;
    height: 14px;
    background: var(--hot-pink);
    border-radius: 50%;
    bottom: 16px;
    right: 28px;
    opacity: 0.4;
}

/* Bottom-left flower */
.floral-bottom-left {
    bottom: -8px;
    left: -8px;
}

.floral-bottom-left::before {
    width: 18px;
    height: 18px;
    background: var(--neon-magenta);
    border-radius: 50% 50% 50% 0;
    bottom: 10px;
    left: 10px;
    opacity: 0.6;
}

.floral-bottom-left::after {
    width: 12px;
    height: 12px;
    background: var(--cyber-yellow);
    border-radius: 50%;
    bottom: 4px;
    left: 24px;
    opacity: 0.5;
}

/* Additional floral decorations with more petal shapes */
.cell-a .floral-top-left {
    width: 80px;
    height: 80px;
}

.cell-a .floral-top-left::before {
    width: 28px;
    height: 28px;
    border-radius: 50% 0 50% 50%;
}

.cell-a .floral-top-left::after {
    width: 20px;
    height: 20px;
    top: 2px;
    left: 28px;
}

.cell-a .floral-bottom-right {
    width: 80px;
    height: 80px;
}

.cell-a .floral-bottom-right::before {
    width: 28px;
    height: 28px;
}

.cell-a .floral-bottom-right::after {
    width: 18px;
    height: 18px;
    bottom: 20px;
    right: 34px;
}

/* Floral border grow animation */
@keyframes floralGrow {
    0% {
        transform: scale(0.5) rotate(0deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.5;
    }
}

.floral-ornament {
    animation: floralGrow 1.2s ease-out forwards;
}

/* Stagger the floral animations */
.cell-b .floral-ornament { animation-delay: 0.1s; }
.cell-c .floral-ornament { animation-delay: 0.2s; }
.cell-d .floral-ornament { animation-delay: 0.3s; }
.cell-e .floral-ornament { animation-delay: 0.4s; }
.cell-f .floral-ornament { animation-delay: 0.5s; }
.cell-g .floral-ornament { animation-delay: 0.6s; }
.cell-h .floral-ornament { animation-delay: 0.7s; }
.cell-i .floral-ornament { animation-delay: 0.8s; }

/* --- Stats Bar --- */
.stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2.5rem 2rem;
    background: var(--dark-panel);
    border-radius: 16px;
    border: 1px solid rgba(255, 0, 255, 0.1);
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--cyber-yellow);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(240, 240, 245, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 0, 255, 0.2);
}

/* --- Footer --- */
#site-footer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    position: relative;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 0, 255, 0.1);
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    font-size: 1.25rem;
}

.footer-tagline {
    font-size: 0.85rem;
    color: rgba(240, 240, 245, 0.4);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(240, 240, 245, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--neon-magenta);
}

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.75rem;
    color: rgba(240, 240, 245, 0.3);
}

.footer-floral {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floral-footer-left {
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
}

.floral-footer-left::before {
    width: 16px;
    height: 16px;
    background: var(--neon-magenta);
    border-radius: 50% 0 50% 50%;
    bottom: 0;
    left: 0;
    opacity: 0.3;
}

.floral-footer-left::after {
    width: 10px;
    height: 10px;
    background: var(--cyber-yellow);
    border-radius: 50%;
    bottom: 12px;
    left: 18px;
    opacity: 0.25;
}

.floral-footer-right {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
}

.floral-footer-right::before {
    width: 16px;
    height: 16px;
    background: var(--hot-pink);
    border-radius: 0 50% 50% 50%;
    bottom: 0;
    right: 0;
    opacity: 0.3;
}

.floral-footer-right::after {
    width: 10px;
    height: 10px;
    background: var(--neon-magenta);
    border-radius: 50%;
    bottom: 14px;
    right: 18px;
    opacity: 0.25;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-areas:
            "a a"
            "a a"
            "b c"
            "d c"
            "e e";
        grid-template-columns: 1fr 1fr;
    }

    .bento-grid-secondary {
        grid-template-areas:
            "f g"
            "h h"
            "i i";
        grid-template-columns: 1fr 1fr;
    }

    .header-nav {
        gap: 1rem;
    }

    .stats-bar {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    #site-header {
        padding: 0.75rem 1rem;
    }

    .header-nav {
        display: none;
    }

    #main-content {
        padding: 1.5rem 1rem 3rem;
    }

    .bento-grid {
        grid-template-areas:
            "a"
            "b"
            "c"
            "d"
            "e";
        grid-template-columns: 1fr;
    }

    .bento-grid-secondary {
        grid-template-areas:
            "f"
            "g"
            "h"
            "i";
        grid-template-columns: 1fr;
    }

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

    .cell-a {
        min-height: 320px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .stats-bar {
        gap: 1rem;
        padding: 1.5rem 1rem;
    }

    .stat-divider {
        display: none;
    }
}

/* --- Decorative background gradient --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 0, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 255, 0, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 105, 180, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* --- Selection styling --- */
::selection {
    background: rgba(255, 0, 255, 0.3);
    color: var(--soft-white);
}

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

::-webkit-scrollbar-track {
    background: var(--electric-black);
}

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 255, 0.3);
}
