* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    color: #ffffff;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 14px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 22px;
}

.logo-text {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #F7931A, #627EEA, #00FFA3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.live-badge {
    font-size: 10px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 3px 10px;
    border-radius: 20px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.update-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== TOP CARDS ===== */
.top-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.crypto-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.crypto-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.crypto-card.active {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coin-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.bitcoin-icon {
    background: linear-gradient(135deg, #F7931A, #ffd700);
    color: #fff;
}

.ethereum-icon {
    background: linear-gradient(135deg, #627EEA, #8ba3ff);
    color: #fff;
}

.solana-icon {
    background: linear-gradient(135deg, #00FFA3, #14b8a6);
    color: #fff;
}

.coin-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.coin-symbol {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 3px;
}

.favorite-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    color: #fbbf24;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.change {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 6px;
}

.change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.card-sparkline {
    margin: 4px 0 8px 0;
}

.card-sparkline canvas {
    width: 100%;
    height: 32px !important;
    border-radius: 4px;
}

.card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
}

.footer-value {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== MAIN CHART ===== */
.main-chart {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 20px 14px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-coin-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.chart-coin-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.chart-coin-symbol {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

.chart-current-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-price {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.chart-change {
    font-size: 12px;
    font-weight: 600;
}

.chart-change.positive {
    color: #10b981;
}

.chart-change.negative {
    color: #ef4444;
}

.chart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.period-buttons {
    display: flex;
    gap: 3px;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px;
    border-radius: 8px;
}

.period-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.period-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.period-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.expand-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* ===== CHART CANVAS ===== */
.chart-container {
    position: relative;
    height: 220px;
    margin-bottom: 12px;
}

#mainChart {
    width: 100% !important;
    height: 100% !important;
}

/* ===== CHART STATS ===== */
.chart-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
    margin-bottom: 2px;
}

.stat-value-group {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.stat-change {
    font-size: 10px;
    font-weight: 600;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.stat-sub {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    display: block;
    margin-top: 1px;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
    .top-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 6px 0 10px 0;
    }
    
    .top-cards {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .chart-title {
        flex-wrap: wrap;
    }
    
    .chart-current-price {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }
    
    .chart-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .period-buttons {
        flex-wrap: wrap;
    }
    
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .chart-container {
        height: 180px;
    }
    
    .main-chart {
        padding: 12px 14px 10px;
    }
}

@media (max-width: 480px) {
    .chart-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .chart-container {
        height: 150px;
    }
    
    .price {
        font-size: 15px;
    }
    
    .chart-price {
        font-size: 15px;
    }
    
    .stat-value {
        font-size: 11px;
    }
    
    .crypto-card {
        padding: 10px 12px;
    }
    
    .coin-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}