* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive, sans-serif;
    cursor: wait;
}

body {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    animation: gradient-bg 3s ease infinite;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

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

.card {
    background-color: rgba(30, 30, 30, 0.9);
    padding: 40px;
    border-radius: 40px 10px 50px 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 5px dashed #00ff00;
    box-shadow: 10px 10px 0px #ff00ff;
    transform: rotate(-3deg);
    animation: shake 5s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(-3deg) translate(0, 0); }
    25% { transform: rotate(-1deg) translate(2px, 2px); }
    50% { transform: rotate(-4deg) translate(-2px, -2px); }
    75% { transform: rotate(-2deg) translate(2px, -2px); }
}

.blink-warning {
    color: #ffff00;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #ff0000;
    animation: blink 0.1s infinite alternate;
}

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

h2 {
    font-size: 20px;
    margin-bottom: 30px;
    color: #00ffff;
    text-shadow: 1px 1px 0px #000;
}

.progress-container {
    width: 100%;
    height: 40px;
    background-color: #f0f;
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 3px dotted #ff0;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        45deg,
        #4caf50,
        #4caf50 10px,
        #ffeb3b 10px,
        #ffeb3b 20px
    );
    border-radius: 20px;
    transition: width 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    align-items: center;
    color: black;
    font-weight: bold;
}

.status-row {
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 2px 2px 0px #fff;
}

.button-group {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    position: relative;
    height: 60px;
}

button {
    font-family: inherit;
    flex: 1;
    padding: 15px;
    border: 4px solid #fff;
    border-radius: 50% 10% 40% 20%;
    font-size: 18px;
    font-weight: bold;
    cursor: wait;
    transition: transform 0.1s;
    position: relative; /* For dodging */
}

button:active {
    transform: scale(0.5) rotate(180deg);
}

#cancel-btn {
    background-color: #ff4444;
    color: white;
}

#retry-btn {
    background-color: #4444ff;
    color: white;
}

/* Popup Overlay Styles */
.popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background-color: #000;
    color: #0f0;
    padding: 40px;
    border: 10px double #f00;
    border-radius: 0;
    text-align: center;
    width: 90%;
    max-width: 500px;
    font-family: "Courier New", Courier, monospace;
}

.popup-content h3 {
    color: #f0f;
    font-size: 24px;
    margin-bottom: 20px;
    animation: blink 0.5s infinite;
}

.popup-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

#popup-ok-btn {
    background-color: #f00;
    color: #ffa500;
    font-size: 20px;
    border-radius: 0;
}
