/* =============================
   LIVE ANIMATED BACKGROUND
============================= */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(-45deg, #eef2ff, #f5f3ff, #ede9fe, #e0e7ff);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    min-height: 100vh;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating blobs */

body::before,
body::after {
    content: "";
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    z-index: -1;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

body::before {
    background: #6366f1;
    top: -150px;
    left: -150px;
}

body::after {
    background: #8b5cf6;
    bottom: -150px;
    right: -150px;
}

@keyframes floatBlob {
    from { transform: translateY(0px) scale(1); }
    to { transform: translateY(60px) scale(1.2); }
}

/* =============================
   MAIN CARD (GLASS STYLE)
============================= */

.agpd-container {
    max-width: 1500px;
    margin: 80px auto;
    padding: 50px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.agpd-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.15);
}

/* =============================
   TITLE
============================= */

.agpd-container h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 35px;
    color: #1e1b4b;
}

/* =============================
   FILE UPLOAD
============================= */

#agpd_image {
    width: 100%;
    padding: 18px;
    border: 2px dashed #a5b4fc;
    border-radius: 16px;
    background: #f8fafc;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

#agpd_image:hover {
    border-color: #6366f1;
    background: #eef2ff;
}

/* =============================
   CHECKBOX STYLING
============================= */

.agpd-options label {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s ease;
}

.agpd-options label:hover {
    color: #4f46e5;
}

.agpd-options input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #6366f1;
    border-radius: 6px;
    margin-right: 12px;
    position: relative;
    cursor: pointer;
    transition: 0.2s ease;
}

.agpd-options input[type="checkbox"]:checked {
    background: #6366f1;
}

.agpd-options input[type="checkbox"]:checked::after {
    content: "✔";
    color: #fff;
    font-size: 14px;
    position: absolute;
    top: 0px;
    left: 3px;
}

/* =============================
   GENERATE BUTTON
============================= */

#agpd_generate {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: none;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#agpd_generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
}

/* =============================
   OUTPUT CARD
============================= */

.agpd-result-box {
    margin-top: 30px;
    padding: 30px;
    border-radius: 18px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    position: relative;
    transition: 0.3s ease;
}

.agpd-result-box:hover {
    transform: translateY(-4px);
}

/* =============================
   RESULT OUTSIDE CARD
============================= */

.agpd-result-wrapper {
    width: 100%;
    margin-top: 3px;
    display: flex;
    justify-content: center;
}

.agpd-result-container {
    max-width: 1000px;
    width: 100%;
    
}

/* =============================
   COPY BUTTON
============================= */

.agpd-copy {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #111827;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.agpd-copy:hover {
    background: #6366f1;
}

.agpd-copy {
    cursor: pointer;
    transition: all 0.3s ease;
}

.agpd-copy.copied {
    background: #22c55e;
    color: #fff;
}
/* =============================
   OUTPUT TEXT
============================= */

.agpd-result-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}

/* =============================
   LOADER
============================= */

#agpd_loader {
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
    color: #4f46e5;
}

/* =============================
   MOBILE RESPONSIVE
============================= */

@media(max-width:768px) {
    .agpd-container {
        padding: 30px;
        margin: 40px 15px;
    }
}

.agpd-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.agpd-result-header h3 {
    margin: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #1e1b4b;
}
/* =============================
   RULES PANEL DESIGN
============================= */

.convertify-single {
    display: flex;
    flex-direction: column;   /* 👈 THIS IS THE FIX */
    align-items: center;      /* keeps it centered */
}

.rules-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 35px;
    gap: 40px;
}

.rules-left h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e1b4b;
}

.rules-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.convertify-time {
    margin: 0;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #374151;
}

.rule-number {
    background: #3b82f6;
    color: white;
    font-size: 13px;
    font-weight: 600;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .agpd-container {
        padding: 25px;
        margin: 30px 15px;
    }

    .rules-panel {
        display: flex;
        flex-direction: row !important;   /* 🔥 force same layout */
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
    }

    .rules-left h3 {
        font-size: 16px;
    }

    .rule-item {
        font-size: 14px;
    }

    .rule-number {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

}