/* Custom styling for eye test application */
body {
    padding-top: 56px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.test-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.test-canvas {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-dark);
}

.controls-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: rgba(var(--bs-dark-rgb), 0.05);
    border-radius: 0.5rem;
}

.slider-container {
    margin: 1rem 0;
}

.webcam-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 5px;
    border: 2px solid var(--bs-primary);
}

#webcam-video {
    width: 100%;
    transform: scaleX(-1); /* Mirror the camera */
}

.eye-test-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.eye-test-card:hover {
    transform: translateY(-5px);
}

.image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    border-radius: 0.375rem;
}

footer {
    margin-top: auto;
    padding: 1.5rem 0;
    text-align: center;
}

/* For 3D elements */
.three-container {
    width: 100%;
    height: 400px;
    margin: 1rem auto;
    background-color: var(--bs-dark);
}

.test-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.peripheral-target {
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: red;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20; /* Above grid and fixation dot */
}

.motion-object {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--bs-primary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.navbar-brand img {
    height: 80px;
    width: auto;
}

.pattern-item {
    display: inline-block;
    width: 50px;
    height: 50px;
    margin: 5px;
    background-color: var(--bs-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pattern-item.different {
    background-color: var(--bs-info);
}

#peripheral-container {
    background-color: white !important;
    background-image:
        linear-gradient(to right, black 1px, transparent 1px),
        linear-gradient(to bottom, black 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    overflow: hidden;
}
#fixation-point {
  position: absolute;
  width: 12px;
  height: 12px;
  background: black;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.test-toggle-checkbox {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 1000;
}
