/* Main Styles */
.crypto-multi-price,
.crypto-advanced-chart,
.crypto-exchange-comparison,
.crypto-affiliate-grid {
    margin: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Multi Price Widget */
.multi-price-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
}

.multi-price-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.exchanges-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.exchange-price {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.exchange-logo {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.exchange-price-data .price {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.exchange-price-data .change {
    font-weight: bold;
    margin-bottom: 5px;
}

.exchange-price-data .change.positive {
    color: #27ae60;
}

.exchange-price-data .change.negative {
    color: #e74c3c;
}

.exchange-price-data .volume {
    font-size: 0.9em;
    color: #7f8c8d;
}

/* Advanced Chart */
.crypto-advanced-chart {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chart-container {
    padding: 20px;
    height: calc(100% - 60px);
}

.chart-controls {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.timeframe-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #353539;
}

.timeframe-btn:hover,
.timeframe-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Exchange Comparison */
.crypto-exchange-comparison {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 30px;
}
.crypto-exchange-comparison h3 {
    text-align: center;
    padding: 20px;
    margin: 0;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(90deg, #f8719d, #ff8c42);
}
.crypto-exchange-comparison .comparison-table table {
    width: 100%;
    border-collapse: collapse;
}
.crypto-exchange-comparison .comparison-table th,
.crypto-exchange-comparison .comparison-table td {
    padding: 18px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.crypto-exchange-comparison .comparison-table th {
    background-color: #f9fafb;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.crypto-exchange-comparison .comparison-table tr:last-child td {
    border-bottom: none;
}

.crypto-exchange-comparison .comparison-table tr:hover {
    background-color: #f7faff;
}

.crypto-exchange-comparison .coin-name-cell {
    display: flex;
    align-items: center;
}

.crypto-exchange-comparison .coin-logo {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.crypto-exchange-comparison .coin-symbol {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

.crypto-exchange-comparison .exchange-price-details .price {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.crypto-exchange-comparison .exchange-price-details .change {
    font-size: 14px;
    font-weight: 600;
}

.crypto-exchange-comparison .exchange-price-details .change.positive {
    color: #10b981; /* Green */
}

.crypto-exchange-comparison .exchange-price-details .change.negative {
    color: #ef4444; /* Red */
}

.crypto-exchange-comparison .exchange-price-details .high-low {
    font-size: 12px;
    color: #718096;
    margin-top: 6px;
}

.crypto-exchange-comparison .error-message {
    color: #ef4444;
    font-weight: 500;
}

/* Affiliate Grid */
.crypto-affiliate-grid h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.affiliate-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.affiliate-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.affiliate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.exchange-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #667eea;
}

.card-header h4 {
    margin: 0;
    font-size: 1.4em;
}

.card-body {
    padding: 20px;
}

.exchange-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.feature {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

.exchange-stats {
    display: grid;
    gap: 10px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.stat .label {
    color: #6c757d;
    font-size: 0.9em;
}

.stat .value {
    font-weight: bold;
    color: #2c3e50;
}

.card-footer {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
}

.affiliate-btn {
    display: block;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.affiliate-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    transform: scale(1.05);
    color: white;
    text-decoration: none;
}

.cashback-badge {
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
}

/* Loading States */
.loading {
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .exchanges-comparison {
        grid-template-columns: 1fr;
    }
    
    .affiliate-cards {
        grid-template-columns: 1fr;
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
    
    .comparison-table {
        font-size: 0.9em;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.crypto-multi-price,
.crypto-advanced-chart,
.crypto-exchange-comparison,
.crypto-affiliate-grid {
    animation: fadeIn 0.6s ease-out;
}
/* === CSS CHO CHỈ BÁO THỜI GIAN LIVE === */
.crypto-exchange-comparison h3 {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.last-updated {
    position: absolute;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
}

.last-updated .time-data {
    opacity: 0.8;
    margin-left: 5px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 5px #10b981;
}

/* Hiệu ứng nhấp nháy cho dấu chấm LIVE */
@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .last-updated {
        display: none; /* Ẩn đi trên mobile để không bị chật */
    }
}