/* ============================================
   $LMAO - DARK LUXURY DESIGN
   Inspired by squishydumplings aesthetic
   ============================================ */

:root {
    /* Primary Colors */
    --yellow: #FFD93D;
    --yellow-bright: #FFE566;
    --yellow-dark: #E6C235;
    --green: #7ED4AD;
    --red: #FF6B6B;

    /* Dark Theme */
    --bg-dark: #1a1a2e;
    --bg-darker: #16162a;
    --bg-card: #252542;
    --bg-card-hover: #2d2d4a;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b8b8d1;
    --text-muted: #6c6c8a;

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --glow-yellow: 0 0 30px rgba(255, 217, 61, 0.3);
    --glow-yellow-strong: 0 0 40px rgba(255, 217, 61, 0.5);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Typography */
    --font-display: 'Bangers', cursive;
    --font-body: 'Space Grotesk', sans-serif;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Deep Fry Mode */
body.deep-fried {
    filter: saturate(2) contrast(1.3) brightness(1.1);
}

body.deep-fried::after {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.15;
    pointer-events: none;
    z-index: 99998;
    mix-blend-mode: overlay;
}

/* ============================================
   EXPLOSION CONTAINER
   ============================================ */
.explosion-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;
}

.explosion-particle {
    position: absolute;
    font-size: 24px;
    pointer-events: none;
    animation: explode 1s ease-out forwards;
}

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

/* ============================================
   FLOATING BACKGROUND
   ============================================ */
.emoji-rain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.rain-emoji {
    position: absolute;
    font-size: 30px;
    opacity: 0.06;
    animation: rain-float linear infinite;
    filter: blur(1px);
}

@keyframes rain-float {
    0% {
        transform: translateY(-100px) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s var(--ease);
}

.navbar.scrolled {
    padding: 0.75rem 2rem;
    background: rgba(22, 22, 42, 0.95);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--yellow);
    text-decoration: none;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--yellow);
    transition: all 0.3s var(--ease);
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 80%;
}

.nav-social {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary) !important;
    border-radius: 50%;
    font-size: 1rem;
    transition: all 0.3s var(--ease);
}

.nav-social:hover {
    background: var(--yellow) !important;
    border-color: var(--yellow);
    transform: scale(1.05);
    box-shadow: var(--glow-yellow);
}

.nav-social::after {
    display: none;
}

.deep-fry-btn {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.deep-fry-btn:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.deep-fry-btn.active {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--bg-dark);
    box-shadow: var(--glow-yellow);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 217, 61, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(126, 212, 173, 0.05) 0%, transparent 50%),
        var(--bg-dark);
}

.hero-bg-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: clamp(120px, 35vw, 350px);
    color: var(--yellow);
    opacity: 0.03;
    z-index: 0;
    user-select: none;
    letter-spacing: -0.02em;
}

/* Draggable Mascot */
.mascot-container {
    position: relative;
    z-index: 10;
    margin-bottom: 0.5rem;
}

.mascot {
    width: 200px;
    height: 200px;
    cursor: grab;
    transition: transform 0.1s ease;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    /* Safari fix for border-radius with transforms */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}

.mascot:not(.dragging) {
    animation: mascot-float 3s ease-in-out infinite;
}

@keyframes mascot-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.mascot.dragging {
    cursor: grabbing;
    animation: none !important;
}

.mascot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    transition: filter 0.3s var(--ease);
    border-radius: 50%;
}

.mascot:hover img {
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 30px rgba(255, 217, 61, 0.2));
}

.mascot-shadow {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.4) 0%, transparent 70%);
    animation: shadow-pulse 3s ease-in-out infinite;
}

@keyframes shadow-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.4; }
    50% { transform: translateX(-50%) scale(0.85); opacity: 0.2; }
}

.mascot-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    opacity: 0;
    animation: hint-fade 4s ease-in-out infinite;
}

@keyframes hint-fade {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 0.6; }
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 12vw, 8rem);
    line-height: 1;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    letter-spacing: 0.02em;
}

.title-letter {
    display: inline-block;
    transition: all 0.3s var(--ease-spring);
    cursor: default;
    text-shadow: 0 0 40px rgba(255, 217, 61, 0.3);
}

.title-letter:hover {
    color: var(--yellow);
    transform: translateY(-8px) scale(1.1);
    text-shadow: 0 0 60px rgba(255, 217, 61, 0.6);
}

.title-letter[data-letter="$"] {
    color: var(--green);
    text-shadow: 0 0 40px rgba(126, 212, 173, 0.3);
}

.hero-tagline {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Laugh Counter */
.laugh-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.laugh-btn {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    transition: all 0.3s var(--ease);
    box-shadow: var(--shadow-md), var(--glow-yellow);
}

.laugh-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg), var(--glow-yellow-strong);
}

.laugh-btn:active {
    transform: scale(0.95);
}

.laugh-emoji {
    font-size: 2.2rem;
    line-height: 1;
}

.laugh-text {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--bg-dark);
    opacity: 0.8;
}

.laugh-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.laugh-count span:first-child {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1.1;
    color: var(--text-primary);
    padding-right: 0.1em;
}

.laugh-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.btn {
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
    color: var(--bg-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--glow-yellow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.contract-display {
    position: relative;
    display: inline-block;
}

.contract-display code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.contract-display code:hover {
    background: var(--bg-card-hover);
    border-color: var(--yellow);
    color: var(--text-primary);
}

.copy-feedback {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: var(--bg-dark);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.copy-feedback.show {
    opacity: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 5;
}

.scroll-emoji {
    font-size: 1.5rem;
    animation: bounce-scroll 2s ease-in-out infinite;
}

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

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: 6rem 2rem 8rem;
    background: var(--bg-darker);
    position: relative;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-main {
    margin-bottom: 3rem;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    color: var(--yellow);
}

.about-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-mission {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    transition: all 0.3s var(--ease);
}

.about-mission:hover {
    border-color: rgba(255, 217, 61, 0.2);
    box-shadow: var(--shadow-md);
}

.mission-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--yellow);
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.about-mission p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================
   SLOT MACHINE
   ============================================ */
.games {
    padding: 6rem 2rem 8rem;
    background: var(--bg-dark);
    text-align: center;
    position: relative;
}

.slot-machine {
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.slot-frame {
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    border: 2px solid rgba(255, 217, 61, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    box-shadow:
        0 0 40px rgba(255, 217, 61, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        var(--shadow-lg);
}

.slot-top-lights {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.slot-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 10px var(--yellow), 0 0 20px var(--yellow);
    animation: light-pulse 1.5s ease-in-out infinite;
}

.slot-light:nth-child(2) { animation-delay: 0.3s; }
.slot-light:nth-child(3) { animation-delay: 0.6s; }
.slot-light:nth-child(4) { animation-delay: 0.9s; }
.slot-light:nth-child(5) { animation-delay: 1.2s; }

@keyframes light-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.slot-machine.spinning .slot-light {
    animation: light-flash 0.15s linear infinite;
}

@keyframes light-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.slot-display {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.slot-window {
    width: 110px;
    height: 120px;
    background: linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 50%, #0d0d1a 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow:
        inset 0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 -4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.slot-window::before,
.slot-window::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 25px;
    z-index: 2;
    pointer-events: none;
}

.slot-window::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(13, 13, 26, 0.9), transparent);
}

.slot-window::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(13, 13, 26, 0.9), transparent);
}

.slot-payline {
    position: absolute;
    left: -10px;
    right: -10px;
    top: 50%;
    height: 3px;
    background: var(--yellow);
    transform: translateY(-50%);
    opacity: 0.5;
    box-shadow: 0 0 10px var(--yellow);
    z-index: 5;
}

.slot-machine.winner .slot-payline {
    animation: payline-flash 0.3s ease infinite;
}

@keyframes payline-flash {
    0%, 100% { opacity: 1; box-shadow: 0 0 20px var(--yellow); }
    50% { opacity: 0.5; box-shadow: 0 0 5px var(--yellow); }
}

.slot-reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slot-reel.spinning {
    animation: reel-spin 0.08s linear infinite;
}

.slot-reel.landing {
    animation: reel-land 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reel-spin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-120px); }
}

@keyframes reel-land {
    0% { transform: translateY(-15px); }
    60% { transform: translateY(8px); }
    100% { transform: translateY(0); }
}

.slot-item {
    width: 110px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    flex-shrink: 0;
}

.slot-machine.winner .slot-item {
    animation: winner-bounce 0.5s ease;
}

@keyframes winner-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.spin-btn {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
    border: none;
    border-radius: 50px;
    padding: 1.25rem 3.5rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--bg-dark);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    box-shadow:
        var(--shadow-md),
        var(--glow-yellow),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.spin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.spin-btn:hover::before {
    left: 100%;
}

.spin-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--glow-yellow-strong);
}

.spin-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spin-btn:disabled::before {
    display: none;
}

.spin-emoji {
    font-size: 1.25rem;
    animation: spin-emoji-float 2s ease-in-out infinite;
}

@keyframes spin-emoji-float {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.spin-btn:disabled .spin-emoji {
    animation: spin-emoji-spin 0.5s linear infinite;
}

@keyframes spin-emoji-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.slot-result {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-muted);
    min-height: 40px;
    transition: all 0.3s var(--ease);
}

.slot-result.winner {
    color: var(--yellow);
    text-shadow: 0 0 20px var(--yellow), 0 0 40px var(--yellow);
    animation: result-winner 0.5s ease;
}

@keyframes result-winner {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.slot-result.jackpot {
    font-size: 2rem;
    color: var(--yellow);
    text-shadow: 0 0 30px var(--yellow), 0 0 60px var(--yellow);
    animation: jackpot-flash 0.3s ease infinite alternate;
}

@keyframes jackpot-flash {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.slot-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

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

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Meme Depot Link */
.meme-depot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 217, 61, 0.3);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s var(--ease);
}

.meme-depot-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--yellow);
    transform: translateY(-3px);
    box-shadow: var(--glow-yellow);
}

.meme-depot-link span:first-child {
    font-size: 1.5rem;
}

.meme-depot-link span:last-child {
    transition: transform 0.3s var(--ease);
}

.meme-depot-link:hover span:last-child {
    transform: translateX(5px);
}

/* ============================================
   MEME GENERATOR
   ============================================ */
.generator {
    padding: 6rem 2rem 8rem;
    background: var(--bg-darker);
    text-align: center;
    position: relative;
}

.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
    position: relative;
    z-index: 1;
}

.meme-canvas-wrapper {
    display: flex;
    justify-content: center;
}

#memeCanvas {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.control-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.control-group input {
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease);
    background: var(--bg-card);
    color: var(--text-primary);
}

.control-group input::placeholder {
    color: var(--text-muted);
}

.control-group input:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.15);
}

.download-btn {
    margin-top: 0.5rem;
}

/* Meme Selection Grid - Expanded for 31 images */
.meme-select-group {
    flex: 1;
}

.meme-count {
    font-weight: 400;
    color: var(--yellow);
    font-size: 0.7rem;
}

.meme-select-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar for meme grid */
.meme-select-grid::-webkit-scrollbar {
    width: 6px;
}

.meme-select-grid::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 3px;
}

.meme-select-grid::-webkit-scrollbar-thumb {
    background: var(--yellow);
    border-radius: 3px;
}

.meme-select-grid::-webkit-scrollbar-thumb:hover {
    background: var(--yellow-bright);
}

.meme-select-btn {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--ease);
    background: var(--bg-card);
}

.meme-select-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meme-select-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.meme-select-btn.active {
    border-color: var(--yellow);
    box-shadow: var(--glow-yellow);
}

/* ============================================
   MEME GALLERY
   ============================================ */
.memes {
    padding: 6rem 2rem 8rem;
    background: var(--bg-dark);
    text-align: center;
    position: relative;
}

.meme-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.meme-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-card);
    min-height: 150px;
}

.meme-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 217, 61, 0.3);
    z-index: 10;
}

.meme-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.meme-item:hover img {
    transform: scale(1.08);
}

/* ============================================
   FOOTER (with integrated links)
   ============================================ */
.footer {
    padding: 4rem 2rem 3rem;
    background: var(--bg-darker);
    text-align: center;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 217, 61, 0.3), transparent);
}

.footer-mascot img {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(255, 217, 61, 0.2));
    animation: mascot-float 3s ease-in-out infinite;
    border-radius: 50%;
    /* Safari fix */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

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

.footer-link {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s var(--ease);
    font-weight: 500;
    font-size: 0.9rem;
}

.footer-link:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--yellow);
    box-shadow: var(--shadow-md), var(--glow-yellow);
}

.footer-link .link-icon {
    font-size: 1.25rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.footer-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-ca {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    word-break: break-all;
    background: var(--bg-card);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s var(--ease);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(22, 22, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
    cursor: pointer;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-md);
    transform: scale(0.95);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.lightbox-close:hover {
    transform: scale(1.1);
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--bg-dark);
}

/* ============================================
   PFP GENERATOR
   ============================================ */
.pfp-section {
    padding: 6rem 2rem 8rem;
    background: var(--bg-dark);
    text-align: center;
    position: relative;
}

.pfp-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

/* Preview Panel */
.pfp-preview-panel {
    position: sticky;
    top: 100px;
}

.pfp-canvas-wrapper {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

#pfpCanvas {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
    background: var(--bg-darker);
}

.pfp-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 46, 0.8);
    border-radius: var(--radius-lg);
}

.pfp-loading.active {
    display: flex;
}

.pfp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-card);
    border-top-color: var(--yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pfp-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pfp-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.pfp-action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--yellow);
    transform: translateY(-3px);
    box-shadow: var(--glow-yellow);
}

.pfp-traits-summary {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.pfp-trait-tag {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pfp-trait-tag span:first-child {
    margin-right: 0.25rem;
}

/* Traits Panel */
.pfp-traits-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.pfp-trait-category {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.3s var(--ease);
}

.pfp-trait-category:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.pfp-trait-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pfp-trait-icon {
    font-size: 1.25rem;
}

.pfp-trait-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
}

.pfp-clear-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.pfp-clear-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: white;
}

.pfp-trait-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

/* Custom scrollbar for trait grids */
.pfp-trait-grid::-webkit-scrollbar {
    width: 4px;
}

.pfp-trait-grid::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 2px;
}

.pfp-trait-grid::-webkit-scrollbar-thumb {
    background: var(--yellow);
    border-radius: 2px;
}

.pfp-trait-item {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: var(--bg-darker);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pfp-trait-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pfp-trait-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.pfp-trait-item.selected {
    border-color: var(--yellow);
    box-shadow: var(--glow-yellow);
}

.pfp-trait-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.25rem;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Empty state for trait grids */
.pfp-trait-empty {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* Section transitions for smooth flow */
.about,
.memes,
.generator,
.pfp-section,
.games {
    position: relative;
}

.about::after,
.pfp-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-darker));
    pointer-events: none;
}

.memes::after,
.generator::after,
.games::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-darker));
    pointer-events: none;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-links a:not(.nav-social):not(.deep-fry-btn) {
        display: none;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .mascot {
        width: 160px;
        height: 160px;
        border-radius: 50%;
        overflow: hidden;
    }

    .hero {
        padding: 5rem 1.5rem 5rem;
        min-height: auto;
    }

    .scroll-indicator {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 2rem;
    }

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

    .laugh-counter {
        flex-direction: column;
        gap: 1rem;
    }

    .laugh-count {
        align-items: center;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .contract-display {
        margin-top: 1.5rem;
    }

    .contract-display code {
        font-size: 0.6rem;
        padding: 0.5rem 1rem;
        word-break: break-all;
        display: block;
        max-width: 280px;
    }

    .about {
        padding: 5rem 1.5rem;
    }

    .about-mission {
        padding: 1.5rem;
    }

    .generator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #memeCanvas {
        width: 100%;
        max-width: 320px;
    }

    .meme-select-grid {
        grid-template-columns: repeat(4, 1fr);
        max-height: 200px;
    }

    .memes {
        padding: 3rem 1rem 4rem;
        background: var(--bg-dark);
    }

    .memes .section-subtitle {
        display: none;
    }

    .meme-gallery {
        display: none !important;
    }

    .meme-depot-link {
        margin-top: 1.5rem;
    }

    /* Slot Machine responsive */
    .slot-machine {
        max-width: 100%;
    }

    .slot-frame {
        padding: 1rem;
    }

    .slot-window {
        width: 90px;
        height: 100px;
    }

    .slot-item {
        width: 90px;
        height: 100px;
        font-size: 3rem;
    }

    .spin-btn {
        padding: 1rem 2.5rem;
        font-size: 1.25rem;
    }

    .slot-stats {
        gap: 2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .meme-depot-link {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    /* PFP Generator responsive */
    .pfp-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pfp-preview-panel {
        position: static;
        max-width: 350px;
        margin: 0 auto;
    }

    .pfp-trait-grid {
        grid-template-columns: repeat(4, 1fr);
        max-height: 150px;
    }

    .pfp-action-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .footer-links {
        gap: 0.75rem;
    }

    .footer-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.85rem;
    }

    .footer-link .link-icon {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .footer-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 15vw, 4rem);
    }

    .mascot {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        overflow: hidden;
    }

    .memes {
        padding: 2.5rem 0.75rem 3rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
}
