/* ===== SentimentLens — Light Theme Design System ===== */ :root { /* Colors */ --color-bg: #F8F9FC; --color-surface: #FFFFFF; --color-surface-hover: #F1F3F9; --color-border: #E2E6EF; --color-border-focus: #7C6BF0; --color-text-primary: #1A1D2E; --color-text-secondary: #6B7394; --color-text-muted: #9BA3C2; /* Accent */ --color-accent: #7C6BF0; --color-accent-light: #EDE9FE; --color-accent-gradient: linear-gradient(135deg, #7C6BF0 0%, #A78BFA 50%, #C4B5FD 100%); --color-accent-glow: rgba(124, 107, 240, 0.15); /* Semantic */ --color-positive: #10B981; --color-positive-bg: #ECFDF5; --color-positive-border: #A7F3D0; --color-negative: #F43F5E; --color-negative-bg: #FFF1F2; --color-negative-border: #FECDD3; /* Model tags */ --color-tfidf: #F59E0B; --color-tfidf-bg: #FFFBEB; --color-tfidf-border: #FDE68A; --color-bert: #6366F1; --color-bert-bg: #EEF2FF; --color-bert-border: #C7D2FE; /* Spacing & Radius */ --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-full: 9999px; /* Shadows */ --shadow-sm: 0 1px 3px rgba(26, 29, 46, 0.04), 0 1px 2px rgba(26, 29, 46, 0.02); --shadow-md: 0 4px 12px rgba(26, 29, 46, 0.06), 0 2px 4px rgba(26, 29, 46, 0.03); --shadow-lg: 0 12px 32px rgba(26, 29, 46, 0.08), 0 4px 8px rgba(26, 29, 46, 0.04); --shadow-glow: 0 0 0 4px var(--color-accent-glow); /* Transitions */ --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1); --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1); --transition-smooth: 400ms cubic-bezier(0.4, 0, 0.2, 1); } /* ===== Reset & Base ===== */ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--color-bg); color: var(--color-text-primary); line-height: 1.6; min-height: 100vh; } /* ===== App Layout ===== */ .app { min-height: 100vh; display: flex; flex-direction: column; } /* ===== Header ===== */ .header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); padding: 0 2rem; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); background: rgba(255, 255, 255, 0.85); } .header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; } .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; } .logo-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--color-accent-gradient); display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; box-shadow: var(--shadow-sm); } .logo-text { font-size: 1.25rem; font-weight: 700; color: var(--color-text-primary); letter-spacing: -0.02em; } .logo-text span { color: var(--color-accent); } .header-badge { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--color-accent-light); color: var(--color-accent); border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; } .header-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); animation: pulse-dot 2s ease-in-out infinite; } @keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } } /* ===== Hero ===== */ .hero { text-align: center; padding: 4rem 2rem 2rem; position: relative; overflow: hidden; } .hero::before { content: ''; position: absolute; top: -60%; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, var(--color-accent-glow) 0%, transparent 70%); pointer-events: none; } .hero h1 { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--color-text-primary); margin-bottom: 0.75rem; position: relative; } .hero h1 .gradient-text { background: var(--color-accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .hero p { font-size: 1.1rem; color: var(--color-text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.7; } /* ===== Main Content ===== */ .main { max-width: 900px; margin: 0 auto; padding: 2rem; width: 100%; flex: 1; } /* ===== Input Card ===== */ .input-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-md); margin-bottom: 2rem; transition: box-shadow var(--transition-normal); } .input-card:focus-within { box-shadow: var(--shadow-lg), var(--shadow-glow); border-color: var(--color-border-focus); } .input-card label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; } .textarea-wrapper { position: relative; } .input-card textarea { width: 100%; min-height: 140px; padding: 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); color: var(--color-text-primary); font-family: inherit; font-size: 0.95rem; line-height: 1.7; resize: vertical; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); outline: none; } .input-card textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-glow); } .input-card textarea::placeholder { color: var(--color-text-muted); } .char-count { position: absolute; bottom: 12px; right: 14px; font-size: 0.72rem; color: var(--color-text-muted); font-weight: 500; pointer-events: none; } .input-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; gap: 1rem; } .sample-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; } .sample-btn { padding: 6px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-secondary); font-size: 0.78rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); font-family: inherit; } .sample-btn:hover { background: var(--color-surface-hover); border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-1px); } .analyze-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 28px; background: var(--color-accent-gradient); color: white; border: none; border-radius: var(--radius-full); font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all var(--transition-normal); box-shadow: var(--shadow-sm); font-family: inherit; white-space: nowrap; } .analyze-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-md), 0 4px 20px rgba(124, 107, 240, 0.3); } .analyze-btn:active:not(:disabled) { transform: translateY(0); } .analyze-btn:disabled { opacity: 0.55; cursor: not-allowed; } .analyze-btn .btn-icon { font-size: 1.1rem; transition: transform var(--transition-normal); } .analyze-btn:hover:not(:disabled) .btn-icon { transform: translateX(2px); } /* Loading spinner */ .spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* ===== Results ===== */ .results-section { animation: fadeInUp 0.5s ease-out; } @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .results-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; } .results-header h2 { font-size: 1.15rem; font-weight: 700; color: var(--color-text-primary); } .results-header .icon { font-size: 1.3rem; } /* ===== Comparison Grid ===== */ .comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.5rem; } .model-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); transition: all var(--transition-normal); position: relative; overflow: hidden; } .model-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; } .model-card.tfidf::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); } .model-card.bert::before { background: linear-gradient(90deg, #6366F1, #818CF8); } .model-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); } .model-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; } .model-tag.tfidf { background: var(--color-tfidf-bg); color: var(--color-tfidf); border: 1px solid var(--color-tfidf-border); } .model-tag.bert { background: var(--color-bert-bg); color: var(--color-bert); border: 1px solid var(--color-bert-border); } .sentiment-result { text-align: center; padding: 0.75rem 0; } .sentiment-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; display: block; animation: bounceIn 0.5s ease-out; } @keyframes bounceIn { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } } .sentiment-label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; } .sentiment-label.positive { background: var(--color-positive-bg); color: var(--color-positive); border: 1px solid var(--color-positive-border); } .sentiment-label.negative { background: var(--color-negative-bg); color: var(--color-negative); border: 1px solid var(--color-negative-border); } /* Confidence meter */ .confidence-section { margin-top: 1.25rem; } .confidence-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .confidence-label { font-size: 0.75rem; font-weight: 500; color: var(--color-text-secondary); } .confidence-value { font-size: 0.85rem; font-weight: 700; color: var(--color-text-primary); } .confidence-bar { width: 100%; height: 8px; background: var(--color-bg); border-radius: var(--radius-full); overflow: hidden; } .confidence-fill { height: 100%; border-radius: var(--radius-full); transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); position: relative; } .confidence-fill.positive { background: linear-gradient(90deg, #34D399, #10B981); } .confidence-fill.negative { background: linear-gradient(90deg, #FB7185, #F43F5E); } .latency { display: flex; align-items: center; gap: 5px; margin-top: 0.75rem; font-size: 0.72rem; color: var(--color-text-muted); font-weight: 500; } .latency .icon { font-size: 0.85rem; } /* ===== Agreement Banner ===== */ .agreement-banner { padding: 1rem 1.5rem; border-radius: var(--radius-md); display: flex; align-items: center; gap: 10px; font-size: 0.88rem; font-weight: 600; margin-bottom: 1.5rem; animation: fadeInUp 0.5s ease-out 0.2s both; } .agreement-banner.agree { background: var(--color-positive-bg); color: var(--color-positive); border: 1px solid var(--color-positive-border); } .agreement-banner.disagree { background: var(--color-negative-bg); color: var(--color-negative); border: 1px solid var(--color-negative-border); } .agreement-banner .icon { font-size: 1.2rem; } /* ===== Text Preview ===== */ .text-preview { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.25rem; animation: fadeInUp 0.5s ease-out 0.3s both; } .text-preview-header { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; } .text-preview p { font-size: 0.88rem; color: var(--color-text-secondary); line-height: 1.7; font-style: italic; } /* ===== Error State ===== */ .error-banner { background: var(--color-negative-bg); border: 1px solid var(--color-negative-border); border-radius: var(--radius-md); padding: 1rem 1.5rem; display: flex; align-items: center; gap: 10px; color: var(--color-negative); font-size: 0.88rem; font-weight: 500; margin-bottom: 1.5rem; animation: fadeInUp 0.3s ease-out; } .error-banner .icon { font-size: 1.2rem; } /* ===== Footer ===== */ .footer { text-align: center; padding: 2rem; border-top: 1px solid var(--color-border); margin-top: auto; } .footer p { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 500; } .footer a { color: var(--color-accent); text-decoration: none; font-weight: 600; } .footer a:hover { text-decoration: underline; } /* ===== Responsive ===== */ @media (max-width: 700px) { .hero h1 { font-size: 2rem; } .hero p { font-size: 0.95rem; } .comparison-grid { grid-template-columns: 1fr; } .input-actions { flex-direction: column; align-items: stretch; } .sample-btns { justify-content: center; } .analyze-btn { justify-content: center; } .header-inner { padding: 0 0.5rem; } } @media (max-width: 480px) { .hero h1 { font-size: 1.65rem; } .main { padding: 1rem; } .input-card { padding: 1.25rem; } }