:root {
    --primary: #6C63FF;
    --primary-hover: #5A52E0;
    --primary-glow: rgba(108, 99, 255, .3);
    --secondary: #A78BFA;
    --accent: #10B981;
    --accent-red: #EF4444;
    --bg: #0F0A1A;
    --bg-surface: #1A1230;
    --bg-elevated: #241C3D;
    --bg-card: rgba(36, 28, 61, .7);
    --text: #E8E0F5;
    --text-secondary: #9B8EC0;
    --text-muted: #6B5B8D;
    --border: rgba(108, 99, 255, .15);
    --border-strong: rgba(108, 99, 255, .3);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 250ms cubic-bezier(.4, 0, .2, 1)
}

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

html,
body {
    min-height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased
}

.hidden {
    display: none !important
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px
}

.header h1 {
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.header-actions {
    display: flex;
    gap: 8px
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 2px 12px var(--primary-glow)
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--primary-glow)
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--bg-elevated)
}

.btn-lg {
    padding: 12px 32px;
    font-size: .9rem;
    border-radius: var(--radius);
    margin: 24px auto;
    display: flex
}

.main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px
}

.input-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.input-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px
}

.card-header h2 {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text)
}

.word-count {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 500
}

.text-input {
    flex: 1;
    width: 100%;
    padding: 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: .85rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition);
    min-height: 200px
}

.text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow)
}

.text-input::placeholder {
    color: var(--text-muted);
    opacity: .6
}

.text-input::-webkit-scrollbar {
    width: 5px
}

.text-input::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px
}

.results {
    margin-top: 8px
}

.score-card {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px
}

.score-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0
}

.score-ring {
    width: 100%;
    height: 100%
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

.score-number {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.score-label {
    font-size: .65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em
}

.score-summary {
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.6
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center
}

.stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px
}

.stat-missing {
    color: var(--accent-red)
}

.stat-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em
}

.keywords-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.keyword-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px
}

.keyword-title {
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 10px
}

.matched-title {
    color: var(--accent)
}

.missing-title {
    color: var(--accent-red)
}

.keyword-hint {
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: 8px
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.tag {
    padding: 4px 10px;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid;
    transition: all var(--transition)
}

.tag-matched {
    background: rgba(16, 185, 129, .1);
    color: var(--accent);
    border-color: rgba(16, 185, 129, .3)
}

.tag-missing {
    background: rgba(239, 68, 68, .1);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, .3)
}

.tag-missing:hover {
    background: rgba(239, 68, 68, .2)
}

.empty-state {
    font-size: .8rem;
    color: var(--text-muted);
    padding: 12px;
    text-align: center
}

@media(max-width:768px) {

    .input-columns,
    .keywords-grid {
        grid-template-columns: 1fr
    }

    .stats-row {
        grid-template-columns: 1fr 1fr 1fr
    }

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

@media(max-width:480px) {
    .stats-row {
        grid-template-columns: 1fr
    }

    .header h1 {
        font-size: .85rem
    }

    .main {
        padding: 16px
    }
}