/* Default Night Mode Styles */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: all 0.3s ease;
}

.speed-test {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background: #1c1c1c;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    text-align: center;
}

button {
    padding: 10px 20px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #666;
}

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

/* Loader styles */
.loader {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

/* Graph styles */
.graph {
    width: 100%;
    height: 20px;
    background-color: #444;
    margin-top: 10px;
    border-radius: 5px;
    position: relative;
}

.graph > div {
    height: 100%;
    background-color: #4caf50; /* Green for download/upload speed */
    border-radius: 5px;
}

/* Keyframes for the loader animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 600px) {
    .speed-test {
        margin: 20px;
        padding: 15px;
    }

    button {
        width: 100%;
        font-size: 18px;
    }

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