:root {
    --bg-dark: #0a0a0c;
    --bg-card: rgba(20, 20, 25, 0.7);
    --text-primary: #f0f0f5;
    --text-secondary: #9fa0b1;
    --accent: #5e6ad2;
    --accent-glow: rgba(94, 106, 210, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Background Glow */
.glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
    animation: float 10s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, 30px); }
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 40px 24px;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 120px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 15px var(--accent-glow);
}

h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-indicator {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.greeting {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-weight: 300;
}

.search-box {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 8px 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 10px 40px rgba(0,0,0,0.5);
}

input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 16px;
    color: white;
    font-size: 16px;
}

input::placeholder {
    color: rgba(255,255,255,0.3);
}

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

.submit-btn:hover {
    background: #4f5bc2;
    transform: scale(1.05);
}

.submit-btn:active {
    transform: scale(0.95);
}

.category-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.pill input[type="radio"] {
    display: none;
}

.pill.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.toast {
    position: fixed;
    bottom: 40px;
    background: #10b981;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

.recent-searches {
    width: 100%;
    max-width: 700px;
    margin-top: 40px;
    text-align: left;
}

.recent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.history-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.history-term {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.history-status {
    color: #10b981;
}
