:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bg: #0c1222;
    --bg-card: #131b2e;
    --bg-card-hover: #1a2540;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --border: #1e293b;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --accent-glow: rgba(6, 182, 212, 0.12);
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 14px;
    --radius-sm: 10px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    background-image: radial-gradient(ellipse at 50% 0%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
}

.app { max-width: 560px; margin: 0 auto; padding: 0 20px 80px; }

/* Header */
.header { text-align: center; padding: 40px 0 20px; }
.header-badge { font-size: 36px; margin-bottom: 8px; }
.header h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tagline { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Search */
.search-section { padding: 8px 0 20px; }
.search-form { display: flex; flex-direction: column; gap: 10px; }

.input-group {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 42px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition);
}

.input-group input::placeholder { color: var(--text-muted); }
.input-group input:focus { border-color: var(--accent); }

.api-details {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.api-details summary {
    padding: 10px 14px;
    background: var(--bg-card);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    list-style: none;
}
.api-details summary::-webkit-details-marker { display: none; }

.api-details input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: none;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-family: var(--font);
    outline: none;
}

.btn-scan {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border: none;
    border-radius: var(--radius);
    color: white;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-scan:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.3);
}
.btn-scan:active { transform: scale(0.98); }
.btn-scan:disabled { opacity: 0.6; cursor: wait; }

/* Results */
.results-section { display: flex; flex-direction: column; gap: 14px; }

/* Score Card */
.score-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    animation: fadeUp 0.5s ease-out;
}

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

.score-ring-wrap { position: relative; width: 100px; height: 100px; flex-shrink: 0; }

.score-ring { width: 100px; height: 100px; transform: rotate(-90deg); }
.score-bg { fill: none; stroke: var(--border); stroke-width: 8; }
.score-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.score-out { font-size: 11px; color: var(--text-muted); display: block; }

.score-label { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.score-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* Signals */
.signals-card, .mentions-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    animation: fadeUp 0.5s ease-out;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.signals-list { display: flex; flex-direction: column; gap: 8px; }

.signal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 8px;
}

.signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.signal-dot.positive { background: var(--success); }
.signal-dot.negative { background: var(--danger); }
.signal-dot.neutral { background: var(--warning); }

.signal-text { font-size: 13px; flex: 1; }
.signal-weight { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* Mentions */
.mentions-list { display: flex; flex-direction: column; gap: 8px; }

.mention-item {
    display: block;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition);
}

.mention-item:hover { background: var(--bg-card-hover); }

.mention-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--accent-light);
}

.mention-snippet { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.privacy-note {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 8px 0;
}
