/* Awesome and Fantastic Modern UI Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #05aea9 50%, #9e9e0b 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.5rem;
}

.hero { 
    padding: 4rem 1rem; 
    text-align: center; 
    position: relative;
}

.hero h1 {
    background: linear-gradient(45deg, #ffffff, #f8f9ff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5)); }
    to { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8)); }
}

.hero .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.card { 
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
    background-size: 300% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2), 0 12px 35px rgba(0, 0, 0, 0.15);
}

.btn-primary { 
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none; 
    padding: 0.8rem 2.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
    background: linear-gradient(45deg, #764ba2, #667eea);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-radius: 12px;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.footer { 
    font-size: .9rem; 
    color: rgba(255, 255, 255, 0.8); 
    padding: 2rem 0; 
    text-align: center; 
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-top: 2rem;
}

.footer code {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.textarea-lg { 
    min-height: 900px; /* Even more increased height for awesome experience */
    font-size: 1.1rem; 
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1.5rem;
    line-height: 1.6;
    resize: vertical;
}

.textarea-lg:focus {
    border-color: rgba(102, 126, 234, 0.6);
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.01);
}

.form-label { 
    font-weight: 700; 
    color: rgba(255, 255, 255, 0.9); 
    margin-bottom: 0.8rem; 
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
textarea.form-control{
    min-height: 400px;
}

.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 0.8rem 1rem;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: rgba(102, 126, 234, 0.6);
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.sample-questions { 
    font-size: 1rem; 
    color: rgba(255, 255, 255, 0.8); 
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.spinner-overlay { 
    display:none; 
    position:fixed; 
    inset:0; 
    background:rgba(0, 0, 0, 0.8); 
    align-items:center; 
    justify-content:center; 
    z-index:2000; 
    backdrop-filter: blur(10px);
}

.spinner-overlay.show { 
    display:flex; 
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.spinner-border {
    width: 5rem !important;
    height: 5rem !important;
    border-width: 0.5rem !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    border-right-color: #667eea !important;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Floating animation for cards */
.card {
    animation: floatIn 0.8s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced navbar buttons */
.navbar .btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar .btn-outline-secondary {
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.navbar .btn-outline-secondary:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.navbar .btn-outline-danger {
    border-color: rgba(245, 87, 108, 0.3);
    color: #f5576c;
    background: rgba(245, 87, 108, 0.1);
}

.navbar .btn-outline-danger:hover {
    background: #f5576c;
    border-color: #f5576c;
    color: white;
    transform: translateY(-2px);
}