/* General Styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #121212;
    color: #ffffff;
    font-family: Arial, sans-serif;
}

body.theme-light {
    background: #f6f7fa;
    color: #18191a;
}
body.theme-light .button-column,
body.theme-light .info-box {
    background: #fff;
    color: #18191a;
    box-shadow: 0 2px 12px #0001;
}
body.theme-light .btn {
    background: #2196f3;
    color: #fff;
}
body.theme-light .btn:hover {
    background: #1565c0;
}
body.theme-light .info-box h2,
body.theme-light .info-box p strong {
    color: #1976d2;
}
body.theme-light aside {
    background: #f3f6fa;
    color: #18191a;
    box-shadow: 0 2px 12px #0001;
}
body.theme-light aside ol li a {
    color: #1976d2;
}
body.theme-light aside ol li a:hover {
    color: #111;
    text-shadow: 0 2px 8px #1976d255;
}

/* Containers */
.test-container,
.dashboard-container {
    text-align: center;
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
}

.dashboard-container-split {
    display: flex;
    gap: 20px;
    width: 90%;
    max-width: 1000px;
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.button-column {
    flex: 1;
    text-align: center;
}

.info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-box {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
}

.info-box h2 {
    margin-top: 0;
    font-size: 20px;
    color: #007bff;
}

.info-box p {
    margin: 10px 0;
    color: #cccccc;
}

.info-box strong {
    color: #ffffff;
}

/* Headings */
h1 {
    margin-bottom: 20px;
    font-size: 28px;
    color: #ffffff;
}

/* Description */
p {
    font-size: 16px;
    color: #cccccc;
    margin: 10px 0;
}

/* Button Groups */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    font-size: 16px;
    color: #ffffff;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Latency Box */
.latency-box {
    margin: 20px auto;
    width: 150px;
    height: 150px;
    background-color: #121212;
    border: 3px solid #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Result Display */
.result {
    font-size: 18px;
    color: #cccccc;
    margin-top: 20px;
}

.result span {
    font-weight: bold;
    color: #ffffff;
}

/* Notification Messages */
.message {
    margin-top: 20px;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
    display: none;
}

.message.success {
    color: #ffffff;
    background-color: #28a745;
}

.message.error {
    color: #ffffff;
    background-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .latency-box {
        width: 120px;
        height: 120px;
    }

    h1 {
        font-size: 24px;
    }

    p {
        font-size: 14px;
    }
}

/* Test Image */
.image-container {
    margin: 20px auto;
    width: 100%;
    max-width: 400px;
    border: 3px solid #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

/* Test Overlay */
.test-overlay {
    position: absolute;
    font-size: 7vw;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
    transition: top 5s ease-in-out, left 5s ease-in-out, color 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
}

/* Brightness Slider */
input[type="range"] {
    width: 80%;
    margin: 20px auto;
    display: block;
    -webkit-appearance: none;
    background: #1e1e1e;
    height: 5px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

/* Info Container Styles */
.info-container {
    text-align: center;
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
}

.screen-info {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.screen-info p {
    margin: 10px 0;
    font-size: 16px;
}

.screen-info strong {
    color: #007bff;
}

.instructions {
    text-align: left;
    margin: 20px 0;
}

.instructions h2 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 20px;
}

.instructions ol {
    margin: 15px 0;
    padding-left: 20px;
}

.instructions li {
    margin: 10px 0;
    color: #cccccc;
}

.instructions ul {
    margin: 10px 0;
    padding-left: 20px;
}

.instructions ul li {
    margin: 5px 0;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    vertical-align: middle;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.theme-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #222;
    border-radius: 20px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    font-size: 1.2em;
}
.theme-switch .icon-moon {
    color: #f7c948;
    pointer-events: none;
}
.theme-switch .icon-sun {
    color: #f9d923;
    pointer-events: none;
}
.theme-switch .slider:before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px #0002;
    transition: transform 0.3s, background 0.3s;
}
.theme-switch input:checked + .slider {
    background: #e3e3e3;
}
.theme-switch input:checked + .slider:before {
    transform: translateX(28px);
    background: #2196f3;
}

/* Color field for View Angle Test */
.color-box {
    width: 100%;
    height: 220px;
    margin: 30px 0 30px 0;
    border-radius: 12px;
    border: 3px solid #444;
    background: #222;
    box-shadow: 0 2px 12px #0005;
    transition: background 0.3s;
}
@media (max-width: 600px) {
    .color-box {
        height: 120px;
    }
}