#scp-popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    animation: fadeInBackground 0.4s ease-in-out;
}


.scp-btn {
    background-color: #8e6de7;
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-weight: bold;
    border-radius: 6px;
    margin-top: 10px;
    cursor: pointer;
    transition: 0.3s ease;
}
.scp-btn:hover {
    background-color: #7555d8;
}

#scp-box {
    background: #fff3f3;
    padding: 25px 20px;
    max-width: 400px;
    margin: 10% auto;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    font-family: 'Segoe UI', sans-serif;
    position: relative;
    animation: slideUp 0.4s ease-out;
}

#scp-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

#scp-close:hover {
    color: #000;
}

#scp-answer {
    padding: 4px;
    width: 90%;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin: 10px 0;
}

#scp-submit {
    padding: 10px 20px;
    background-color: #6a5acd;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#scp-submit:hover {
    background-color: #4b3fbd;
}

#scp-result {
    margin-top: 20px;
}

/* Animated congratulations */
.scp-congrats {
    font-size: 22px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    animation: bounceIn 0.8s ease;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.scp-subtext {
    font-size: 15px;
    color: #555;
    margin: 8px 0 20px;
}

.scp-code-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#scp-code {
    font-size: 18px;
    font-weight: bold;
    background: #f0f0f0;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

#scp-copy-btn {
    padding: 10px 20px;
    font-size: 14px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

#scp-copy-btn:hover {
    background: #218838;
}

@keyframes fadeInBackground {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

@media screen and (max-width: 480px) {
    #scp-box {
        width: 90%;
        margin-top: 30%;
    }

    #scp-answer {
        font-size: 14px;
    }

    .scp-code-box {
        flex-direction: column;
    }

    #scp-copy-btn {
        width: 100%;
    }
}

#scp-box h3 {
    margin: 0 0 10px 0;
}
