/* Mobile-first responsive design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
    color: white;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* Currency Cards */
.currency-cards {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}

.currency-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.currency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.currency-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.currency-pair {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    color: #666;
}

.current-rate {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    text-align: right;
    min-width: 80px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: rgba(255,255,255,0.9);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.stat-value.positive {
    color: #38a169;
}

.stat-value.negative {
    color: #e53e3e;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 14px;
}

.footer p {
    margin-bottom: 4px;
}

.last-update {
    font-size: 12px;
    opacity: 0.7;
}

/* Tablet styles */
@media (min-width: 768px) {
    .container {
        padding: 24px;
    }
    
    .header h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .currency-cards {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    .currency-card {
        padding: 24px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    
    .stat-item {
        padding: 20px;
    }
    
    .stat-label {
        font-size: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .container {
        padding: 32px;
    }
    
    .header h1 {
        font-size: 42px;
    }
    
    .subtitle {
        font-size: 20px;
    }
    
    .currency-cards {
        gap: 32px;
    }
    
    .currency-card {
        padding: 32px;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .stats {
        gap: 32px;
    }
    
    .stat-item {
        padding: 24px;
    }
    
    .stat-label {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 28px;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Chart responsive adjustments */
@media (max-width: 480px) {
    .chart-container {
        height: 200px;
    }
    
    .currency-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .currency-header h2 {
        font-size: 20px;
    }
    
    .current-rate {
        font-size: 16px;
        text-align: left;
    }
}
