/* Retro Popup Styles */
.retro-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.retro-popup.popup-exit {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.popup-content {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    animation: rainbowBg 3s ease infinite;
    border: 5px ridge #ffd700;
    padding: 5px;
    max-width: 350px;
    width: 350px;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8),
                0 0 60px rgba(0, 255, 255, 0.6),
                inset 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes rainbowBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.popup-header {
    background: linear-gradient(to bottom, #ff0000, #cc0000);
    color: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #000;
    font-family: "Courier New", monospace;
}

.popup-header-margin-left{
    margin-left: 10px;
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.popup-header-margin-right{
    margin-right: 10px;
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.popup-title {
    font-weight: bold;
    font-size: 1.2em;
    text-shadow: 2px 2px 0 #000;
    animation: titlePulse 1s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.popup-close {
    background: #fff;
    border: 2px outset #ccc;
    color: #000;
    font-weight: bold;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-family: "Courier New", monospace;
    transition: all 0.1s;
}

.popup-close:hover {
    background: #ff0000;
    color: #fff;
    border-style: inset;
}

.popup-body {
    background: #000;
    padding: 20px;
    border: 3px double #ffd700;
    text-align: center;
}

.popup-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popup-text {
    color: #00ff00;
    font-family: "supermario", sans-serif;
    font-size: 1.3em;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
}

.blink-popup {
    animation: blinkEffect 0.8s step-end infinite;
}

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

.popup-subtext {
    color: #ffff00;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
    margin: 10px 0;
    font-style: italic;
    text-shadow: 0 0 5px #ffff00;
}

.popup-marquee {
    background: linear-gradient(90deg, #ff0000, #ff9900, #ffff00, #00ff00, #0099ff, #9900ff, #ff0000);
    background-size: 200% 100%;
    animation: marqueeRainbow 2s linear infinite;
    color: #fff;
    font-weight: bold;
    padding: 8px;
    margin-top: 15px;
    border: 2px solid #fff;
    text-shadow: 2px 2px 0 #000;
}

@keyframes marqueeRainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.popup-footer {
    background: #000;
    padding: 15px;
    text-align: center;
    border-top: 3px double #ffd700;
}

.popup-btn {
    background: linear-gradient(to bottom, #00ff00, #00cc00);
    border: 3px outset #00ff00;
    color: #000;
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 1.1em;
    padding: 10px 30px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 10px #00ff00;
    transition: all 0.2s;
    animation: btnGlow 1.5s ease-in-out infinite;
}

.popup-btn:hover {
    background: linear-gradient(to bottom, #ffff00, #ff9900);
    border-color: #ffff00;
    box-shadow: 0 0 20px #ffff00;
    transform: scale(1.1);
}

.popup-btn:active {
    border-style: inset;
    transform: scale(0.95);
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 0 10px #00ff00; }
    50% { box-shadow: 0 0 30px #00ff00, 0 0 40px #00ff00; }
}

/* Dark theme popup adjustments */
.dark-theme .popup-content {
    border-color: #9b59b6;
}
