@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff0000, #00ff00, #ffff00, #ff00ff);
    background-size: 1000% 1000%;
    animation: lsdTrip 3s ease infinite;
    font-family: 'Press Start 2P', monospace;
    overflow-x: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

@keyframes lsdTrip {
    0% { background-position: 0% 50%; filter: hue-rotate(0deg) contrast(200%); }
    50% { background-position: 100% 50%; filter: hue-rotate(180deg) contrast(300%) invert(10%); }
    100% { background-position: 0% 50%; filter: hue-rotate(360deg) contrast(200%); }
}

.glitch-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.9; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.container {
    background: rgba(0, 0, 0, 0.85);
    padding: 2rem;
    border: 5px solid #0f0;
    box-shadow: 0 0 50px #0f0, inset 0 0 50px #0f0;
    text-align: center;
    z-index: 10;
    max-width: 800px;
    width: 90%;
    position: relative;
    border-radius: 15px;
}

.glitch {
    font-size: 2.5rem;
    position: relative;
    text-shadow: 4px 4px 0px #ff00ff, -4px -4px 0px #00ffff;
    animation: textGlitch 0.15s infinite alternate;
    line-height: 1.5;
}

@keyframes textGlitch {
    0% { transform: translate(2px, 2px) skewX(0deg); text-shadow: 4px 4px 0px #ff00ff, -4px -4px 0px #00ffff; }
    25% { transform: translate(-2px, -2px) skewX(5deg); text-shadow: -4px 4px 0px #0f0, 4px -4px 0px #f00; }
    50% { transform: translate(3px, -1px) skewX(-5deg); text-shadow: 4px -4px 0px #ff00ff, -4px 4px 0px #00ffff; }
    75% { transform: translate(-1px, 3px) skewX(2deg); text-shadow: -4px -4px 0px #f00, 4px 4px 0px #0f0; }
    100% { transform: translate(2px, -2px) skewX(0deg); text-shadow: 4px -4px 0px #ff00ff, -4px 4px 0px #00ffff; }
}

.static-title {
    color: #fff;
    text-shadow: 2px 2px 0px #ff00ff;
    font-size: 2rem;
    margin: 15px 0 5px 0;
    letter-spacing: 2px;
}

.psycho-btn {
    background: #000;
    color: #0f0;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    padding: 20px;
    border: 4px solid #ff00ff;
    cursor: pointer;
    box-shadow: 0 0 20px #ff00ff;
    transition: 0.1s;
    margin: 20px 0;
    animation: btnPulse 0.5s infinite alternate;
    text-transform: uppercase;
}

.psycho-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.15) rotate(3deg);
    border-color: #00ffff;
    box-shadow: 0 0 50px #00ffff;
}

@keyframes btnPulse {
    0% { box-shadow: 0 0 10px #ff00ff; }
    100% { box-shadow: 0 0 40px #00ffff, 0 0 10px #fff; }
}

#memeImage {
    max-width: 100%;
    border: 5px dashed #ff0;
    margin-top: 20px;
    filter: contrast(150%) saturate(200%);
    animation: imgGlitch 0.2s infinite;
}

@keyframes imgGlitch {
    0% { transform: translateX(0); filter: hue-rotate(0deg) contrast(150%) saturate(200%); }
    50% { transform: translateX(-3px); filter: hue-rotate(90deg) contrast(200%) saturate(300%); }
    100% { transform: translateX(3px); filter: hue-rotate(0deg) contrast(150%) saturate(200%); }
}

.desc-container {
    max-height: 120px;
    overflow-y: auto;
    background: #000;
    border: 2px solid #0f0;
    margin: 15px 0;
    padding: 10px;
    text-align: left;
}

#memeDesc {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    word-break: break-word;
}

.desc-container::-webkit-scrollbar { width: 12px; }
.desc-container::-webkit-scrollbar-track { background: #000; border-left: 1px solid #0f0; }
.desc-container::-webkit-scrollbar-thumb { background: #ff00ff; border: 1px solid #000; }
.desc-container::-webkit-scrollbar-thumb:hover { background: #00ffff; }

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.small-btn {
    background: #000;
    color: #0ff;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    padding: 10px 15px;
    border: 2px solid #0ff;
    cursor: pointer;
    transition: 0.2s;
}

.small-btn:hover {
    background: #0ff;
    color: #000;
    box-shadow: 0 0 15px #0ff;
}

.bottom-links {
    display: flex;
    gap: 20px;
    z-index: 10;
}

.link-btn {
    background: rgba(0, 0, 0, 0.8);
    color: #ffff00;
    text-decoration: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    padding: 15px 20px;
    border: 3px solid #ffff00;
    cursor: pointer;
    transition: 0.2s;
    text-shadow: 2px 2px #000;
}

.link-btn:hover {
    background: #ffff00;
    color: #000;
    box-shadow: 0 0 20px #ffff00;
    transform: translateY(-5px);
}

.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #111;
    border: 4px solid #ff00ff;
    padding: 30px;
    width: 80%;
    max-width: 600px;
    color: #0f0;
    text-align: left;
    position: relative;
    box-shadow: 0 0 50px #ff00ff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    line-height: 1.6;
}

.modal-content h2 {
    font-family: 'Press Start 2P', monospace;
    color: #00ffff;
    margin-top: 0;
}

.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 2rem;
    color: #ff0000;
    cursor: pointer;
    font-family: sans-serif;
    font-weight: bold;
}

.close-btn:hover { color: #fff; }

.neon-text {
    color: #fff;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #ff00ff, 0 0 40px #ff00ff, 0 0 80px #ff00ff;
    margin-top: 15px;
}

#memeTicker {
    color: #0f0;
    font-size: 1.5rem;
    text-shadow: 2px 2px 0 #000;
    margin: 5px 0 10px 0;
}

.glitch-fast {
    font-size: 2rem;
    color: #ff0000;
    animation: textGlitch 0.05s infinite alternate;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
        width: 95%;
        border-width: 3px;
    }
    
    .glitch {
        font-size: 1.8rem;
    }
    
    .static-title {
        font-size: 1.4rem;
    }
    
    .psycho-btn {
        font-size: 1rem;
        padding: 15px;
    }
    
    .small-btn {
        font-size: 0.7rem;
        padding: 10px;
        flex-grow: 1;
    }
    
    .bottom-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .link-btn {
        font-size: 1rem;
        padding: 10px 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        font-size: 1rem;
    }
}