.container {
    max-width: 950px;
    margin: auto;
}

h1 {
    text-align: center;
    margin: 0 0 8px;
}

.subtitle {
    text-align: center;
    margin-bottom: 25px;
}

/* ================= INPUT ================= */

.input-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.link-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.link-row input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

.link-row input:focus {
    border-color: #111;
}

.remove-btn {
    width: 42px;
    border: 0;
    border-radius: 8px;
    background: #eee;
    cursor: pointer;
    font-size: 18px;
}

.remove-btn:hover {
    background: #ddd;
}

.input-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chekbutton {
    border: 0;
    padding: 11px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.chekbutton:hover {
    opacity: .9;
}

.chekbutton:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.reset-btn {
    background: #eee;
    color: #222;
}

/* ================= TEST INFO ================= */

.test-info {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 20px;
    gap: 15px;
    align-items: center;
    color: #111;
}

.test-count {
    white-space: nowrap;
    font-weight: bold;
}

.progress {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: #6852fa;
    transition: width .2s ease;
}

/* ================= LOADING ================= */

.loading {
    display: none;
    text-align: center;
    color: #666;
    margin: 20px 0;
}

/* ================= WINNER ================= */

.winner {
    display: none;
    background: #fff;
    border: 2px solid #111;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    color: #111;
}

.winner-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 7px;
}

.winner-name {
    font-size: 18px;
    font-weight: bold;
    word-break: break-all;
}

.winner-time {
    margin-top: 8px;
    font-size: 18px;
}

/* ================= RESULTS ================= */

.results {
    display: grid;
    gap: 15px;
    color: #111;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px;
}

.card.fastest {
    border: 2px solid #111;
}

.name {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 7px;
    word-break: break-all;
}

.url {
    font-size: 12px;
    color: #777;
    word-break: break-all;
    margin-bottom: 15px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.stat {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 11px 8px;
    text-align: center;
}

.stat span {
    display: block;
    font-size: 11px;
    color: #777;
    margin-bottom: 5px;
}

.stat strong {
    font-size: 15px;
}

.ok {
    color: #222;
}

.failed {
    color: #b00020;
}

.note {
    margin-top: 12px;
    font-size: 12px;
    color: #777;
    line-height: 1.5;
}

@media (max-width: 700px) {

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .test-info {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 450px) {

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

    .input-actions {
        flex-direction: column;
    }

    .input-actions .chekbutton {
        width: 100%;
    }
}