* {
    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;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.header h1 {
    color: #2d3748;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    color: #718096;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    min-width: 150px;
}

.stat-item .number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.stat-item .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.error-message {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.error-message .icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-message h2 {
    color: #2d3748;
    margin-bottom: 10px;
}

.error-message p {
    color: #718096;
}

.stock-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.stock-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stock-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.stock-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

.stock-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #718096;
}

.stock-meta span {
    background: #f7fafc;
    padding: 5px 12px;
    border-radius: 20px;
}

.stock-meta .api-used {
    background: #ebf8ff;
    color: #2b6cb0;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.stock-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #a0aec0;
    flex-wrap: wrap;
    gap: 10px;
}

.update-time {
    color: #48bb78;
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.stock-card{
    margin-top: 10px;
}
/* Delay para cada card */
.stock-card:nth-child(1) { animation-delay: 0.1s; }
.stock-card:nth-child(2) { animation-delay: 0.2s; }
.stock-card:nth-child(3) { animation-delay: 0.3s; }
.stock-card:nth-child(4) { animation-delay: 0.4s; }
.stock-card:nth-child(5) { animation-delay: 0.5s; }
.stock-card:nth-child(6) { animation-delay: 0.6s; }
.stock-card:nth-child(7) { animation-delay: 0.7s; }
.stock-card:nth-child(8) { animation-delay: 0.8s; }
.stock-card:nth-child(9) { animation-delay: 0.9s; }
.stock-card:nth-child(10) { animation-delay: 1.0s; }

.loading {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.loading .spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-data {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.no-data .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .stats {
        gap: 15px;
    }

    .stat-item {
        padding: 10px 20px;
        min-width: 120px;
    }

    .stat-item .number {
        font-size: 1.5rem;
    }

    .stock-name {
        font-size: 1.4rem;
    }

    .chart-container {
        height: 300px;
    }

    .stock-meta {
        font-size: 0.8rem;
        gap: 10px;
    }

    .stock-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 250px;
    }

    .stock-card {
        padding: 15px;
    }
}