/* Main container for the speed test tool */
.speedtest-container {
    max-width: 800px;
    margin: 2em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f4f7f9;
    border-radius: 12px;
    padding: 2em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

/* Grid layout for the gauges */
.speedtest-ui {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1em;
    margin-bottom: 2em;
}

.gauge-container {
    text-align: center;
}

.gauge-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5em;
}

/* Controls section (start button and status) */
.speedtest-controls {
    text-align: center;
    margin-bottom: 2em;
}

.start-button {
    display: inline-block;
    width: 120px;
    height: 120px;
    background-color: #0073aa;
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    border-radius: 50%;
    line-height: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.start-button:hover {
    background-color: #005a87;
    transform: scale(1.05);
}

/* Style for when the test is running */
.start-button.testing {
    background-color: #e04040;
    cursor: not-allowed;
    transform: scale(0.95);
}

.start-button.testing::after {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    margin: 20px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-text {
    margin-top: 1em;
    font-size: 1.1em;
    color: #555;
    height: 20px;
}

/* Details section (IP, ISP, etc.) */
.speedtest-details {
    display: flex;
    justify-content: space-around;
    padding-top: 1.5em;
    border-top: 1px solid #e1e1e1;
    color: #444;
}

.detail-item {
    text-align: center;
}

.detail-item strong {
    display: block;
    font-size: 0.9em;
    color: #777;
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .speedtest-ui {
        grid-template-columns: 1fr; /* Stack gauges vertically */
    }
    .speedtest-details {
        flex-direction: column;
        gap: 1em;
    }
}