:root {
    --primary: #1da1f2;
    --foreground: #0f172a;
    --muted: #64748b;
    --bg: #fafafa;
    --card-bg: #ffffff;
    --border: #f1f5f9;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--foreground);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-content {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    font-size: 1.25rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
}

nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-primary {
    background: black;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.hero {
    padding-top: 120px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--primary);
}

.hero p {
    color: var(--muted);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

.search-box {
    display: flex;
    gap: 12px;
    background: white;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.at-symbol {
    color: var(--muted);
    font-size: 1.125rem;
    margin-right: 4px;
}

input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 10px 0;
}

#submit-btn {
    background: black;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

.result-card {
    margin-top: 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.08);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.result-layout {
    display: flex;
    align-items: center;
    gap: 40px;
    justify-content: center;
    margin-bottom: 32px;
}

.avatar-ring {
    position: relative;
    padding: 4px;
    background: linear-gradient(45deg, var(--primary), #a855f7);
    border-radius: 24px;
    line-height: 0;
}

.profile-header img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid white;
    margin-bottom: 0;
}

.profile-info {
    text-align: left;
}

.profile-info h2 {
    font-size: 1.75rem;
    margin-bottom: 4px;
    color: var(--foreground);
}

.status {
    margin-bottom: 0;
}

.score-display-box {
    text-align: center;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-top: -10px;
}

.footer-metrics {
    display: flex;
    justify-content: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.metric-pill {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
}

/* Why Choose Section */
.why-choose-section {
    margin-top: 80px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.why-card {
    background: white;
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 24px;
    transition: transform 0.2s;
}

.why-card:hover {
    transform: translateY(-4px);
}

.why-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.why-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.why-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .result-layout {
        flex-direction: column;
        gap: 24px;
    }
    .profile-info {
        text-align: center;
    }
    .why-grid {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none;
}

.profile-header img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 12px;
    object-fit: cover;
    border: 2px solid var(--bg);
}

.profile-header h2 {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.status {
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 24px;
}

.gauge-container {
    position: relative;
    max-width: 240px;
    margin: 0 auto;
}

#iq-score-display {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 800;
}

.footer-metrics {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--bg);
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.content-article {
    margin: 64px auto;
}

.content-article h1, .content-article h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--foreground);
    margin-top: 48px;
}

.content-article p {
    margin-bottom: 24px;
    font-size: 1.05rem;
    color: var(--muted);
}

.metrics-box {
    background: var(--bg);
    padding: 24px;
    border-radius: 16px;
    margin: 32px 0;
}

.metrics-box h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.metrics-box ul {
    list-style: disc;
    padding-left: 20px;
}

.metrics-box li {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.how-to-section {
    margin-top: 64px;
    padding: 40px;
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.how-to-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    text-align: center;
}

.step-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: var(--bg);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--foreground);
}

.step-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .steps-grid { grid-template-columns: 1fr; }
}

.faq-section {
    margin-top: 48px;
}

.faq-item {
    margin-bottom: 32px;
}

.faq-item h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--foreground);
}

footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.copyright {
    color: var(--muted);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 2rem; }
    .search-box { flex-direction: column; }
    #submit-btn { width: 100%; }
}