/*
Theme Name:   Crypto Dashboard
Theme URI:    https://seusite.com/crypto-dashboard
Author:       Seu Nome
Author URI:   https://seusite.com
Description:  Um dashboard para visualização de dados de criptomoedas.
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  cryptodashboard
*/

/* ========== INÍCIO DO SEU CÓDIGO CSS ========== */

:root {
    --bg-color: #12121e; --surface-color: #1e1e2f; --header-color: #2a2a40;
    --primary-text-color: #e0e0e0; --secondary-text-color: #a0a0b0; --accent-color: #8a2be2;
    --positive-color: #00ff9b; --negative-color: #ff4d4d; --border-color: #3a3a5a;
    --shadow-color: rgba(0, 0, 0, 0.2); --skeleton-base: #2a2a40; --skeleton-shine: #3a3a5a;
}
body.light {
    --bg-color: #f4f7fa; --surface-color: #ffffff; --header-color: #f8f9fa;
    --primary-text-color: #1c1c1e; --secondary-text-color: #6c757d; --accent-color: #6a11cb;
    --positive-color: #198754; --negative-color: #dc3545; --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1); --skeleton-base: #e0e0e0; --skeleton-shine: #f0f0f0;
}
body.synthwave {
    --bg-color: #241B2F; --surface-color: #342744; --header-color: #433355;
    --primary-text-color: #F8F8F2; --secondary-text-color: #9E9E9E; --accent-color: #FF79C6;
    --positive-color: #50FA7B; --negative-color: #FF5555; --border-color: #44475A;
}
body.dracula {
    --bg-color: #282a36; --surface-color: #44475a; --header-color: #282a36;
    --primary-text-color: #f8f8f2; --secondary-text-color: #bd93f9; --accent-color: #ff79c6;
    --positive-color: #50fa7b; --negative-color: #ff5555; --border-color: #6272a4;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg-color); color: var(--primary-text-color); transition: background-color 0.3s ease, color 0.3s ease; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.container { max-width: 1600px; margin: 0 auto; padding: 1.5rem; }
.card { background-color: var(--surface-color); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 20px var(--shadow-color); transition: background-color 0.3s ease, transform 0.1s ease-in-out; }
.card:active { transform: scale(0.98); }
.section-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border-color); }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.search-wrapper { position: relative; display: flex; align-items: center; }
#search-input { padding: 0.6rem 1rem 0.6rem 2.5rem; border: 1px solid var(--border-color); border-radius: 8px; background-color: var(--header-color); color: var(--primary-text-color); font-family: 'Poppins', sans-serif; font-size: 0.9rem; }
.search-wrapper svg { position: absolute; left: 12px; color: var(--secondary-text-color); pointer-events: none; }
.control-select { padding: 0.6rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; background-color: var(--header-color); color: var(--primary-text-color); font-family: 'Poppins', sans-serif; font-size: 0.9rem; }
.control-button { background: var(--surface-color); border: 1px solid var(--border-color); color: var(--secondary-text-color); width: 40px; height: 40px; border-radius: 8px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.2s ease; font-size: 1.2rem; }
.control-button:active { transform: scale(0.9); }
.control-button:hover, .control-button.active { color: var(--accent-color); border-color: var(--accent-color); }
.control-button.gainer.active { color: var(--positive-color); border-color: var(--positive-color); }
.control-button.loser.active { color: var(--negative-color); border-color: var(--negative-color); }
.control-button:disabled { cursor: not-allowed; opacity: 0.5; }
#favorites-toggle.active { color: #ffd700; border-color: #ffd700; }
.favorite-star::before { content: '☆'; }
.favorite-star.favorited::before { content: '★'; }
.favorite-star { font-size: 1.2rem; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; user-select: none; }
.favorite-star:hover { transform: scale(1.2); }
.favorite-star.favorited { color: #ffd700; }
#global-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.main-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 1.5rem; }
.table-container { width: 100%; overflow-x: auto; position: relative; -webkit-overflow-scrolling: touch; }
.table-container::before, .table-container::after { content: ''; position: absolute; top: 0; bottom: 0; width: 25px; pointer-events: none; z-index: 2; opacity: 0; transition: opacity 0.2s ease-in-out; }
.table-container::before { left: 0; background: linear-gradient(to right, var(--surface-color), transparent); }
.table-container::after { right: 0; background: linear-gradient(to left, var(--surface-color), transparent); }
.table-container.scrolling-left::before { opacity: 1; }
.table-container.scrolling-right::after { opacity: 1; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 0.75rem 1rem; vertical-align: middle; white-space: nowrap; }
th { text-align: left; font-weight: 600; color: var(--secondary-text-color); font-size: 0.75rem; cursor: pointer; user-select: none; }
th[data-sort].sorted::after { content: " ↑"; } 
th[data-sort][data-direction="desc"]::after { content: " ↓"; }
tr[data-coin-id] { cursor: pointer; transition: background-color 0.2s ease; } 
tr[data-coin-id]:hover { background-color: var(--header-color); }
#crypto-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.placeholder { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 150px; color: var(--secondary-text-color); font-size: 0.9rem; text-align: center; }
.placeholder .spinner-icon { width: 18px; height: 18px; } .placeholder span { font-size: 0.8rem; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: none; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(5px); animation: fadeIn 0.3s; }
.modal-overlay.visible { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.mobile-nav, #scroll-top, #share-btn, #fullscreen-btn { display: none; }
#scroll-top, #share-btn, #fullscreen-btn { position: fixed; right: 15px; background-color: var(--accent-color); color: white; border: none; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 2px 6px var(--shadow-color); cursor: pointer; z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; animation: fadeIn 0.3s forwards; }
#scroll-top { bottom: 80px; }
#share-btn { bottom: 134px; }
#fullscreen-btn { bottom: 188px; }
.modal-content { background-color: var(--surface-color); border-radius: 16px; width: 90%; max-width: 800px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 10px 40px var(--shadow-color); max-height: 90vh; }
.modal-header { padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); }
.modal-coin-info { display: flex; align-items: center; gap: 1rem; } .modal-coin-info img { width: 40px; height: 40px; } .modal-coin-info h2 { font-size: 1.8rem; }
.modal-close { font-size: 2rem; color: var(--secondary-text-color); cursor: pointer; background: none; border: none; line-height: 1; }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border-color); padding: 0 1rem; }
.tab-button { padding: 1rem; font-size: 1rem; background: none; border: none; color: var(--secondary-text-color); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s ease; }
.tab-button.active { color: var(--accent-color); border-bottom-color: var(--accent-color); }
.modal-body { padding: 2rem; overflow-y: auto; } .tab-content { display: none; } .tab-content.active { display: block; animation: fadeIn 0.5s; }
.form-group { display: flex; gap: 1rem; align-items: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.form-group input, .form-group select { padding: 0.7rem; font-size: 1rem; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--header-color); color: var(--primary-text-color); transition: border-color 0.3s ease; }
.form-group button { background-color: var(--accent-color); color: white; cursor: pointer; border: none; }
.timeframe-selector { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.timeframe-button { padding: 0.5rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; background: var(--surface-color); color: var(--primary-text-color); cursor: pointer; }
.timeframe-button.active { background: var(--accent-color); color: white; }
#toast-container { position: fixed; bottom: 80px; right: 20px; z-index: 9999; list-style: none; }
.toast { padding: 1rem; border-radius: 8px; color: #fff; font-weight: 500; margin-top: 10px; opacity: 0; transform: translateY(20px); animation: toast-in 0.5s forwards; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
@keyframes toast-in { to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }
.skeleton { background-color: var(--skeleton-base); background-image: linear-gradient(90deg, var(--skeleton-base), var(--skeleton-shine), var(--skeleton-base)); background-size: 200px 100%; animation: skeleton-shine 1.5s infinite; border-radius: 4px; }
@keyframes skeleton-shine { 100% { background-position: 100% 0; } }
.skeleton-text { width: 80%; height: 1em; margin-bottom: .5rem; } .skeleton-avatar { width: 28px; height: 28px; border-radius: 50%; }
.stat-card h3 { font-size: 0.8rem; color: var(--secondary-text-color); text-transform: uppercase; } .stat-card p { font-size: 1.5rem; font-weight: 600; }
.fng-gauge { width: 100px; height: 50px; position: relative; margin: 10px auto 0; }
.fng-arc { fill: none; stroke-width: 12; }
.fng-needle { fill: var(--primary-text-color); transition: transform 0.5s ease-out; transform-origin: center; }
.ath-bar-container { width: 80px; height: 6px; background-color: var(--header-color); border-radius: 3px; overflow: hidden; }
.ath-bar { height: 100%; background-color: var(--accent-color); border-radius: 3px; }
.positive-val { color: var(--positive-color); } .negative-val { color: var(--negative-color); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinner-icon { animation: spin 1s linear infinite; }
.coin-card { padding: 1.5rem; cursor: pointer; border: 1px solid transparent; transition: all 0.3s ease; position: relative; }
.coin-card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.coin-card .favorite-star { position: absolute; top: 1rem; right: 1rem; }
#portfolio-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
#new-portfolio-btn { padding: 0.6rem 1rem; border: none; background-color: var(--accent-color); color: white; border-radius: 8px; cursor: pointer; font-family: 'Poppins', sans-serif; }
#gas-tracker, #news-list { text-align: center; }
.view-container { display: none; } .view-container.active { display: block; }
.iframe-container { position: relative; width: 100%; height: 75vh; overflow: hidden; border-radius: 8px; }
.iframe-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
#live-btc-content .section-title { border: none; margin: 0; }

@media (max-width: 768px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { order: -1; }
}
@media (max-width: 600px) {
    body { padding-bottom: 60px; }
    .container { padding: 0.8rem; }
    .header, #global-stats, .main-layout, .sidebar { gap: 1rem; }
    .header h1 { font-size: 1.5rem; width: 100%; text-align: center; margin-bottom: 0.5rem; }
    .controls { justify-content: center; width: 100%; gap: 0.5rem; }
    .control-select { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
    #search-input { padding: 0.6rem 1rem 0.6rem 2.2rem; font-size: 0.8rem; }
    .search-wrapper svg { width: 16px; height: 16px; left: 10px; }
    .control-button { width: 38px; height: 38px; }
    .card { padding: 1rem; border-radius: 10px; }
    #crypto-grid-container { grid-template-columns: 1fr; gap: 0.8rem; }
    table { min-width: 650px; }
    th, td { padding: 0.6rem 0.8rem; font-size: 0.8rem; }
    th:nth-child(n+5), td:nth-child(n+5) { display: none; }
    th:nth-child(2), td:nth-child(2), th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: table-cell; }
    .section-title { font-size: 1.1rem; }
    .stat-card p { font-size: 1.25rem; } .stat-card h3 { font-size: 0.75rem; }
    .modal-content { width: 95%; max-height: 95vh; }
    .modal-header, .modal-body { padding: 1rem; }
    .modal-coin-info h2 { font-size: 1.2rem; }
    .modal-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-button { flex: 0 0 auto; padding: 0.8rem; font-size: 0.85rem; }
    #scroll-loader { height: 60px; }
    #scroll-loader .spinner-icon { width: 24px; height: 24px; }
    #scroll-loader span { font-size: 0.8rem; }
    .mobile-nav { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--header-color); display: flex; justify-content: space-around; padding: 0.5rem 0; box-shadow: 0 -2px 10px var(--shadow-color); z-index: 2000; }
    .mobile-nav button { background: none; border: none; color: var(--secondary-text-color); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.7rem; padding: 4px; border-radius: 4px; flex-grow: 1; }
    .mobile-nav button.active { color: var(--accent-color); }
    #scroll-top.visible-mobile, #share-btn.visible-mobile, #fullscreen-btn.visible-mobile { display: flex; }
    #portfolio-controls { flex-direction: column; align-items: stretch; gap: 0.5rem;}
    #news-section #news-list-content a { white-space: normal; }
    #gas-tracker > div { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    #gas-tracker > div > div { display: flex; flex-direction: column; align-items: center; }
}