:root {
    --bg-1: #f8faff;
    --bg-2: #eef2ff;
    --bg-3: #fdf2f8;
    --card: rgba(255, 255, 255, 0.9);
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #6366f1;
    --primary-soft: #e0e7ff;
    --secondary: #ec4899;
    --secondary-soft: #fce7f3;
    --accent: #14b8a6;
    --success: #059669;
    --success-soft: #d1fae5;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, #c7d2fe 0%, transparent 28%),
        radial-gradient(circle at top right, #fbcfe8 0%, transparent 26%),
        radial-gradient(circle at bottom left, #99f6e4 0%, transparent 24%),
        linear-gradient(180deg, var(--bg-1), var(--bg-2), var(--bg-3));
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.navbar {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.65);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    border: none;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
}

.nav-btn:hover,
.nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 48px;
}

.page-section {
    display: none;
}

.active-page {
    display: block;
}

.hero-card,
.card,
.menu-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
}

.hero-card {
    padding: 36px;
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(238,242,255,0.92), rgba(252,231,243,0.9));
}

.hero-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-card h1 {
    margin: 0 0 12px;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle,
.info-text {
    color: var(--muted);
    line-height: 1.7;
}

.login-card {
    max-width: 560px;
    margin: 80px auto 0;
}

.login-form {
    display: grid;
    gap: 14px;
    max-width: 360px;
    margin: 0 auto;
}

.login-form input {
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-family: "Inter", sans-serif;
    outline: none;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.menu-card {
    padding: 26px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
}

.menu-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.menu-card h3 {
    color: var(--primary);
}

.upload-box {
    border: 2px dashed #c7d2fe;
    border-radius: 20px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(224,231,255,0.45), rgba(252,231,243,0.42));
}

.upload-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    font-family: "Inter", sans-serif;
}

.upload-icon {
    font-size: 1.4rem;
}

input[type="file"] {
    display: none;
}

.file-name {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.results-grid,
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.card {
    padding: 26px;
}

.card-title {
    font-weight: 800;
    margin-bottom: 18px;
    font-size: 1.02rem;
    color: #1f2937;
}

.score-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-ring {
    position: relative;
    width: 170px;
    height: 170px;
}

.ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 301.59;
    stroke-dashoffset: 301.59;
    transform: rotate(-90deg);
    transform-origin: 60px 60px;
    transition: stroke-dashoffset 0.9s ease;
}

.score-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-align: center;
}

.score-center span {
    font-size: 3rem;
    line-height: 1;
    color: var(--primary);
}

.score-center small {
    font-size: 1.1rem;
    color: var(--muted);
    margin-left: 2px;
    transform: translateY(8px);
}

.score-label {
    margin-top: 10px;
    color: var(--muted);
    font-weight: 600;
}

.summary-stats {
    display: flex;
    gap: 12px;
}

.stat-box {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    padding: 15px;
    border-radius: 16px;
    text-align: center;
    flex: 1;
    border: 1px solid #eef2ff;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-name {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 4px;
    display: block;
}

.check-list,
.suggestion-list {
    margin: 0;
    padding-left: 20px;
}

.check-list li,
.suggestion-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 8px 12px;
    border-radius: 999px;
    margin: 2px;
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
}

.tag.matched {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.tag.missing {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.good {
    color: var(--success);
    font-weight: 700;
}

.bad {
    color: var(--danger);
    font-weight: 700;
}

.preview-card {
    margin-bottom: 24px;
    overflow: hidden;
}

.resume-preview {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.7;
    color: #374151;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    max-height: 320px;
    width: 100%;
    font-family: "Inter", sans-serif;
    font-size: 14px;
}

select {
    background: white;
    color: var(--text);
    outline: none;
}

select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
    }

    .menu-grid,
    .results-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        flex-direction: column;
    }

    .hero-card h1 {
        font-size: 2.3rem;
    }
}