/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #76B900;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.last-update {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Price Card */
.price-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.current-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.price-value {
    font-size: 3rem;
    font-weight: 700;
    color: #76B900;
}

.price-change {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.change-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.change-percent {
    font-size: 1rem;
    font-weight: 500;
}

.volume-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.volume-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.volume-item i {
    color: #76B900;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-indicator i {
    font-size: 0.8rem;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #76B900;
    color: white;
}

.btn-primary:hover {
    background: #5a9400;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(118, 185, 0, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.period-select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-select:focus {
    outline: none;
    border-color: #76B900;
    box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.1);
}

/* Chart Section */
.chart-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-header h2 {
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h2 i {
    color: #76B900;
}

.chart-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

#priceChart {
    width: 100% !important;
    height: 100% !important;
}

/* Table Section */
.table-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.table-header h2 {
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h2 i {
    color: #76B900;
}

.table-info {
    color: #666;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 0.9rem;
    color: #666;
}

tr:hover {
    background: #f8f9fa;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px !important;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 2rem;
    color: #76B900;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #666;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .price-info {
        flex-direction: column;
        text-align: center;
    }
    
    .price-value {
        font-size: 2.5rem;
    }
    
    .controls {
        justify-content: center;
    }
    
    .chart-stats {
        justify-content: center;
    }
    
    .table-header {
        flex-direction: column;
        text-align: center;
    }
    
    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .price-value {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.price-card, .chart-section, .table-section {
    animation: fadeIn 0.6s ease-out;
}

/* Color classes for price changes */
.positive {
    color: #28a745 !important;
}

.negative {
    color: #dc3545 !important;
}

.neutral {
    color: #6c757d !important;
}
