/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for easy theme management */
:root {
  --primary-color-dark: #6a11cb;  /* Deep Violet */
  --primary-color-light: #2575fc; /* Bright Blue */
  --secondary-color: #fcb045; /* Warm Orange */
  --accent-color: #ff5f6d;   /* Coral Pink */
  --card-bg: #ffffff;
  --text-color: #212529; /* Darker Text */
  --text-muted-color: #6c757d;
  --success-color: #198754; /* Bootstrap success */
  --success-hover-color: #157347;
  --light-bg: #f8f9fa;
  --gradient-start: var(--primary-color-dark);
  --gradient-end: var(--primary-color-light);
  --box-shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
  --box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1);
  --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .12);
}

/* Base Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeInBody 0.8s ease-out forwards;
}

@keyframes fadeInBody {
    to { opacity: 1; }
}

/* --- Navbar for Logo --- */
.navbar {
    background-color: #fff !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Center logo within container - requires navbar-expand on nav */
.navbar .container {
    /* display: flex;
    justify-content: center; */ /* Or keep default if using toggler later */
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* Make navbar sticky */
.navbar.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020; /* Bootstrap's standard sticky z-index */
}


/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    box-shadow: var(--box-shadow-lg);
    padding-top: 3rem;
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    margin-bottom: 2rem;
}

.hero-section .title-ai {
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-section .ai-icon {
    vertical-align: baseline;
    margin-left: 10px;
    font-size: 0.9em;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
    text-shadow: none;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(-5deg); }
}


.hero-section .subtitle {
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

/* --- Search Bar --- */
.search-wrapper {
    position: relative;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.4rem;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}
.search-wrapper:focus-within {
    background-color: rgba(255, 255, 255, 0.3);
}


.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    z-index: 1;
}

.search-input {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding-left: 3rem !important;
    padding-right: calc(110px + 0.8rem) !important; /* Adjust right padding for button */
    border-radius: 50px !important;
    font-size: 1rem !important;
    height: 52px;
    line-height: 1.5;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

.search-input:focus {
    box-shadow: none !important;
    color: #fff !important;
}

.search-button {
    position: absolute;
    right: 0.4rem;
    top: 0.4rem;
    bottom: 0.4rem;
    transform: none;
    border-radius: 50px !important;
    padding: 0 1.5rem !important; /* Adjusted padding slightly */
    background: #fff !important;
    border-color: #fff !important;
    color: var(--primary-color-dark) !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    height: auto;
    min-width: 110px; /* Adjusted min-width */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    font-size: 0.95rem; /* Button text size */
}

.search-button:hover {
    background-color: #f0f0f0 !important;
    border-color: #f0f0f0 !important;
    color: var(--gradient-end) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: scale(1.03);
}
.search-button i {
    margin-right: 0.4rem; /* Space between icon and text */
    display: inline-block !important;
    font-size: 0.9em;
}

.hero-section .instruction-text {
    font-size: 0.9rem; /* Increased size slightly */
    opacity: 0.9; /* Increased opacity */
    margin-top: 1rem;
    /* Add a very subtle background/shadow for contrast */
    /* Option 1: Text Shadow */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);

    /* Option 2: Subtle transparent background (uncomment if preferred) */
    /* background-color: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block; */
}

/* --- Blobs --- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    z-index: -1;
}
.blob1 {
    width: 500px;
    height: 500px;
    background: var(--secondary-color);
    top: -150px;
    left: -200px;
    animation: moveBlob1 25s infinite alternate ease-in-out;
}
.blob2 {
    width: 450px;
    height: 450px;
    background: var(--accent-color);
    bottom: -200px;
    right: -150px;
    animation: moveBlob2 30s infinite alternate ease-in-out;
}

@keyframes moveBlob1 {
  from { transform: translate(-30px, -40px) scale(1) rotate(0deg); }
  to { transform: translate(40px, 30px) scale(1.15) rotate(30deg); }
}
@keyframes moveBlob2 {
  from { transform: translate(30px, 40px) scale(1.1) rotate(10deg); }
  to { transform: translate(-40px, -30px) scale(1) rotate(-20deg); }
}


/* --- Main Content & Cards --- */
.content-area {
    position: relative;
    z-index: 1;
}

/* Card Styling Refined */
.result-card-column {
    /* Base styles for animation - applied via JS */
    opacity: 0;
    transform: translateY(20px);
}
.result-card-column.visible {
    animation: cardEnter 0.6s ease-out forwards;
}

/* Staggered animation delays applied by JS */
.result-card-column.anim-delay-1 { animation-delay: 0.05s; }
.result-card-column.anim-delay-2 { animation-delay: 0.1s; }
.result-card-column.anim-delay-3 { animation-delay: 0.15s; }
.result-card-column.anim-delay-4 { animation-delay: 0.2s; }
.result-card-column.anim-delay-5 { animation-delay: 0.25s; }
.result-card-column.anim-delay-6 { animation-delay: 0.3s; }
.result-card-column.anim-delay-7 { animation-delay: 0.35s; }
.result-card-column.anim-delay-8 { animation-delay: 0.4s; }
.result-card-column.anim-delay-9 { animation-delay: 0.45s; }
.result-card-column.anim-delay-10 { animation-delay: 0.5s; }
.result-card-column.anim-delay-11 { animation-delay: 0.55s; }
.result-card-column.anim-delay-12 { animation-delay: 0.6s; }


@keyframes cardEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    border: 0;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    width: 100%; /* Ensure card fills column */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--gradient-start);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.card-text {
    color: var(--text-muted-color);
    flex-grow: 1;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    line-height: 1.65;
}

.card .btn-success {
    background: linear-gradient(to right, var(--primary-color-light) , var(--gradient-end));
    border: none;
    color: #fff;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-top: auto;
    width: fit-content;
    align-self: flex-start;
    font-size: 0.85rem;
    box-shadow: var(--box-shadow-sm);
}

.card .btn-success:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow);
}

.card .btn-success i {
    margin-left: 6px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}
.card .btn-success:hover i {
    transform: translateX(3px);
}

/* Loading Spinner */
.loading-container {
    padding: 3rem 0;
    opacity: 0;
    animation: fadeQuick 0.3s ease-out forwards;
}
@keyframes fadeQuick { to { opacity: 1; } }

#loading .spinner-border {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--primary-color-light);
    border-width: .3em;
}
#loading p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* No Results Message */
#no-results {
     opacity: 0;
     animation: fadeQuick 0.5s ease-out forwards;
}
#no-results h2 {
    font-weight: 600;
    color: var(--primary-color-dark);
}

#no-results .no-results-icon {
     color: var(--primary-color-light);
     animation: sadWiggle 1.8s ease-in-out infinite;
}

@keyframes sadWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-10deg) scale(1.1); }
  75% { transform: rotate(10deg) scale(1.1); }
}


/* Footer */
.footer-section {
    background-color: #e9ecef;
    border-top: 1px solid #dee2e6;
    padding: 1.25rem 0;
    font-size: 0.85rem;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .hero-section {
        padding-top: 2rem;
        padding-bottom: 3rem;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
    }
    .hero-section h1 {
        font-size: 2.1rem;
    }
     .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .search-input {
        height: 48px;
        padding-right: calc(90px + 0.8rem) !important;
    }
    .search-button {
         padding: 0 1.5rem !important;
         min-width: 90px;
    }

    .blob1 { width: 200px; height: 200px; left: -80px; top: -80px}
    .blob2 { width: 180px; height: 180px; right: -60px; bottom: -100px; }

     .card-body {
        padding: 1.25rem;
     }
     .card-title {
        font-size: 1.05rem;
     }
     .card-text {
        font-size: 0.85rem;
     }
}