:root {
    --bg: #0F172A;
    --bg2: #1E293B;
    --bg-card: rgba(30, 41, 59, .85);
    --border: rgba(255, 255, 255, .08);
    --text: #E2E8F0;
    --muted: #64748B;
    --primary: #14B8A6;
    --primary2: #2DD4BF;
    --accent: #5EEAD4;
    --glow: rgba(20, 184, 166, .25);
    --r: 12px;
    --font: 'Inter', -apple-system, sans-serif
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 500px 400px at 50% 30%, rgba(20, 184, 166, .05), transparent 70%);
    pointer-events: none;
    z-index: -1
}

.app {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px 40px
}

.header {
    padding: 16px 0 8px
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px
}

.logo-icon {
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--r);
    box-shadow: 0 4px 16px var(--glow)
}

.logo h1 {
    font-size: 1.05rem;
    font-weight: 700
}

.tagline {
    font-size: .62rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font: 600 .84rem var(--font);
    cursor: pointer;
    transition: .25s
}

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

.btn-primary:hover {
    transform: translateY(-1px)
}

.btn-secondary {
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--muted)
}

.btn-sm {
    padding: 6px 12px;
    font-size: .74rem
}

.section {
    margin-bottom: 16px
}

.input-row {
    display: flex;
    gap: 6px
}

.input-row input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text);
    font: 500 .9rem var(--font)
}

.input-row input:focus {
    outline: none;
    border-color: var(--primary)
}

.bulk-toggle {
    margin-top: 6px;
    font-size: .74rem;
    color: var(--muted)
}

.bulk-toggle input {
    margin-right: 4px
}

#bulkInput {
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: .8rem var(--font);
    resize: vertical
}

/* Result Hero */
.result-hero {
    text-align: center;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 12px;
    animation: slideUp .3s ease
}

@keyframes slideUp {
    from {
        transform: translateY(16px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.est-label {
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px
}

.est-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px
}

.score-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width .5s ease
}

.score-label {
    margin-top: 6px;
    font-size: .74rem;
    color: var(--muted)
}

/* Breakdown */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 12px
}

.factor-card {
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r)
}

.factor-card .factor-name {
    font-size: .68rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px
}

.factor-card .factor-score {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary2)
}

.factor-card .factor-detail {
    font-size: .72rem;
    color: var(--muted)
}

/* Comparables */
.comparables {
    margin-bottom: 12px
}

.comparables h3 {
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 6px
}

.comp-list {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.comp-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .8rem
}

.comp-item .comp-domain {
    font-weight: 600;
    color: var(--accent)
}

.comp-item .comp-price {
    color: var(--primary2)
}

.result-actions {
    display: flex;
    gap: 6px
}

/* Bulk */
.bulk-table {
    width: 100%;
    border-collapse: collapse
}

.bulk-table th {
    font-size: .68rem;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border)
}

.bulk-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .03);
    font-size: .82rem
}

.bulk-table .score-cell {
    color: var(--primary);
    font-weight: 700
}

.bulk-table .val-cell {
    color: var(--accent);
    font-weight: 600
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text);
    font-size: .82rem;
    opacity: 0;
    transition: .35s;
    z-index: 100;
    pointer-events: none
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

.hidden {
    display: none !important
}