/* static/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-main: #1e293b;
    --text-muted: #64748b;
    
    --pos-color: #10b981;
    --pos-bg: #ecfdf5;
    --neg-color: #ef4444;
    --neg-bg: #fef2f2;
    --neu-color: #f59e0b;
    --neu-bg: #fffbeb;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.lead {
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 400;
}

/* Search Form */
.search-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.input-group {
    display: flex;
    gap: 0.75rem;
}

input[type="text"] {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

button[type="submit"] {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Results Content */
.results-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.overall-card {
    background: white;
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
    margin-bottom: 3rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.overall-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.sentiment-display {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sentiment Styles */
.pos { color: var(--pos-color); background: var(--pos-bg); }
.neg { color: var(--neg-color); background: var(--neg-bg); }
.neu { color: var(--neu-color); background: var(--neu-bg); }

/* News Cards Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.75rem;
    border: 1px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.news-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.news-snippet {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.sentiment-tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
}

.btn-read {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s ease;
}

.btn-read:hover {
    gap: 0.5rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .sentiment-display {
        font-size: 2.2rem;
    }
}

footer {
    text-align: center;
    padding: 4rem 0 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
