:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f59e0b;
    --ticker-bg: #020617;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    /* padding-bottom removido pois agora temos footer */
}

/* Ticker */
.ticker-wrap {
    width: 100%;
    background-color: var(--ticker-bg);
    overflow: hidden;
    height: 40px;
    white-space: nowrap;
    border-bottom: 1px solid #334155;
}
.ticker { display: inline-block; line-height: 40px; animation: ticker 40s linear infinite; }
.ticker-item { display: inline-block; padding: 0 1.5rem; font-size: 0.85rem; color: var(--text-secondary); }
.ticker-up { color: var(--green); }
.ticker-down { color: var(--red); }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-50%, 0, 0); } }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; min-height: 80vh; }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.logo-area h1 { margin: 0; font-size: 1.8rem; }
.logo-area h1 span { color: var(--accent); }
.status-indicator { color: var(--green); font-size: 0.8rem; letter-spacing: 1px; margin-top: 5px;}

/* Sentimento */
.sentiment-card { background: rgba(255,255,255,0.05); padding: 10px 20px; border-radius: 50px; display: flex; flex-direction: column; justify-content: center; min-width: 200px; }
.sentiment-info { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.9rem; }
.sentiment-value { font-weight: bold; color: var(--accent); }
.sentiment-bar-bg { width: 100%; height: 6px; background: #334155; border-radius: 10px; overflow: hidden; }
.sentiment-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 1s ease-out; }

/* Cards */
.card { background-color: var(--card-bg); border-radius: 16px; padding: 20px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4); margin-bottom: 20px; }

/* Chart Header */
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.chart-selector-wrapper { display: flex; flex-direction: column; }
.chart-selector-wrapper label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 4px; }

.chart-dropdown {
    background-color: rgba(255, 255, 255, 0.05); color: var(--text-primary); border: 1px solid #334155;
    padding: 8px 30px 8px 12px; font-size: 1.2rem; font-weight: 600; border-radius: 8px; cursor: pointer; outline: none; min-width: 220px;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%233b82f6%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2082.2c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right .7em top 50%; background-size: .65em auto; transition: 0.2s;
}
.chart-dropdown:hover { border-color: var(--accent); background-color: rgba(255,255,255,0.1); }
.chart-dropdown option { background-color: var(--card-bg); color: white; }

.price-container { text-align: right; }
.price-highlight { color: var(--text-primary); margin: 0; font-size: 1.8rem; }
.sub-price { display: block; color: var(--text-secondary); font-size: 1rem; }
.chart-wrapper { position: relative; height: 350px; width: 100%; }

/* Grid */
.bottom-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }

/* Forms */
.form-group { margin-bottom: 15px; }
.input-row { display: flex; gap: 10px; }
.input-row .form-group { flex: 1; }
label { display: block; color: var(--text-secondary); margin-bottom: 8px; font-size: 0.85rem; }
input, select { width: 100%; padding: 12px; background: #0f172a; border: 1px solid #334155; color: white; border-radius: 8px; outline: none; box-sizing: border-box; }
input:focus, select:focus { border-color: var(--accent); }

.action-buttons { display: flex; gap: 10px; margin-top: 10px;}
button { flex: 2; padding: 12px; background-color: var(--accent); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.2s; }
button:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { flex: 1; background: transparent; border: 1px solid #334155; color: var(--text-secondary); }

.result-box { margin-top: 20px; padding: 15px; background: rgba(0,0,0,0.2); border-radius: 8px; display: none; }
.result-box.visible { display: block; }
.result-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; }
.highlight-val { font-weight: bold; color: var(--green); }

/* List */
.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#search-input { width: 60%; padding: 8px; font-size: 0.9rem; }
#top-coins-list { list-style: none; padding: 0; margin: 0; max-height: 400px; overflow-y: auto; }
.coin-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #334155; transition: 0.2s; cursor: pointer; }
.coin-item:hover { background: rgba(255,255,255,0.02); padding-left: 5px; padding-right: 5px; }
.coin-name { font-weight: 600; font-size: 0.95rem; }
.coin-prices { text-align: right; }
.price-brl { display: block; font-weight: 500; font-size: 0.95rem; }
.price-usd { font-size: 0.75em; color: var(--text-secondary); }
.positive { color: var(--green); }
.negative { color: var(--red); }

::-webkit-scrollbar { width: 6px; height: 6px;}
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

/* --- FOOTER --- */
.app-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    border-top: 1px solid #1e293b;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: linear-gradient(to bottom, var(--bg-color), #020617);
}
.dev-name { color: var(--accent); font-weight: bold; cursor: pointer; transition: 0.3s; }
.dev-name:hover { color: var(--green); text-shadow: 0 0 10px rgba(16, 185, 129, 0.3); }
.social-links { margin-top: 10px; font-size: 0.85rem; }
.social-links a { color: var(--text-secondary); text-decoration: none; margin: 0 5px; transition: 0.2s; }
.social-links a:hover { color: white; text-decoration: underline; }
.social-links span { opacity: 0.3; }

/* Responsividade */
@media (max-width: 768px) {
    header { flex-direction: column; text-align: center; }
    .bottom-grid { grid-template-columns: 1fr; }
    .card-header { flex-direction: column; gap: 15px; }
    .chart-selector-wrapper, .chart-dropdown { width: 100%; }
    .price-container { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; }
    .chart-wrapper { height: 250px; }
}