/* Smooth animated gradient background */ 
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    background: linear-gradient(-45deg, #1E3A8A, #6D28D9, #FFFFFF, #1E3A8A);
    background-size: 300% 300%;
    animation: gradient-animation 8s ease infinite;
    color: white;
    font-family: "Poppins", sans-serif;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    flex-direction: column;
    zoom: 0.8;
}

body.webapp {
    animation: none;
    background: linear-gradient(-45deg, #EDE6FB, #F6F1FF, #EDE6FB, #F6F1FF);
    background-size: 300% 300%;
    animation: gradient-animation 12s ease infinite;
    color: #111;
    height: auto;
    min-height: 100vh;
    padding: 40px 20px;
    zoom: 0.8;
}

/* Logo Styling */
header {
    position: absolute;
    top: 20px;
    left: 2%;
    right: 2%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 96%;
    z-index: 1001;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.3s ease-in-out;
    background-color: white;
    padding: 6px;
}

.logo:hover {
    transform: scale(1.1);
}

.stay-touch-btn {
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    color: #fff;
    padding: 10px 20px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0px 5px 15px rgba(124, 58, 237, 0.25);
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.stay-touch-btn:hover {
    background: linear-gradient(135deg, #5B21B6, #7C3AED);
    transform: scale(1.05);
}

.container {
    max-width: 800px;
    padding: 20px;
}

/* Headings and Paragraphs */
body.webapp h2.highlight {
    color: #5B21B6;
    font-weight: 700;
    font-size: 2.2em;
    margin-bottom: 10px;
    text-shadow: 0px 1px 2px rgba(0,0,0,0.1);
}

body.webapp .subtext {
    color: #6B7280;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 25px;
    text-shadow: 0px 1px 1px rgba(0,0,0,0.05);
    animation: slideFade 1.2s ease-out forwards;
}

@keyframes slideFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Styling */
.cta-button,
.custom-upload-button {
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    color: #FFFFFF;
    padding: 14px 28px;
    font-size: 1.1em;
    border: none;
    cursor: pointer;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-family: "Poppins", sans-serif;
    box-shadow: 0px 5px 15px rgba(124, 58, 237, 0.25);
}

.cta-button:hover,
.custom-upload-button:hover {
    background: linear-gradient(135deg, #5B21B6, #7C3AED);
    transform: scale(1.05);
    box-shadow: 0px 6px 18px rgba(91, 33, 182, 0.3);
}

form#upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

#imageInput {
    display: none;
}

/* Results Styling */
#results {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: #F3EDFF;
    font-family: 'Fira Code', monospace;
    color: #1F2937;
    padding: 30px;
    border-radius: 20px;
    margin-top: 50px;
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.05);
    line-height: 1.7;
    max-width: 850px;
    gap: 40px;
    opacity: 0;
    animation: fadeInResults 0.8s ease-in-out forwards;
    align-items: flex-start;
}

@keyframes fadeInResults {
    to {
        opacity: 1;
    }
}

#results .result-text {
    flex: 1;
    text-align: left;
}

#results .result-image {
    max-width: 280px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    transition: transform 0.3s ease-in-out;
    object-fit: cover;
}

#results .result-image:hover {
    transform: scale(1.03);
}

.result-list li {
    opacity: 0;
    animation: reveal 0.5s ease forwards;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loader */
#loader {
    display: none;
    font-size: 1.4em;
    margin-top: 25px;
    color: #6D28D9;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* CTA Arrow */
.cta-arrow {
    margin-top: 30px;
    display: inline-block;
    color: white;
    background-color: #8846f5;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    animation: fadeInUp 1s ease forwards, pulseArrow 1.5s infinite;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0px 5px 15px rgba(136, 70, 245, 0.2);
    border: 2px dashed #8846f5;
}

.cta-arrow:hover {
    background-color: #773de8;
    transform: translateY(-2px);
}

@keyframes pulseArrow {
    0% { box-shadow: 0 0 0 0 rgba(136, 70, 245, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(136, 70, 245, 0); }
    100% { box-shadow: 0 0 0 0 rgba(136, 70, 245, 0); }
}

.cta-arrow i {
    margin-right: 8px;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info icon */
.info-icon {
    position: fixed;
    bottom: 25px;
    right: 2%;
    width: 54px;
    height: 54px;
    background-color: white;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1000;
}

.info-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.info-icon .tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #6D28D9;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 65px;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.info-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
