body {
    font-family: 'Comic Neue', cursive;
    background-image: url('3197.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: rgba(44, 3, 98, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    transition: all 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 35px rgba(0, 0, 0, 0.3);
}

h1 {
    font-family: 'Bangers', cursive;
    text-align: center;
    color: #ba3ff8;
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 3px 3px 0 #030303, 6px 6px 0 #920e92;
    letter-spacing: 2px;
}

.form-step {
    display: none;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #efeaea;
    font-size: 1.1rem;
}

input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

input[type="password"]:focus,
textarea:focus {
    border-color: #ec0ff8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

button {
    background-color: #1b0351;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

button:hover {
    background-color: #a30fb0;
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.prev-btn {
    background-color: #420aa2;
}

.prev-btn:hover {
    background-color: #a30fb0;
}

#loading {
    text-align: center;
}
#loading p {
    color: #e5e1e1; 
}


.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #bf31f7;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#comic-book {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.comic-panel {
    background-color: white;
    border: 5px solid #0c0b0b;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 80%;
}

.comic-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.comic-panel:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.2);
}

.comic-panel img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border: 5px solid #0c0c0c;
}

.comic-panel p {
    font-family: 'Comic Neue', cursive;
    font-weight: bold;
    text-align: center;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #333;
}

.hidden {
    display: none;
}

#regenerate-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.75rem 2rem;
    background: linear-gradient(45deg, #3c0495, #6e24c9);
    color: #fff;
    font-family: 'Comic Neue', sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(199, 120, 249, 0.835);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#regenerate-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(204, 120, 232, 0.624);
}

.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.page-btn {
    background-color: #7f019f;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.page-btn:hover {
    background-color: #b44ec2;
    color: rgb(6, 5, 5);
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#the-end {
    font-family: 'Bangers', cursive;
    font-size: 4rem;
    text-align: center;
    color: #e53935;
    text-shadow: 3px 3px 0 #ffeb3b, 6px 6px 0 #ff9800;
    margin-top: 2rem;
    animation: pulse 2s infinite;
}

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

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        width: 95%;
    }

    h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .comic-panel {
        max-width: 90%;
    }

    .page-btn {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }

    #the-end {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    label {
        font-size: 1rem;
    }

    input[type="password"],
    textarea,
    button {
        font-size: 0.9rem;
    }

    .comic-panel {
        max-width: 100%;
        padding: 10px;
    }

    .comic-panel img {
        border-width: 3px;
    }

    .comic-panel p {
        font-size: 1rem;
    }

    .page-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #regenerate-btn {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }

    #the-end {
        font-size: 3rem;
       

    }
}