* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --text: #1e293b;
    --background: #f1f5f9;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--secondary), #059669);
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    color: var(--primary);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analysis-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    align-items: center;
}

input[type="url"] {
    width: 60%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

input[type="url"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
    outline: none;
}

button {
    padding: 1rem 2rem;
    background-image: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(74,144,226,0.3);
}

.results-container {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.score-overview {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease-out;
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(99,102,241,0.3);
    animation: pulse 2s infinite;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    animation: slideUp 0.5s ease-out;
}

.metric-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.metric-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.metric-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.metric-score {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 1rem 0;
}

.metric-details {
    list-style: none;
    margin-top: 1rem;
}

.metric-details li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.export-section {
    margin-top: 2rem;
    text-align: center;
}

.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 8px 16px rgba(99,102,241,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 12px 24px rgba(99,102,241,0.4); }
    100% { transform: scale(1); box-shadow: 0 8px 16px rgba(99,102,241,0.3); }
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .analysis-form { flex-direction: column; }
    input[type="url"] { width: 100%; }
    .metrics-grid { grid-template-columns: 1fr; }
}