:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --danger-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    overflow-x: hidden;
    position: relative;
}

/* Subtle background mesh gradient */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

header {
    text-align: center;
}

h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Search Wrapper & Input */
.search-wrapper {
    position: relative;
    width: 100%;
}

.input-container {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px 8px 8px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.input-container:focus-within {
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}

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

input::placeholder {
    color: var(--text-secondary);
}

button {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

button:hover {
    background: var(--accent-hover);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    background: var(--glass-border);
    cursor: not-allowed;
}

/* Omni-search dropdown */
#suggestions-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    list-style: none;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s, transform 0.2s;
}

#suggestions-dropdown.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#suggestions-dropdown li {
    padding: 16px 24px;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.2s;
}

#suggestions-dropdown li:last-child {
    border-bottom: none;
}

#suggestions-dropdown li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Response Area */
#response-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: 150px;
    line-height: 1.6;
    font-size: 1.05rem;
    color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.4s ease-out;
}

#response-box.hidden {
    display: none;
}

.error-text {
    color: var(--danger-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing Indicator */
#typing-indicator {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

#typing-indicator.hidden {
    display: none;
}

#typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

#typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
#typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

footer {
    text-align: center;
    margin-top: auto;
    padding-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}
