* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.header p {
    color: #666666;
    font-size: 1.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f5f5f5;
    color: #333333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333333;
}

.card-icon {
    font-size: 1.2rem;
    color: #666666;
}

.card-value {
    font-size: 2rem;
    font-weight: bold;
    color: #DC2626;
    margin-bottom: 10px;
}

.card-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.trend-up {
    color: #22c55e;
}

.trend-down {
    color: #ef4444;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.chart-container {
    height: 300px;
    position: relative;
}

.searches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.search-item:hover {
    background: #f0f0f0;
}

.search-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-rank {
    background: #DC2626;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.search-query {
    font-weight: 500;
    color: #000000;
}

.search-count {
    background: #e0f2fe;
    color: #DC2626;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #DC2626;
}

.footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
    color: #666666;
    font-size: 0.9rem;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 20px;
}

.loading i {
    font-size: 3rem;
    color: #DC2626;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.error {
    text-align: center;
    color: #ef4444;
    padding: 40px;
}

.error i {
    font-size: 3rem;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .searches-grid {
        grid-template-columns: 1fr;
    }
}