/* Global Styles */
:root {
    --bg-gradient-start: #fdfbfb;
    --bg-gradient-end: #ebedee;
    --text-color: #333333;
    --gray-color: #666666;
    --primary-color: #6366f1;
    /* Indigo-500 */
    --secondary-color: #8b5cf6;
    /* Violet-500 */
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.5;
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Logo Area */
.logo-area {
    margin-bottom: 2.5rem;
    text-align: center;
}

.logo-area h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    /* Standard property for compatibility */
    color: transparent;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.ai-badge {
    font-size: 0.8rem;
    background-color: #e0e7ff;
    color: #4338ca;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    vertical-align: super;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

/* Search Bar */
.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.search-bar:hover,
.search-bar:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.9);
}

.search-icon {
    color: #9ca3af;
    margin-right: 16px;
}

#query-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-color);
    background: transparent;
}

#query-input::placeholder {
    color: #9ca3af;
}

#search-btn {
    background: #4f46e5;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

#search-btn:hover {
    background-color: #4338ca;
    transform: scale(1.05);
}

/* Suggestions Chips */
.suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 3rem;
}

.chip {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    padding: 8px 18px;
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.chip:hover {
    background: white;
    color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: #c7d2fe;
}

/* Response Area */
.response-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 700px;
    margin-bottom: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden {
    display: none !important;
}

.response-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ai-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    color: white;
    box-shadow: 0 2px 5px rgba(236, 72, 153, 0.3);
}

.response-title {
    font-weight: 700;
    font-size: 1.1rem;
    flex: 1;
    color: #1f2937;
}

#loading-indicator {
    font-size: 0.9rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

#loading-indicator::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.response-text {
    line-height: 1.7;
    color: #374151;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

/* About Card */
.about-card {
    text-align: center;
    margin-top: 3rem;
    color: #6b7280;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.profile-pic-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.profile-pic-placeholder span {
    font-size: 40px;
}

/* Footer */
.footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
    background-color: transparent;
}

.footer a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #111827;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .logo-area h1 {
        font-size: 2.2rem;
    }

    .main-container {
        padding: 1.5rem;
    }
}