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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

nav {
    background: #1a1a2e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2d2d4a;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.nav-links { display: flex; gap: 1.5rem; }

.nav-links a {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: #fff; }

.container {
    max-width: 640px;
    margin: 2rem auto;
    padding: 2rem;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2d2d4a;
}

h1 { margin-bottom: 0.5rem; color: #fff; }
h1 + p { color: #888; margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #aaa;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    background: #0f0f1a;
    border: 1px solid #2d2d4a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4a4a6a;
}

#preview img {
    max-width: 100%;
    max-height: 200px;
    margin-top: 0.75rem;
    border-radius: 6px;
    border: 1px solid #2d2d4a;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

button {
    flex: 1;
    padding: 0.875rem;
    background: #4a4ae8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover { background: #5a5af0; }
button:disabled { background: #444; cursor: not-allowed; }
button.secondary { background: #2d2d4a; }
button.secondary:hover { background: #3d3d5a; }

.result {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid;
}

.result.hidden { display: none; }
.result.success { background: #0d2818; border-color: #1e5631; }
.result.warning { background: #2d2400; border-color: #5c4d00; }
.result.error { background: #2d0f0f; border-color: #5c1f1f; }

.result h3 { margin-bottom: 1rem; color: #fff; }
.result p { margin-bottom: 0.4rem; }

code {
    background: rgba(255,255,255,0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85rem;
    word-break: break-all;
}

.verify-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #2d2d4a;
}

.verify-meta p { font-size: 0.85rem; margin: 0; }

details { margin: 1rem 0; }
details summary { cursor: pointer; color: #4a4ae8; font-weight: 500; }
details pre {
    margin-top: 0.5rem;
    padding: 1rem;
    background: #0f0f1a;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.75rem;
    max-height: 300px;
}

.matches { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }

.match {
    background: #0f0f1a;
    border-radius: 8px;
    border-left: 4px solid #444;
    overflow: hidden;
}

.match.score-exact { border-left-color: #4caf50; }
.match.score-high { border-left-color: #ffc107; }
.match.score-medium { border-left-color: #ff9800; }

.match-header {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid #2d2d4a;
}

.match-header .score { font-weight: 600; }
.match-header .variant-tag {
    font-size: 0.75rem;
    color: #4a4ae8;
    background: rgba(74, 74, 232, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.match-header .distance { font-size: 0.8rem; color: #888; }

.match-body { padding: 1rem; }
.match-body p { margin-bottom: 0.3rem; font-size: 0.9rem; }

.match-footer {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #666;
    background: rgba(0,0,0,0.2);
}

.no-matches {
    text-align: center;
    color: #888;
    padding: 2rem;
}

h3 { color: #fff; margin-bottom: 0.5rem; }
