:root {
    --bg: #f4f4f9;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --accent: #0f172a;
    --accent-light: #e2e8f0;
    --primary: #2563eb;
    --primary-light: rgba(37, 99, 235, 0.1);
    --border: #e5e7eb;
    --radius: 16px;
    --shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.nav {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo svg { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* Input Box */
.input-box {
    display: flex;
    gap: 10px;
    background: var(--card-bg);
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.input-box:focus-within {
    box-shadow: 0 10px 40px -10px rgba(37, 99, 235, 0.2);
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 15px;
}

.at-sign {
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 5px;
}

input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Result Card */
.result-area {
    margin-top: 60px;
    animation: fadeUp 0.6s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
}

#profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg);
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border: 2px solid white;
    border-radius: 50%;
}

.user-details h2 {
    font-size: 1.25rem;
}

.user-details span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.iq-score-box {
    text-align: right;
}

.iq-score-box .label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

.iq-score-box .value {
    font-size: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--primary);
}

/* Traits & Bars */
.score-visual {
    margin-bottom: 30px;
}

.progress-track {
    height: 6px;
    background: var(--accent-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.trait-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.trait-bar {
    height: 4px;
    background: var(--accent-light);
    border-radius: 10px;
    overflow: hidden;
}

.trait-fill {
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 1s ease-out;
}

.personality-badge {
    text-align: center;
    padding: 15px;
    background: var(--primary-light);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
}

/* Info Section */
.info-section {
    padding: 80px 0;
}

.info-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step {
    text-align: center;
}

.step-num {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 10px;
    font-family: 'Space Grotesk', sans-serif;
}

.step h3 { margin-bottom: 10px; font-size: 1.2rem; }
.step p { color: var(--text-secondary); font-size: 0.95rem; }

/* Blog Section */
.blog-section {
    padding: 80px 0;
    background: white;
}

.blog-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.article-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    transition: transform 0.2s;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.article-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.article-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.article-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .input-box { flex-direction: column; }
    .btn-primary { width: 100%; padding: 15px; }
    .steps-grid, .articles-grid, .traits-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}