/* ========================================
   FONT FACES
   ======================================== */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/roboto-v30-latin-regular.eot");
    src: local(""),
         url("../fonts/roboto-v30-latin-regular.eot?#iefix") format("embedded-opentype"),
         url("../fonts/roboto-v30-latin-regular.woff2") format("woff2"),
         url("../fonts/roboto-v30-latin-regular.woff") format("woff"),
         url("../fonts/roboto-v30-latin-regular.ttf") format("truetype"),
         url("../fonts/roboto-v30-latin-regular.svg#Roboto") format("svg");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/roboto-v30-latin-500.eot");
    src: local(""),
         url("../fonts/roboto-v30-latin-500.eot?#iefix") format("embedded-opentype"),
         url("../fonts/roboto-v30-latin-500.woff2") format("woff2"),
         url("../fonts/roboto-v30-latin-500.woff") format("woff"),
         url("../fonts/roboto-v30-latin-500.ttf") format("truetype"),
         url("../fonts/roboto-v30-latin-500.svg#Roboto") format("svg");
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
    font-size: 16px;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    background-color: #f5f5f5;
    font-family: "Roboto", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* ========================================
   HIDDEN ELEMENTS
   ======================================== */
.Credits,
.ConnectError {
    display: none;
}

/* ========================================
   LOADING SCREEN
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    text-align: center;
}

.spinner > div {
    width: 20px;
    height: 20px;
    background-color: #2196f3;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

.spinner .bounce3 {
    animation-delay: 0s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ========================================
   HEADER STYLES
   ======================================== */
.app-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #14b0fe 0%, #56c4fb 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.app-header .logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.app-header .slogan {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 400;
}

/* ========================================
   NETWORK INFO PANEL
   ======================================== */
.network-info-panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    padding: 12px 20px;
    text-align: center;
    font-size: 13px;
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.network-info-panel span {
    font-weight: 500;
}

/* ========================================
   APP CONTAINER
   ======================================== */
.openSpeedtestApp {
    height: calc(100vh - 200px);
    width: 100vw;
    display: none;
    overflow: hidden;
    position: relative;
}

/* ========================================
   MOBILE & DESKTOP UI
   ======================================== */
.Mobile,
.Desktop {
    visibility: hidden;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.speedtest-gauge {
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 500px;
}

/* Landscape (Desktop) */
@media only screen and (orientation: landscape) {
    .Mobile {
        visibility: hidden;
        display: none;
    }
    
    .Desktop {
        visibility: visible;
        display: flex;
        padding-top: 120px;
        padding-bottom: 140px;
    }
    
    #UI-Desk {
        display: block;
        height: calc(100vh - 260px);
    }
}

@media only screen and (orientation: landscape) and (max-height: 500px) {
    .Desktop {
        padding-top: 80px;
        padding-bottom: 100px;
    }
    
    #UI-Desk {
        height: calc(100vh - 180px);
    }
}

/* Portrait (Mobile) */
@media only screen and (orientation: portrait) {
    .Mobile {
        visibility: visible;
        display: flex;
        padding-top: 100px;
        padding-bottom: 120px;
    }
    
    .Desktop {
        visibility: hidden;
        display: none;
    }
    
    #UI-Mob {
        display: block;
        height: calc(100vh - 220px);
    }
}

@media only screen and (max-width: 300px) {
    .Credits {
        display: none;
    }
}

/* ========================================
   SVG GAUGE ELEMENTS
   ======================================== */
.main-Gaugebg {
    fill: none;
    stroke: #e7e7e8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 22px;
    stroke-dasharray: 681;
}

.main-GaugeBlue {
    fill: none;
    stroke: url(#gradient);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 22px;
    stroke-dasharray: 681;
    stroke-opacity: 0;
    transition: stroke-opacity 0.3s ease;
}

.main-GaugeWhite {
    fill: none;
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 15px;
    stroke-dasharray: 0, 681;
    stroke-dashoffset: 1;
    stroke-opacity: 0;
}

/* ========================================
   SVG TEXT ELEMENTS
   ======================================== */
.oDo-Meter {
    font-size: 16.63px;
    fill: #808080;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
}

.oDoLive-Speed {
    font-size: 28px;
    fill: #201e1e;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
}

.oDoLive-Status {
    font-size: 10px;
    fill: #d2d1d2;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
}

.oDoTop-Speed {
    font-size: 16.96px;
    fill: #808080;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: end;
}

/* ========================================
   SVG UI ELEMENTS
   ======================================== */
.uiBg {
    fill: #d2d1d2;
}

.Cards {
    fill: transparent;
}

.Symbol {
    fill: url(#gradient);
}

.progressbg {
    stroke: #e7e7e8;
    stroke-width: 8px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 0;
}

.intro-Progress,
.progressElmstart {
    stroke: #56c4fb;
    stroke-width: 8px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400;
    stroke-dashoffset: 0;
}

.progressElmstart {
    display: block;
}

.deskStart {
    fill: none;
    stroke: #e7e7e8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 22px;
    stroke-dasharray: 681;
}

/* ========================================
   SVG TEXT LABELS
   ======================================== */
.rtext {
    font-size: 12px;
    fill: #333333;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
}

.rtextnum {
    font-size: 23px;
    fill: #201e1e;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
}

.rtextmbms {
    font-size: 12px;
    fill: #5f5f5f;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
}

.jitter-Mob {
    font-size: 9px;
    fill: #5f5f5f;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
}

/* ========================================
   BUTTONS
   ======================================== */
.startButton {
    fill: url(#RadialGradient1);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    pointer-events: visible;
    transition: opacity 0.2s ease;
}

.startButton:hover {
    opacity: 0.9;
}

.buttonTxt {
    font-size: 40px;
    fill: #ffffff;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
    pointer-events: none;
}

.Startsettings {
    fill: url(#RadialGradient1);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    pointer-events: visible;
    opacity: 0.1;
    transition: opacity 1s ease-in-out;
}

.Startsettings:hover {
    opacity: 1;
}

/* ========================================
   IP DISPLAY
   ======================================== */
#ipMob,
#ipDesk {
    font-size: 15px;
    fill: #201e1e;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    text-anchor: middle;
    display: none;
}

#upSymbolDesk,
#downSymbolDesk,
#upSymbolMob,
#downSymbolMob {
    fill: #14b0fe;
    display: none;
}

/* ========================================
   DARK MODE TOGGLE BUTTON
   ======================================== */
.darkmode-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, #14b0fe 0%, #56c4fb 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(20, 176, 254, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.darkmode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 176, 254, 0.6);
}

.darkmode-toggle:active {
    transform: translateY(0);
}

.toggle-icon {
    font-size: 18px;
}

.toggle-text {
    font-size: 13px;
}

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
    text-align: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.footer-copyright {
    color: #333333;
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: 500;
}

.misntv-slogan {
    color: #666666;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media only screen and (max-width: 768px) {
    .app-header h1 {
        font-size: 20px;
    }
    
    .app-header .slogan {
        font-size: 12px;
    }
    
    .network-info-panel {
        font-size: 11px;
        padding: 10px 15px;
    }
    
    .darkmode-toggle {
        bottom: 70px;
        padding: 10px 16px;
    }
}

@media only screen and (max-width: 480px) {
    .app-header .logo {
        max-width: 150px;
    }
    
    .app-header h1 {
        font-size: 18px;
    }
    
    .darkmode-toggle {
        bottom: 65px;
        right: 15px;
        padding: 8px 14px;
    }
    
    .toggle-text {
        display: none;
    }
    
    .toggle-icon {
        font-size: 20px;
    }
}