:root {
    --primary: #2e1760;
    --secondary: #7b2cbf;
    --accent: #9d4edd;
    --success: #38b000;
    --warning: #ff6b6b;
    --background: #f8f9ff;
    --card: #ffffff;
    --text: #2b2d42;
    --text-light: #8d99ae;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.dashboard-container {
    max-width: 100%;
    padding: 1rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .dashboard-container {
        padding: 2rem;
    }
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 40%, transparent 50%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dashboard-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

.metric-card {
    background: var(--card);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-card h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-card h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    background: var(--accent);
    border-radius: 2px;
}

.chart-container {
    height: 250px;
    margin: 1rem 0;
    position: relative;
}

@media (min-width: 768px) {
    .chart-container {
        height: 300px;
    }
}

.prediction-meter {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 0.75rem 0;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert {
    background: linear-gradient(45deg, var(--warning), #ff9f9f);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    animation: pulse 2s infinite;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert::before {
    content: '⚠️';
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

.skill-item {
    margin-bottom: 1.25rem;
}

.skill-item h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.skill-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-light);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: var(--warning);
    text-align: center;
    font-size: 0.875rem;
    display: none;
}

.error-message.active {
    display: block;
}

.ip-profile-info {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.info-label {
    font-weight: 600;
    color: var(--text);
}
