
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 2rem;
}

h1 {
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 1px;
    font-size: 2.5rem; /* Adjusted size for the title */
}

#testWrapper {
    width: 100%;
    max-width: 960px;
    margin: 0 auto; /* Centering fix */
}

#startStopBtn {
    background-color: transparent;
    border: 2px solid #03dac6;
    color: #03dac6;
    font-size: 1.25rem;
    width: 10em;
    height: 3.5em;
    line-height: 3.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    margin: 0 auto 1rem auto; /* Centering fix */
}

#startStopBtn:before {
    content: "Start";
}

#startStopBtn:hover {
    background-color: #03dac6;
    color: #121212;
    box-shadow: 0 0 15px rgba(3, 218, 198, 0.5);
}

#startStopBtn.running {
    background-color: #cf6679;
    border-color: #cf6679;
    color: #121212;
}
#startStopBtn.running:before{
	content:"Abort";
}

#serverArea {
    margin-top: 1rem;
    color: #bbbbbb;
    margin: 1rem auto; /* Centering fix */
}

#server {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 0.5em;
    font-size: 1em;
}

.card-deck {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    width: 220px;
}

.card.gauge-card {
    width: 300px;
}


.card:hover {
    transform: translateY(-5px);
}

.card .testName {
    font-size: 1.2rem;
    color: #bbbbbb;
    margin-bottom: 0.5rem;
}

.card .meterText {
    font-size: 2.8rem;
    font-weight: 500;
}

.card .unit {
    font-size: 1rem;
    color: #888;
}

#dlText { color: #81d4fa; }
#ulText { color: #f48fb1; }
#pingText, #jitText { color: #a5d6a7; }

#ipArea {
    margin-top: 2rem;
    color: #757575;
    font-size: 0.9rem;
}

a {
    color: #03dac6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#shareArea {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #1e1e1e;
    border-radius: 8px;
    border: 1px solid #333;
}

#resultsURL {
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    padding: 0.5em;
    width: calc(100% - 1em);
}

/* --- Fixes for Gauge Alignment --- */
div.testArea {
    position: relative;
    width: 100%;
    height: 12.5em;
}

div.testArea canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    z-index: 1;
}

div.testArea div.meterText {
    position: absolute;
    bottom: 1.55em;
    left: 0;
    width: 100%;
    font-size: 2.5em;
    z-index: 9;
}

div.testArea div.unit {
    position: absolute;
    bottom: 2em;
    left: 0;
    width: 100%;
    z-index: 9;
}
/* --- End Fixes --- */


.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

#loading {
    color: #e0e0e0;
}
.loadCircle{
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="45" stroke="%2303dac6" stroke-width="10" fill="none" stroke-dasharray="282.7433388230814" stroke-dashoffset="212.05750411731105" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1s" repeatCount="indefinite" /></circle></svg>');
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-deck {
        flex-direction: column;
        align-items: center;
    }

    .card, .card.gauge-card {
        width: 80%;
        max-width: 320px;
    }
}

@media (max-width: 576px) { /* Extra small devices (phones) */
    .card .meterText {
        font-size: 2rem; /* Reduce font size for small screens */
    }
    div.testArea div.meterText { /* Specific adjustment for absolute positioned text */
        font-size: 2rem;
    }
}

