html,body{
    border:none; padding:0; margin:0;
    background:#FFFFFF;
    color:#202124; /* slightly cleaner dark text */
}
body{
    text-align:center;
    font-family:"Roboto",sans-serif;
}
h1{
    color:#3c4043;
}
#loading{
    background-color:#FFFFFF;
    color:#3c4043;
    text-align:center;
}

span.loadCircle{
    display:inline-block;
    width:2em;
    height:2em;
    vertical-align:middle;
    background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAP1BMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZyFzwnAAAAFHRSTlMAEvRFvX406baecwbf0casimhSHyiwmqgAAADpSURBVHja7dbJbQMxAENRahnN5lkc//5rDRAkDeRgHszXgACJoKiIiIiIiIiIiIiIiIiIiIiIj4HHspsrpAVhdVVguzrA4OWc10WcEqpwKbnBo0OU1Q5NSpsoJFTgOecrrdEag85DRgktNqfoEdTjnd7hrEHMEJvmRUYJbTYk5Agy6nau6Abp5Cm7mDBtRdPi9gyKdU7w4p1fsLvyqs8hl4z9/w3n/Hmr9WoQ65lAU4d7lMYOz//QboRR5jBZibLMZdAR6O/Vfa1PlxNr3XdS3HzK/HVPRu/KnLs8iAOh993VpRRERERMT/fAN60wwWaVyWwAAAAABJRU5ErkJggg==');
    background-size:2em 2em;
    margin-right:0.5em;
    animation: spin 0.6s linear infinite;
}
@keyframes spin{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(359deg);}
}

/* Start Button — visually modernized but same dimensions */

#startStopBtn {
    display: inline-block;
    margin: 30px auto 0;
    padding: 14px 32px;
    min-width: 220px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #ffffff;
    background-color: #1a73e8;   /* Google blue */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.1s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* Hover */
#startStopBtn:hover {
    background-color: #1765cc;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* Click */
#startStopBtn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

/* Running state (Abort) */
#startStopBtn.running {
    background-color: #d93025;
    color: #ffffff;
}


#startStopBtn:before{
    content:"Begin Speed Test";
}
#startStopBtn.running:before{
    content:"Abort";
}

#serverArea{
    margin-top:1em;
}
#server{
    font-size:1em;
    padding:0.2em;
    border:1px solid #dadce0;
    border-radius:4px;
    background:#ffffff;
}

#test{
    margin-top:2em;
    margin-bottom:0; /* unchanged */
}

/* ===== Layout BELOW IS 100% ORIGINAL ===== */

div.testArea{
    display:inline-block;
    width:16em;
    height:12.5em;
    position:relative;
    box-sizing:border-box;
}
div.testArea2{
    display:inline-block;
    width:14em;
    height:7em;
    position:relative;
    box-sizing:border-box;
    text-align:center;
}
div.testArea div.testName{
    position:absolute;
    top:0.1em; left:0;
    width:100%;
    font-size:1.4em;
    z-index:9;
    color:#5f6368; /* softer label */
}
div.testArea2 div.testName{
    display:block;
    text-align:center;
    font-size:1.4em;
    color:#5f6368;
}
div.testArea div.meterText{
    position:absolute;
    bottom:1.55em; left:0;
    width:100%;
    font-size:2.5em;
    z-index:9;
    color:#202124;
}
div.testArea2 div.meterText{
    display:inline-block;
    font-size:2.5em;
    color:#202124;
}
div.meterText:empty:before{
    content:"0.00";
    color:#9aa0a6;
}
div.testArea div.unit{
    position:absolute;
    bottom:2em; left:0;
    width:100%;
    z-index:9;
    color:#5f6368;
}
div.testArea2 div.unit{
    display:inline-block;
    color:#5f6368;
}
div.testArea canvas{
    position:absolute;
    top:0; left:0; width:100%; height:100%;
    z-index:1;
}
div.testGroup{
    display:block;
    margin:0 auto;
}
#shareArea{
    width:95%;
    max-width:40em;
    margin:0 auto;
    margin-top:2em;
}
#shareArea > *{
    display:block;
    width:100%;
    height:auto;
    margin:0.25em 0;
}

#privacyPolicy{
    position:fixed;
    top:2em;
    bottom:2em;
    left:2em;
    right:2em;
    overflow-y:auto;
    width:auto;
    height:auto;
    box-shadow:0 10px 40px rgba(0,0,0,0.2); /* softened */
    z-index:999999;
    text-align:left;
    background-color:#FFFFFF;
    padding:1em;
}
a.privacy{
    text-align:center;
    font-size:0.8em;
    color:#5f6368;
    padding:0 3em;
}

/* Animations untouched */
div.visible{
    animation: fadeIn 0.4s;
    display:block;
}
div.hidden{
    animation: fadeOut 0.4s;
    display:none;
}
@keyframes fadeIn{
    0%{opacity:0;}
    100%{opacity:1;}
}
@keyframes fadeOut{
    0%{display:block;opacity:1;}
    100%{display:block;opacity:0;}
}


/* Speed Test Card Container */
#testWrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 10px 30px 50px;
    background: #ffffff;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    transition: box-shadow 0.2s ease;
}

/* Subtle hover elevation (optional) */
#testWrapper:hover {
    box-shadow: 0 4px 12px rgba(32,33,36,.35);
}

/* ===== DARK MODE REMOVED ENTIRELY ===== */
