/* 
   MSAK SPEED TEST - CUSTOM STYLES

   TABLE OF CONTENTS
   1. CSS Variables
   2. Base & Layout
   3. Animations & Keyframes
   4. Charts & Results
   5. Cards & Grid
   6. Buttons & CTAs
   7. Progress Bars & Indicators
   8. Server Picker
   9. Form Elements
   10. Hero & Header
   11. Utility Classes
   12. Media Queries

*/

/* 
    1. CSS VARIABLES  
*/
:root {
    /* Colors */
    --primary-blue: #003065;
    --primary-gold: #f3b75c;
    --download-blue: #2689f3;
    --upload-green: #42b35c;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    --gray-light: #e0e0e0;
    --gray-border: #e5e7eb;
    --text-dark: #333;
    --text-slate: #334155;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-out;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3);
    
    /* Border Radius */
    --radius-sm: 3px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-full: 9999px;
}

/* 
   2. BASE & LAYOUT
*/
   body {
    background-color: var(--light-bg);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
}

.content.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px;
    min-height: 600px;
    position: relative;
}

header h1 {
    font-size: 24px;
    font-weight: bold;
}

.container2 {
    max-width: 85%;
    margin: auto;
    margin-top: 30px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    justify-content: center;
    align-items: center;
}

/* 
   3. ANIMATIONS & KEYFRAMES
*/

/* Moving Bar Animation */
#moving-bar {
    animation-play-state: paused;
    max-width: 100%;
    overflow: hidden;
    transition: width var(--transition-normal);
}

@keyframes moveBar {
    0% { left: 0; }
    50% { left: calc(100% - 50px); }
    100% { left: 0; }
}

/* Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* Ripple Animation */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Fade In Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle Pulse */
@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
    }
}

/* 
   4. CHARTS & RESULTS
*/

.chart-container {
    max-width: 75%;
    width: 100%;
    height: 120px;
    position: relative;
}

.chart-container canvas {
    max-width: 100%;
    height: 100%;
}

.result-label {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
}

#results {
    display: block;
    margin: 20px auto;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    max-width: 600px;
    text-align: left;
}

#results p {
    margin: 10px 0;
    font-size: 16px;
}

/* 
   5. CARDS & GRID
*/

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 30px;
    padding-top: 20px;
}

.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transform: translateY(10px);
    opacity: 0;
    transition: all var(--transition-slow);
    padding: 20px;
    border-left: 4px solid;
}

#grid-results .card {
    opacity: 1;
    transform: translateY(0);
    transition: all var(--transition-slow);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.icon-container {
    padding: 12px;
    border-radius: var(--radius-lg);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
}

.card-value {
    display: flex;
    align-items: baseline;
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
}

.value {
    font-size: 28px;
    font-weight: bold;
}

.unit {
    margin-left: 5px;
    font-size: 16px;
    color: gray;
}

/* Dual (West + East) combined result display */
.dual-result {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1;
}

.dual-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.dual-label {
    font-size: 0.6rem;
    font-weight: 800;
    opacity: 0.45;
    min-width: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dual-num {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.dual-unit {
    font-size: 0.8rem;
    color: gray;
    font-weight: 400;
}

.value.has-dual {
    display: block;
}

/* Card Color Variants */
.border-blue { border-color: #3b82f6; }
.border-green { border-color: #10b981; }
.border-purple { border-color: #8b5cf6; }
.border-amber { border-color: #f59e0b; }
.border-gray { border-color: #6b7280; }

.bg-blue { background-color: #dbeafe; }
.bg-green { background-color: #d1fae5; }
.bg-purple { background-color: #ede9fe; }
.bg-amber { background-color: #fef3c7; }
.bg-gray { background-color: #e5e7eb; }

.svg.blue { color: #3b82f6; }
.svg.green { color: #10b981; }
.svg.purple { color: #8b5cf6; }
.svg.amber { color: #f59e0b; }


/* 
   6. BUTTONS & CTAs
*/

/* Button Container */
#start-test-container {
    margin-top: 50px;
    height: auto;
}

.button-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px;
}

/* Start Button */
.btn-start {
    background-color: var(--primary-blue);
    color: var(--white);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-lg);
    transition: background-color var(--transition-normal), transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    animation: float 2s infinite ease-in-out;
    padding: 0;
}

.btn-start:hover {
    background-color: green;
    border: 4px solid var(--white);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(30, 58, 136, 0.2);
    z-index: 1;
    animation: ripple 1.5s infinite ease-out;
}

/* Download Button */
.btn-download {
    background: transparent;
    color: var(--download-blue);
    font-size: 1.5rem;
    font-weight: bold;
    height: 70px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: not-allowed;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 65px;
}

.btn-download i {
    font-size: 1.5rem;
}

/* Upload Button */
.btn-upload {
    background: transparent;
    color: var(--upload-green);
    font-size: 1.5rem;
    font-weight: bold;
    height: 70px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: not-allowed;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 65px;
}

.btn-upload i {
    font-size: 1.5rem;
}

/* Again Button */
.btn-again {
    background-color: var(--primary-blue);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    width: 250px;
    height: 70px;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    animation: fadeInScale 1s ease-out forwards;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    margin-top: 75px;
    gap: 8px;
    transition: background-color var(--transition-normal), transform var(--transition-fast);
}

.btn-again i {
    font-size: 1.5rem;
}

.btn-again:hover {
    background-color: rgb(4, 141, 4);
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* Finished Display */
.finished-display {
    margin-top: 12px;
    padding: 10px 14px;
    background-color: #cdcdcd33;
    border: 0.5px solid #cbcbcb;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-slate);
    box-shadow: var(--shadow-sm);
    text-align: center;
    min-width: 200px;
    margin-bottom: 0.5rem;
}

/* 
   7. PROGRESS BARS and INDICATORS
*/

.progress-bar {
    margin-top: 10px;
    height: 6px;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-sm);
}

.progress-fill.blue { background-color: #3b82f6; }
.progress-fill.green { background-color: #10b981; }
.progress-fill.purple { background-color: #8b5cf6; }
.progress-fill.amber { background-color: #f59e0b; }


/* 
   8. SERVER PICKER
*/

.server-picker {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.server-label {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.server-toggle {
    display: flex;
    gap: 0.35rem;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.server-option {
    position: relative;
}

.server-option input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.server-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text-slate);
    line-height: 1;
    transition: background-color var(--transition-fast), 
                color var(--transition-fast), 
                box-shadow var(--transition-fast), 
                transform 0.05s ease;
}

.server-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.server-main {
    font-weight: 700;
    font-size: 0.9rem;
}

.server-sub {
    font-weight: 500;
    opacity: 0.75;
    font-size: 0.78rem;
    margin-top: 1px;
}

.rec-tag {
    margin-left: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: #fde68a;
    color: #7c5600;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
}

/* Selected State */
.server-option input:checked + .server-chip {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 48, 101, 0.25);
}

.server-option input:checked + .server-chip .server-sub {
    color: #e5e7eb;
    opacity: 0.9;
}

/* Hover & Active */
.server-option:hover .server-chip {
    transform: translateY(-1px);
}

.server-option:active .server-chip {
    transform: translateY(0);
}

/* Disabled */
.server-toggle.disabled {
    opacity: 0.7;
    pointer-events: none;
    filter: grayscale(0.3);
}

.server-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.server-header i {
    font-size: 1.1rem;
}

/* Picker Positioning */
.test-card {
    position: relative;
}

#server-picker {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    z-index: 10;
}

#server-picker .server-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1rem;
}

#server-picker .server-toggle {
    display: flex;
    gap: 0.35rem;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-full);
    padding: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#server-picker.picker-pinned {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    z-index: 10;
}

#server-picker.picker-inline {
    position: static;
    transform: none;
    margin-top: 25px;
    margin-bottom: 35px;
}

.is-hidden {
    display: none !important;
}


/* 
   9. FORM ELEMENTS
*/

.fi-fo-field-wrp {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cleared-address-field input {
    background: #fefefe !important;
}

.cleared-address-field .fi-input-wrp-prefix {
    background-color: var(--white) !important;
}

.cleared-address-field .fi-input-wrp-suffix {
    background-color: var(--white) !important;
}

.cleared-address-field ~ .fi-fo-helper-text {
    color: #ef4444 !important;
    font-weight: 500;
}

input[disabled] {
    cursor: not-allowed;
    opacity: 1 !important;
}

.fi-input-wrp-suffix button {
    transition: all var(--transition-fast);
}

.fi-input-wrp-suffix button:hover {
    transform: scale(1.1);
}

.fi-input-wrp-suffix button:active {
    transform: scale(0.95);
}

.fi-fo-helper-text {
    animation: fadeIn var(--transition-normal);
}

.fi-input:focus-within {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    transition: box-shadow var(--transition-fast);
}

/* 
   10. HERO and HEADER
*/

.page-header.hero {
    position: relative;
    background: linear-gradient(172deg, #002e58 46.22%, #f3b75c);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.page-header.hero .hero__overlay {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
}

.hero__title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

.page-header__image-wrapper {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 
   11. UTILITY CLASSES
*/

.transition-all {
    transition: all var(--transition-slow);
}

.d-none {
    display: none;
}

.my-4-custom {
    margin-top: 0;
    margin-bottom: 1.5rem !important;
}

.fa-regular {
    font-size: 1.5rem;
}

/* Spinner */
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(243, 244, 246, 0.45);
    z-index: 1000;
}

.spinner {
    height: 70px;
    width: 70px;
    color: var(--primary-blue);
}

/* iFrame Overlay */
.iframe-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--white);
    flex-direction: column;
    padding-right: 10rem;
    border-radius: var(--radius-lg);
}

.iframe-container {
    position: relative;
}

/* VPN Badge */
#vpn-badge {
    animation: fadeIn 0.4s ease-in, subtlePulse 2s ease-in-out infinite;
}

/* 
   12. MEDIA QUERIES
*/

/* Mobile (max-width: 640px) */
@media (max-width: 640px) {
    .server-sub {
        display: none;
    }

    #server-picker {
        bottom: 10px !important;
        gap: 0.3rem !important;
    }

    #server-picker .server-sub {
        display: none;
    }

    #server-picker .server-header {
        font-size: 0.85rem !important;
        gap: 0.35rem !important;
        margin-bottom: 0.3rem !important;
    }

    #server-picker .server-header i {
        font-size: 0.95rem !important;
    }

    #server-picker .server-toggle {
        gap: 0.25rem !important;
        padding: 0.2rem !important;
    }

    .server-chip {
        padding: 0.4rem 0.65rem !important;
        gap: 0.4rem !important;
    }

    .server-chip i {
        font-size: 0.85rem !important;
    }

    .server-main {
        font-size: 0.78rem !important;
    }

    .rec-tag {
        font-size: 0.6rem !important;
        padding: 0.08rem 0.3rem !important;
        margin-left: 0.2rem !important;
    }

    .content.container {
        min-height: 420px !important;
    }

    #isp-info,
    #server-info {
        top: 8px !important;
    }

    #isp-info i,
    #server-info i {
        font-size: 1.15rem !important;
    }

    #isp-text-wrapper,
    #server-text-wrapper {
        margin-left: 7px !important;
    }

    #isp-text,
    #isp-ip,
    #server-location-text,
    #server-region-text {
        font-size: 14px !important;
    }

    #server-label {
        font-size: 15px !important;
    }

    #connection-line {
        height: 7px !important;
    }

    #moving-bar {
        height: 7px !important;
        width: 32px !important;
    }

    .btn-download,
    .btn-upload,
    .btn-again {
        margin-top: 50px !important;
    }

    .test-content {
        transform: none !important;
    }

    .btn-again {
        width: 160px !important;
        height: 46px !important;
        font-size: 1rem !important;
    }

    .btn-again i {
        font-size: 1rem !important;
    }

    .btn-start {
        width: 150px !important;
        height: 150px !important;
    }

    #start-btn-text {
        font-size: 1.05rem !important;
    }

    #start-btn-powered {
        font-size: 6px !important;
    }

    #start-btn-play {
        font-size: 12px !important;
    }

    .ripple-effect {
        width: 170px !important;
        height: 170px !important;
    }

    .chart-container {
        height: 95px !important;
    }

    #chart-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .finished-display {
        font-size: 13px !important;
        padding: 7px 10px !important;
        margin-top: 8px !important;
        min-width: 0 !important;
    }

    .grid-container {
        gap: 10px !important;
        padding-top: 8px !important;
    }

    .card {
        padding: 12px !important;
    }

    .card-header {
        margin-bottom: 10px !important;
    }

    .icon-container {
        padding: 8px !important;
        margin-right: 8px !important;
    }

    .icon-wrapper {
        width: 22px !important;
        height: 22px !important;
    }

    .svg {
        width: 18px !important;
        height: 18px !important;
    }

    .title {
        font-size: 14px !important;
    }

    .value {
        font-size: 19px !important;
    }

    .unit {
        font-size: 12px !important;
    }

    .dual-num {
        font-size: 1.1rem !important;
    }

    .dual-label {
        font-size: 0.55rem !important;
    }

    .dual-unit {
        font-size: 0.7rem !important;
    }
}

/* Small Mobile (max-width: 480px) — overrides the 640px block above for narrower screens */
@media (max-width: 480px) {
    .spinner {
        height: 40px;
        width: 40px;
    }

    .iframe-overlay {
        font-size: 1rem;
        padding-right: 1rem;
    }

    .content.container {
        min-height: 380px !important;
    }

    #server-picker {
        bottom: 8px !important;
        gap: 0.25rem !important;
    }

    #server-picker .server-header {
        font-size: 0.78rem !important;
        gap: 0.3rem !important;
        margin-bottom: 0.2rem !important;
    }

    #server-picker .server-header i {
        font-size: 0.85rem !important;
    }

    #server-picker .server-toggle {
        gap: 0.2rem !important;
        padding: 0.15rem !important;
    }

    .server-chip {
        padding: 0.32rem 0.55rem !important;
        gap: 0.3rem !important;
    }

    .server-chip i {
        font-size: 0.75rem !important;
    }

    .server-main {
        font-size: 0.7rem !important;
    }

    .rec-tag {
        font-size: 0.55rem !important;
        padding: 0.06rem 0.25rem !important;
        margin-left: 0.15rem !important;
    }

    #isp-info,
    #server-info {
        top: 6px !important;
    }

    #isp-info i,
    #server-info i {
        font-size: 1rem !important;
    }

    #isp-text-wrapper,
    #server-text-wrapper {
        margin-left: 6px !important;
    }

    #isp-text,
    #isp-ip,
    #server-location-text,
    #server-region-text {
        font-size: 12px !important;
    }

    #server-label {
        font-size: 13px !important;
    }

    #connection-line {
        height: 6px !important;
    }

    #moving-bar {
        height: 6px !important;
        width: 26px !important;
    }

    .btn-download,
    .btn-upload,
    .btn-again {
        margin-top: 30px !important;
    }

    .test-content {
        transform: none !important;
    }

    .btn-again {
        width: 140px !important;
        height: 42px !important;
        font-size: 0.9rem !important;
    }

    .btn-again i {
        font-size: 0.9rem !important;
    }

    .btn-start {
        width: 130px !important;
        height: 130px !important;
    }

    #start-btn-text {
        font-size: 0.9rem !important;
    }

    #start-btn-powered {
        font-size: 5px !important;
    }

    #start-btn-play {
        font-size: 10px !important;
    }

    .ripple-effect {
        width: 145px !important;
        height: 145px !important;
    }

    .chart-container {
        height: 80px !important;
    }

    .finished-display {
        font-size: 12px !important;
        padding: 6px 8px !important;
        margin-top: 6px !important;
        min-width: 0 !important;
    }

    .grid-container {
        gap: 8px !important;
        padding-top: 6px !important;
    }

    .card {
        padding: 10px !important;
    }

    .card-header {
        margin-bottom: 8px !important;
    }

    .icon-container {
        padding: 6px !important;
        margin-right: 6px !important;
    }

    .icon-wrapper {
        width: 18px !important;
        height: 18px !important;
    }

    .svg {
        width: 15px !important;
        height: 15px !important;
    }

    .title {
        font-size: 12.5px !important;
    }

    .value {
        font-size: 17px !important;
    }

    .unit {
        font-size: 11px !important;
    }

    .dual-num {
        font-size: 0.95rem !important;
    }

    .dual-label {
        font-size: 0.5rem !important;
    }

    .dual-unit {
        font-size: 0.65rem !important;
    }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    header h1 {
        font-size: 20px;
    }

    #results p {
        font-size: 14px;
    }

    .content.container {
        min-height: 520px;
    }

    #start-test-container {
        height: auto;
        margin-top: 0;
        margin-bottom: 0;
        padding: 10px 0;
    }

    .grid-container {
        gap: 15px;
        padding-top: 10px;
    }

    .card {
        padding: 15px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .title {
        font-size: 16px;
    }

    .value {
        font-size: 24px;
    }

    .unit {
        font-size: 14px;
    }

    .btn-download,
    .btn-upload,
    .btn-again {
        width: 180px;
        height: 50px;
        font-size: 1.1rem;
        margin-top: 120px;
    }

    .chart-container {
        max-width: 100%;
        height: 120px;
    }

    .spinner {
        height: 50px;
        width: 50px;
    }

    .iframe-overlay {
        font-size: 1.2rem;
        padding: 1rem;
        padding-right: 1rem;
    }

    .fa-regular {
        font-size: 1.1rem;
    }

    .ripple-effect {
        width: 200px;
        height: 200px;
    }

    .btn-start {
        border-radius: 50%;
        width: 180px;
        height: 180px;
        font-size: 1.1rem;
    }

    #server-text-wrapper {
        max-width: 130px;
        word-wrap: break-word;
        word-break: break-word;
    }

    .global-header__site-search-wrapper {
        display: none !important;
    }

    #vpn-badge {
        margin-top: 4px;
        padding: 3px 8px;
    }

    #vpn-badge span {
        font-size: 11px !important;
    }

    #vpn-badge i {
        font-size: 11px !important;
    }
}

/* Desktop Small (min-width: 640px) */
@media (min-width: 640px) {
    .btn-start {
        width: 200px;
        height: 200px;
        border: 3.5px solid var(--white);
    }
}

/* Desktop Medium (min-width: 768px) */
@media (min-width: 768px) {
    .btn-start {
        width: 220px;
        height: 220px;
    }
}

/* Desktop Large (min-width: 1024px) */
@media (min-width: 1024px) {
    .btn-start {
        width: 250px;
        height: 250px;
        border: 4px solid var(--white);
    }
}