/* ============================================
   HORSES MEMES - STYLES THAT SHOULD NOT EXIST
   ============================================ */

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

:root {
    --neon-pink: #ff006e;
    --neon-blue: #3a86ff;
    --neon-green: #06d6a0;
    --neon-yellow: #ffd166;
    --neon-purple: #8338ec;
    --neon-orange: #fb5607;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #12121a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --chaos-gradient: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), var(--neon-blue));
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Permanent Marker', cursive;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' style='font-size:24px'><text y='24'>🐴</text></svg>") 16 16, auto;
}

.hidden { display: none !important; }

/* SCROLLBAR - EVEN THIS IS CHAOTIC */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--darker-bg); }
::-webkit-scrollbar-thumb {
    background: var(--chaos-gradient);
    border-radius: 6px;
    border: 2px solid var(--darker-bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-pink);
}

/* ============================================
   LOADING SCREEN
   ============================================ */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, transform 0.5s;
}

#loading-screen.fade-out {
    opacity: 0;
    transform: scale(1.2);
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-horse {
    font-size: 100px;
    animation: loadingBounce 0.6s ease-in-out infinite alternate, loadingSpin 3s linear infinite;
}

@keyframes loadingBounce {
    from { transform: translateY(0) rotate(0); }
    to { transform: translateY(-30px) rotate(0); }
}

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

.loading-title {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(2rem, 6vw, 5rem);
    background: var(--chaos-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 20px 0;
    animation: titlePulse 1s ease-in-out infinite alternate;
}

@keyframes titlePulse {
    from { filter: brightness(1); transform: scale(1); }
    to { filter: brightness(1.3); transform: scale(1.05); }
}

.loading-sub {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.5rem, 1.5vw, 0.8rem);
    color: var(--neon-green);
    margin-bottom: 30px;
    animation: blink 0.5s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.loading-bar-container {
    width: 300px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 2px solid var(--neon-pink);
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: var(--chaos-gradient);
    border-radius: 8px;
    transition: width 0.3s;
    box-shadow: 0 0 20px var(--neon-pink);
}

.loading-warning {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--neon-yellow);
    animation: blink 1s step-end infinite;
}

/* ============================================
   NAVBAR
   ============================================ */

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--neon-pink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.3);
}

.nav-logo {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    background: var(--chaos-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s;
}

.nav-logo:hover {
    transform: scale(1.1) rotate(-3deg);
}

.nav-tagline {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-left: 10px;
    font-family: 'Press Start 2P', monospace;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    font-family: 'Bangers', cursive;
    font-size: 1.1rem;
    letter-spacing: 2px;
    position: relative;
    transition: all 0.3s;
}

.nav-link::after {
    content: attr(data-hover);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-family: 'Press Start 2P', monospace;
    color: var(--neon-green);
    opacity: 0;
    transition: opacity 0.3s, top 0.3s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    opacity: 1;
    top: 80%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.community-btn {
    font-family: 'Bangers', cursive;
    font-size: 0.9rem;
    padding: 8px 18px;
    background: #000;
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    letter-spacing: 1px;
    transition: all 0.3s;
    white-space: nowrap;
}

.community-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.insanity-button {
    font-family: 'Bangers', cursive;
    font-size: 0.9rem;
    padding: 8px 16px;
    background: var(--chaos-gradient);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 25px;
    letter-spacing: 1px;
    transition: all 0.3s;
    animation: insanityPulse 2s ease-in-out infinite;
}

@keyframes insanityPulse {
    0%, 100% { box-shadow: 0 0 10px var(--neon-pink); }
    50% { box-shadow: 0 0 30px var(--neon-pink), 0 0 60px var(--neon-purple); }
}

.insanity-button:hover {
    transform: scale(1.1);
    animation: insanityShake 0.1s linear infinite;
}

@keyframes insanityShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-2deg); }
    75% { transform: translateX(3px) rotate(2deg); }
}

.visitor-counter {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--neon-green);
    text-align: right;
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(131, 56, 236, 0.15) 0%, var(--dark-bg) 70%);
    padding-top: 60px;
}

.hero-bg-chaos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-horse {
    position: absolute;
    font-size: 40px;
    opacity: 0.15;
    animation: floatHorse 15s ease-in-out infinite;
}

.fh-1 { top: 10%; left: 5%; animation-delay: 0s; animation-duration: 12s; font-size: 60px; }
.fh-2 { top: 20%; right: 10%; animation-delay: -3s; animation-duration: 18s; font-size: 45px; }
.fh-3 { top: 50%; left: 15%; animation-delay: -6s; animation-duration: 14s; font-size: 55px; }
.fh-4 { top: 70%; right: 20%; animation-delay: -2s; animation-duration: 16s; font-size: 35px; }
.fh-5 { top: 30%; left: 60%; animation-delay: -8s; animation-duration: 20s; font-size: 50px; }
.fh-6 { top: 80%; left: 40%; animation-delay: -4s; animation-duration: 13s; font-size: 65px; }
.fh-7 { top: 15%; left: 80%; animation-delay: -10s; animation-duration: 17s; font-size: 40px; }
.fh-8 { top: 60%; right: 5%; animation-delay: -7s; animation-duration: 15s; font-size: 55px; }

@keyframes floatHorse {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -40px) rotate(10deg); }
    50% { transform: translate(-20px, 20px) rotate(-5deg); }
    75% { transform: translate(40px, 10px) rotate(15deg); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 20px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(255, 0, 110, 0.2);
    border: 1px solid var(--neon-pink);
    border-radius: 25px;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.4rem, 1vw, 0.7rem);
    color: var(--neon-pink);
    margin-bottom: 20px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 110, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 110, 0.6); }
}

.hero-title {
    font-family: 'Bungee Shade', cursive;
    line-height: 1;
    margin-bottom: 20px;
}

.hero-line-1 {
    display: block;
    font-size: clamp(4rem, 12vw, 10rem);
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange), var(--neon-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(255, 0, 110, 0.5));
    animation: heroGlow 3s ease-in-out infinite alternate;
}

.hero-line-2 {
    display: block;
    font-size: clamp(3rem, 10vw, 8rem);
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(58, 134, 255, 0.5));
    animation: heroGlow 3s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    from { filter: drop-shadow(0 0 20px rgba(255, 0, 110, 0.3)) brightness(1); }
    to { filter: drop-shadow(0 0 50px rgba(255, 0, 110, 0.8)) brightness(1.2); }
}

.hero-subtitle {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(0.8rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.4;
}

.hero-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 25px;
    text-align: center;
    transition: all 0.3s;
}

.stat-box:hover {
    border-color: var(--neon-pink);
    transform: translateY(-5px) rotate(-2deg);
    box-shadow: 0 10px 30px rgba(255, 0, 110, 0.3);
}

.stat-number {
    display: block;
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.stat-label {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--text-secondary);
}

.ca-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--neon-green);
    border-radius: 15px;
    padding: 12px 20px;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90vw;
}

.ca-container:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 25px rgba(6, 214, 160, 0.4);
    transform: scale(1.02);
}

.ca-label {
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    letter-spacing: 2px;
}

.ca-address {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.35rem, 1vw, 0.6rem);
    color: var(--text-primary);
    word-break: break-all;
    user-select: all;
}

.ca-copy-btn {
    font-family: 'Bangers', cursive;
    font-size: 0.9rem;
    padding: 6px 14px;
    background: var(--neon-green);
    border: none;
    border-radius: 10px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.ca-copy-btn:hover {
    background: var(--neon-pink);
    color: #fff;
    transform: scale(1.1);
}

.ca-copy-btn.copied {
    background: var(--neon-yellow);
}

.hero-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 50px;
    background: var(--chaos-gradient);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: white;
    letter-spacing: 3px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.hero-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: ctaShine 3s linear infinite;
}

@keyframes ctaShine {
    from { transform: translateX(-100%) rotate(45deg); }
    to { transform: translateX(100%) rotate(45deg); }
}

.hero-cta:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px var(--neon-pink), 0 0 80px var(--neon-purple);
}

.hero-cta:active {
    transform: scale(0.95);
}

.cta-sub {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    opacity: 0.7;
    margin-top: 5px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    text-align: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow {
    font-size: 1.5rem;
    margin-top: 10px;
    animation: arrowBounce 1s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ============================================
   TICKER BAR
   ============================================ */

.ticker-bar {
    background: var(--neon-pink);
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-content {
    display: inline-flex;
    gap: 50px;
    animation: ticker 40s linear infinite;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: white;
}

.ticker-content span {
    flex-shrink: 0;
}

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============================================
   SECTION HEADERS
   ============================================ */

section {
    padding: 80px 20px;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: 'Bungee Shade', cursive;
    font-size: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: 10px;
}

.section-sub {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.4rem, 1vw, 0.7rem);
    color: var(--text-secondary);
}

/* GLITCH EFFECT */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: var(--neon-pink);
    animation: glitch1 3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    z-index: -1;
}

.glitch::after {
    color: var(--neon-blue);
    animation: glitch2 3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    z-index: -1;
}

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

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

/* WOBBLE */
.wobble {
    animation: wobble 3s ease-in-out infinite;
}

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

/* RAINBOW TEXT */
.rainbow-text {
    background: linear-gradient(90deg,
        var(--neon-pink), var(--neon-orange), var(--neon-yellow),
        var(--neon-green), var(--neon-blue), var(--neon-purple), var(--neon-pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 3s linear infinite;
}

@keyframes rainbowShift {
    to { background-position: 200% center; }
}

/* SHAKE */
.shake-text {
    animation: shakeText 5s ease-in-out infinite;
}

@keyframes shakeText {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

/* ============================================
   MEME FEED
   ============================================ */

#feed {
    background: var(--darker-bg);
}

.feed-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.filter-btn {
    font-family: 'Bangers', cursive;
    font-size: 1rem;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 110, 0.2);
    color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
    transform: translateY(-2px);
}

.meme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.meme-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
}

.meme-card:hover {
    transform: translateY(-10px) rotate(-1deg);
    border-color: var(--neon-pink);
    box-shadow: 0 20px 40px rgba(255, 0, 110, 0.3);
    z-index: 10;
}

.meme-card:nth-child(even):hover {
    transform: translateY(-10px) rotate(1deg);
}

.meme-card .meme-image-container {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(255,0,110,0.1), rgba(58,134,255,0.1));
}

.meme-card .meme-image-container .meme-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    transition: all 0.5s;
    position: relative;
}

.meme-card .meme-image-container .meme-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s;
    display: block;
}

.meme-card:hover .meme-img {
    transform: scale(1.15);
}

.meme-card:hover .meme-placeholder {
    transform: scale(1.2) rotate(10deg);
}

.meme-overlay-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-family: 'Bangers', cursive;
    color: white;
    text-shadow: 3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000;
    letter-spacing: 2px;
    z-index: 2;
}

.meme-overlay-text.top {
    top: 10px;
    font-size: 1.2rem;
}

.meme-overlay-text.bottom {
    bottom: 10px;
    font-size: 1.4rem;
}

.meme-card-footer {
    padding: 15px;
}

.meme-card-footer .meme-title {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.meme-card-footer .meme-actions {
    display: flex;
    gap: 10px;
}

.meme-action-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.meme-action-btn:hover {
    background: rgba(255, 0, 110, 0.2);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    transform: scale(1.1);
}

.meme-action-btn.liked {
    background: rgba(255, 0, 110, 0.3);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.load-more-zone {
    text-align: center;
    padding: 40px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.loading-spinner {
    font-size: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* MEME CARD SPECIAL EFFECTS */
.meme-card.glitch-effect {
    animation: cardGlitch 0.3s steps(2) infinite;
}

@keyframes cardGlitch {
    0% { transform: translate(0); filter: hue-rotate(0); }
    25% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
    50% { transform: translate(2px, -2px); filter: hue-rotate(180deg); }
    75% { transform: translate(-2px, -2px); filter: hue-rotate(270deg); }
    100% { transform: translate(2px, 2px); filter: hue-rotate(360deg); }
}

.meme-card.deep-fried {
    filter: contrast(2) saturate(3) brightness(1.5);
}

.meme-card.spin-effect {
    animation: cardSpin 1s ease-in-out;
}

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

/* ============================================
   HORSE REACTION GENERATOR
   ============================================ */

#generator {
    background: radial-gradient(ellipse at center, rgba(255, 0, 110, 0.1) 0%, var(--dark-bg) 70%);
}

.generator-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.reaction-display {
    background: var(--card-bg);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
}

.reaction-display.active {
    border-color: var(--neon-pink);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.3);
}

.reaction-horse {
    font-size: 100px;
    transition: all 0.5s;
    margin-bottom: 15px;
}

.reaction-horse-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--neon-pink);
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.5);
    transition: all 0.3s;
}

.reaction-display.active .reaction-horse-img {
    animation: reactionImgPop 0.3s ease-out;
}

@keyframes reactionImgPop {
    0% { transform: scale(0.5) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

.reaction-text {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    max-width: 400px;
    transition: all 0.3s;
}

.reaction-mood {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--neon-green);
    margin-top: 10px;
}

.generate-btn {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    padding: 18px 45px;
    background: var(--chaos-gradient);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--neon-pink);
}

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

.generate-btn.generating {
    animation: generateShake 0.1s linear infinite;
}

@keyframes generateShake {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-5px, 5px) rotate(-5deg); }
    50% { transform: translate(5px, -5px) rotate(5deg); }
    75% { transform: translate(-5px, -5px) rotate(-3deg); }
}

.reaction-counter {
    margin-top: 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
}

/* ============================================
   CATEGORIES
   ============================================ */

#categories {
    background: var(--darker-bg);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-card {
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--card-color, var(--neon-pink)), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--card-color, var(--neon-pink));
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.category-card:hover::before {
    opacity: 0.15;
}

.card-emoji {
    font-size: 50px;
    margin-bottom: 15px;
    transition: all 0.4s;
    position: relative;
    z-index: 1;
}

.category-card:hover .card-emoji {
    transform: scale(1.3) rotate(10deg);
}

.category-card h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.category-card p {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.card-count {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--neon-green);
    position: relative;
    z-index: 1;
}

/* ============================================
   UPLOAD SECTION
   ============================================ */

#upload {
    background: var(--dark-bg);
}

.upload-container {
    max-width: 900px;
    margin: 0 auto;
}

.upload-zone {
    border: 3px dashed rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s;
    background: rgba(255, 255, 255, 0.02);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 110, 0.05);
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.2);
}

.upload-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: uploadBounce 2s ease-in-out infinite;
}

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

.upload-zone h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.upload-zone p {
    font-family: 'Permanent Marker', cursive;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.upload-warning {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--neon-yellow) !important;
    margin-top: 15px !important;
}

/* MEME MAKER */
.meme-maker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.meme-preview {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.meme-preview canvas {
    max-width: 100%;
    max-height: 500px;
}

.meme-controls {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
}

.meme-controls h3 {
    font-family: 'Bangers', cursive;
    font-size: 1.3rem;
    margin-bottom: 20px;
    background: var(--chaos-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.meme-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Permanent Marker', cursive;
    font-size: 1rem;
    transition: all 0.3s;
}

.meme-input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
}

.chaos-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
}

.chaos-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--chaos-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-pink);
}

.chaos-labels {
    display: flex;
    justify-content: space-between;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.effect-btn {
    font-family: 'Bangers', cursive;
    font-size: 0.9rem;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.effect-btn:hover {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 110, 0.2);
    transform: scale(1.05);
}

.effect-btn.active {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
}

.download-btn {
    width: 100%;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    padding: 15px;
    background: var(--chaos-gradient);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px var(--neon-pink);
}

/* ============================================
   HORSE FACTS
   ============================================ */

#facts {
    background: radial-gradient(ellipse at center, rgba(6, 214, 160, 0.1) 0%, var(--darker-bg) 70%);
    overflow: hidden;
}

.facts-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 1400px;
    margin: 0 auto;
}

.facts-carousel::-webkit-scrollbar {
    height: 8px;
}

.fact-card {
    flex: 0 0 350px;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    scroll-snap-align: start;
    transition: all 0.4s;
}

.fact-card:hover {
    border-color: var(--neon-green);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(6, 214, 160, 0.2);
}

.fact-number {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: var(--neon-green);
    margin-bottom: 10px;
}

.fact-text {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.fact-source {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */

#footer {
    background: var(--darker-bg);
    border-top: 2px solid var(--neon-pink);
    padding: 50px 20px;
    text-align: center;
}

.footer-logo {
    font-family: 'Bungee Shade', cursive;
    font-size: 2rem;
    background: var(--chaos-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.footer-text {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.footer-warning {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: var(--neon-yellow);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Bangers', cursive;
    font-size: 0.9rem;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.footer-link:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.footer-ascii pre {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--neon-green);
    opacity: 0.5;
}

/* ============================================
   CURSOR CANVAS
   ============================================ */

#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ============================================
   RANDOM EVENTS
   ============================================ */

.random-event {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    pointer-events: none;
}

.event-content {
    font-size: 150px;
    animation: eventPop 2s ease-out forwards;
}

@keyframes eventPop {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    30% { transform: scale(1.5) rotate(20deg); opacity: 1; }
    70% { transform: scale(1.3) rotate(-10deg); opacity: 1; }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* ============================================
   INSANITY MODE
   ============================================ */

.insanity-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4000;
    pointer-events: none;
}

body.insanity-mode {
    animation: insanityBg 0.5s linear infinite;
}

body.insanity-mode * {
    animation-duration: 0.2s !important;
}

body.insanity-mode .meme-card {
    animation: cardChaos 0.3s linear infinite;
}

body.insanity-mode .floating-horse {
    animation: insanityFloat 0.5s linear infinite !important;
    opacity: 0.5 !important;
    font-size: 80px !important;
}

body.insanity-mode .section-title {
    animation: insanityText 0.2s steps(3) infinite !important;
}

@keyframes insanityBg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

@keyframes cardChaos {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(-5px, 5px) rotate(-5deg) scale(1.02); }
    50% { transform: translate(5px, -3px) rotate(3deg) scale(0.98); }
    75% { transform: translate(-3px, -5px) rotate(-3deg) scale(1.01); }
}

@keyframes insanityFloat {
    0%, 100% { transform: translate(0) scale(1); }
    50% { transform: translate(var(--random-x, 20px), var(--random-y, -30px)) scale(1.5) rotate(180deg); }
}

@keyframes insanityText {
    0% { transform: skew(0); filter: hue-rotate(0); }
    33% { transform: skew(5deg, -5deg); filter: hue-rotate(120deg); }
    66% { transform: skew(-5deg, 5deg); filter: hue-rotate(240deg); }
}

/* ============================================
   ACHIEVEMENT POPUP
   ============================================ */

.achievement {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 8000;
    animation: achievementSlide 4s ease-in-out forwards;
}

.achievement-content {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    border: 2px solid var(--neon-yellow);
    border-radius: 15px;
    padding: 15px 25px;
    box-shadow: 0 0 30px rgba(255, 209, 102, 0.3);
}

.achievement-icon {
    font-size: 30px;
}

.achievement-title {
    font-family: 'Bangers', cursive;
    font-size: 0.9rem;
    color: var(--neon-yellow);
    letter-spacing: 2px;
}

.achievement-desc {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.4rem;
    color: var(--text-secondary);
}

@keyframes achievementSlide {
    0% { transform: translateX(120%); opacity: 0; }
    10% { transform: translateX(0); opacity: 1; }
    80% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(120%); opacity: 0; }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    #navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 5px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 5px 10px;
    }

    .nav-right {
        flex-direction: column;
        gap: 5px;
    }

    .nav-tagline { display: none; }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .meme-grid {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .meme-maker {
        grid-template-columns: 1fr;
    }

    .facts-carousel {
        flex-direction: column;
        align-items: center;
    }

    .fact-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .ticker-content {
        font-size: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title .hero-line-1 { font-size: 3rem; }
    .hero-title .hero-line-2 { font-size: 2.5rem; }

    .hero-cta {
        padding: 15px 30px;
        font-size: 1.3rem;
    }
}

/* ============================================
   SCREEN SHAKE UTILITY
   ============================================ */

body.screen-shake {
    animation: screenShake 0.5s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-10px, -5px); }
    20% { transform: translate(10px, 5px); }
    30% { transform: translate(-8px, 3px); }
    40% { transform: translate(8px, -3px); }
    50% { transform: translate(-5px, 5px); }
    60% { transform: translate(5px, -5px); }
    70% { transform: translate(-3px, 2px); }
    80% { transform: translate(3px, -2px); }
    90% { transform: translate(-1px, 1px); }
}

/* PARTY MODE - used during insanity */
body.party-mode::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 0, 110, 0.3), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(58, 134, 255, 0.3), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(6, 214, 160, 0.3), transparent 50%);
    pointer-events: none;
    z-index: 3999;
    animation: partyBg 2s linear infinite;
    mix-blend-mode: screen;
}

@keyframes partyBg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Floating sticker during insanity */
.insanity-sticker {
    position: fixed;
    font-size: 60px;
    z-index: 4001;
    pointer-events: none;
    animation: stickerFall linear forwards;
}

@keyframes stickerFall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}
