*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, sans-serif;
    background: #f0f2f5;
    color: #222;
    line-height: 1.5;
}

body.center-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

nav {
    background: #1a1a2e;
    padding: .75rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
nav a { color: #ccc; text-decoration: none; font-size: .9rem; }
nav a:hover { color: #fff; }

main { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }

h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }

.card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    max-width: 400px;
    width: 100%;
}

label { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; font-size: .85rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], textarea, select {
    padding: .5rem .75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

button, .btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: .6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .95rem;
}
button:hover { background: #2e2e5e; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #e74c3c; }

.error   { color: #c0392b; background: #fdecea; padding: .5rem .75rem; border-radius: 4px; margin-bottom: .75rem; }
.success { color: #27ae60; background: #eafaf1; padding: .5rem .75rem; border-radius: 4px; margin-bottom: .75rem; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
th, td { padding: .6rem .9rem; text-align: left; border-bottom: 1px solid #eee; font-size: .9rem; }
th { background: #f7f8fa; font-weight: 600; }

.listed   { color: #c0392b; font-weight: bold; }
.clean    { color: #27ae60; }
.progress-bar-track { background: #e0e4ea; border-radius: 4px; height: 5px; margin: .5rem 0 .3rem; }
.progress-bar { background: #1a1a2e; height: 5px; border-radius: 4px; width: 0%; transition: width .3s ease; }
.progress { font-size: .85rem; color: #666; margin: .25rem 0 .5rem; min-height: 1.4em; display: flex; align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid #ddd; border-top-color: #555; border-radius: 50%; animation: spin .7s linear infinite; margin-right: .5rem; flex-shrink: 0; }
#result-table { margin-top: 1rem; }
tr.clean-row { display: none; }
#result-table.show-clean tr.clean-row { display: table-row; }
tr.domain-header td { background: #e8eaf0; font-size: .9rem; padding: .5rem .9rem; border-top: 2px solid #c0c4d0; }
tr.domain-header .domain-ip { color: #666; font-weight: normal; margin-left: .75rem; font-size: .8rem; }

.domain-header-content { display: flex; align-items: center; justify-content: space-between; }

.score-gauge { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gauge-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.gauge-text { position: relative; font-weight: 700; z-index: 1; }

#score-display { display: flex; align-items: center; gap: 1.25rem; margin: 1rem 0; }
.score-display-label { font-size: .9rem; color: #444; line-height: 1.6; }
.score-display-label span { font-size: .8rem; color: #888; }

.weight-badge { font-size: .8rem; text-align: center; width: 2.5rem; color: #888; }
.weight-high { color: #c0392b; font-weight: 600; }
.weight-low  { color: #aaa; }

textarea { font-family: monospace; }

.toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 2.5rem;
    height: 1.375rem;
    background: #ccc;
    border-radius: 1rem;
    cursor: pointer;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.toggle::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: .2rem;
    transform: translateY(-50%);
    transition: left .2s;
}
.toggle:checked { background: #1a1a2e; }
.toggle:checked::after { left: 1.3rem; }
