/* Windows 98 Theme Styles */

/* Base Windows 98 Colors */
:root {
    --win98-gray: #C0C0C0;
    --win98-dark-gray: #808080;
    --win98-light-gray: #DFDFDF;
    --win98-blue: #000080;
    --win98-white: #FFFFFF;
    --win98-black: #000000;
}

/* Windows 98 Button Style */
.win98-button {
    background: var(--win98-gray);
    border: 2px solid;
    border-top-color: var(--win98-white);
    border-left-color: var(--win98-white);
    border-right-color: var(--win98-dark-gray);
    border-bottom-color: var(--win98-dark-gray);
    padding: 4px 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 1px 1px 0px var(--win98-black);
}

.win98-button:hover {
    background: var(--win98-light-gray);
}

.win98-button:active {
    border-top-color: var(--win98-dark-gray);
    border-left-color: var(--win98-dark-gray);
    border-right-color: var(--win98-white);
    border-bottom-color: var(--win98-white);
    transform: translate(1px, 1px);
    box-shadow: none;
}

/* Windows 98 Frame Style */
.win98-frame {
    background: var(--win98-white);
    border: 2px solid;
    border-top-color: var(--win98-white);
    border-left-color: var(--win98-white);
    border-right-color: var(--win98-dark-gray);
    border-bottom-color: var(--win98-dark-gray);
    padding: 4px;
    box-shadow: 2px 2px 0px var(--win98-black);
}

/* Social Media Button Style */
.social-button {
    background: var(--win98-gray);
    border: 2px solid;
    border-top-color: var(--win98-white);
    border-left-color: var(--win98-white);
    border-right-color: var(--win98-dark-gray);
    border-bottom-color: var(--win98-dark-gray);
    padding: 8px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 1px 1px 0px var(--win98-black);
}

/* Navbar social buttons - smaller size and black color */
nav .social-button {
    padding: 4px;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-button:hover {
    background: var(--win98-light-gray);
}

.social-button:active {
    border-top-color: var(--win98-dark-gray);
    border-left-color: var(--win98-dark-gray);
    border-right-color: var(--win98-white);
    border-bottom-color: var(--win98-white);
    transform: translate(1px, 1px);
    box-shadow: none;
}

.social-button img {
    filter: brightness(0) invert(1);
    width: 24px;
    height: 24px;
}

/* Navbar social buttons - smaller size and black color */
nav .social-button img {
    width: 16px;
    height: 16px;
    filter: brightness(0);
    /* Only make it black, no invert */
}

/* Glitch Effect */
.glitch-text {
    position: relative;
    animation: glitch 2s infinite;
}

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

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-1 {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(2px, -2px);
    }

    40% {
        transform: translate(2px, 2px);
    }

    60% {
        transform: translate(-2px, -2px);
    }

    80% {
        transform: translate(-2px, 2px);
    }
}

/* Marquee Animation */
.marquee-container {
    overflow: hidden;
    height: 80px;
    background: var(--win98-white);
    border: 2px solid var(--win98-dark-gray);
    margin: 10px 0;
}

.marquee {
    display: flex;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.marquee-left {
    animation-name: marquee-left;
}

.marquee-right {
    animation-name: marquee-right;
}

.marquee-item {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin: 0 4px;
    border: 1px solid var(--win98-dark-gray);
}

@keyframes marquee-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Vertical Marquee Animation for Meme Grid */
.meme-container {
    overflow: hidden;
    height: 400px;
    position: relative;
}

.meme-column {
    position: relative;
    width: 100%;
}

.meme-column img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    margin-bottom: 4px;
    display: block;
    /* Optimize for faster loading */
    will-change: transform;
    backface-visibility: hidden;
}

/* Column 1: Move Up */
.column-1 {
    animation: marquee-up 20s linear infinite;
}

/* Column 2: Move Down */
.column-2 {
    animation: marquee-down 20s linear infinite;
}

/* Column 3: Move Up */
.column-3 {
    animation: marquee-up 20s linear infinite;
}

/* Column 4: Move Down */
.column-4 {
    animation: marquee-down 20s linear infinite;
}

@keyframes marquee-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes marquee-down {
    0% {
        transform: translateY(-50%);
    }

    100% {
        transform: translateY(0);
    }
}

/* Preloader Animation */
#preloader {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2rem !important;
    }

    .marquee-container {
        height: 60px;
    }

    .marquee-item {
        width: 60px;
        height: 60px;
    }

    /* Mobile grid adjustment - show only columns 1 and 2 */
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Hide columns 3 and 4 on mobile */
    .meme-container:nth-child(3),
    .meme-container:nth-child(4) {
        display: none;
    }
}

@media (max-width: 480px) {
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    /* Hide columns 3 and 4 on mobile */
    .meme-container:nth-child(3),
    .meme-container:nth-child(4) {
        display: none;
    }
}

/* Hide Scrollbar */
::-webkit-scrollbar {
    display: none;
}

/* For Firefox */
html {
    scrollbar-width: none;
}

/* For IE/Edge */
body {
    -ms-overflow-style: none;
}

/* Selection Color */
::selection {
    background: var(--win98-blue);
    color: var(--win98-white);
}

/* Focus Styles */
button:focus,
input:focus {
    outline: 2px solid var(--win98-blue);
    outline-offset: 2px;
}

/* Contract Address Box */
#contract-address {
    background: var(--win98-light-gray);
    border: 1px solid var(--win98-dark-gray);
    padding: 4px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* Copy Button Animation */
.copy-success {
    animation: copyPulse 0.5s ease;
}

@keyframes copyPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Audio Control Button */
#audio-control {
    transition: all 0.2s ease;
    min-width: 48px;
    min-height: 48px;
}

#audio-control:hover {
    transform: scale(1.1);
}

#audio-control:active {
    transform: scale(0.95);
}

/* Audio icon animation */
#audio-icon {
    transition: all 0.2s ease;
}

/* Audio control button - initially hidden */
#audio-control {
    display: none;
}