aiom
Version:
A Highly Flexible and Modular Framework for Behavioral Experiments
315 lines (298 loc) • 6.58 kB
CSS
body, html {
height: 100%;
margin: 0;
font-family: Arial, sans-serif;
background-color: #eee8d5; /* Light blue-gray, suitable for academic context */
}
.container {
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
align-items: center;
}
.question {
display: flex;
flex-direction: column;
font-size: 30px;
font-weight: bold;
margin-bottom: 100px;
color: #2d3748; /* Dark gray for readability */
justify-content: center;
align-items: center;
text-align: center;
}
.text-container {
display: flex;
flex-direction: row; /* horizontal layout */
justify-content: center;
align-items: flex-start;
gap: 50px; /* space between options */
width: 100%;
margin-bottom: 40px;
}
/* Each option: stack text and button vertically, center them */
.option {
display: flex;
flex-direction: column;
align-items: center;
width: 400px; /* fixed width for consistency */
}
/* Style for stimulus text boxes */
#text {
border: 2px solid #8912c0;
border-radius: 8px;
background: #fff;
width: 360px;
height: 200px;
padding: 18px;
font-size: 18px;
color: #2d3748;
margin-bottom: 18px;
overflow-y: auto;
box-sizing: border-box;
text-align: left;
word-break: break-word;
}
#progressBar {
position: fixed;
bottom: 0;
left: 0;
height: 15px;
width: 0%;
background-color: #8912c0; /* Green */
transition: width 0.5s ease;
}
@keyframes fadeOutUp {
from {
opacity: 1;
transform: translateY(0);
}
to {
opacity: 0;
transform: translateY(-100px);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(100px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-out {
animation: fadeOutUp 0.5s forwards;
}
.fade-in {
animation: fadeInDown 0.5s forwards;
}
@keyframes fadeOutRight {
from {
opacity: 1;
transform: translateX(0);
}
to {
opacity: 0;
transform: translateX(100px); /* Move to right when fading out */
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translateX(-100px); /* Start from left when fading in */
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeInBlurScale {
from {
opacity: 0;
filter: blur(8px);
transform: scale(0.9);
}
to {
opacity: 1;
filter: blur(0px);
transform: scale(1);
}
}
.fade-out-horizontal {
animation: fadeOutRight 0.5s forwards;
}
.fade-in-horizontal {
animation: fadeInBlurScale 0.5s forwards;
}
#rest {
display: none; /* Hidden by default */
position: fixed;
z-index: 1000;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
/* display: flex; */
justify-content: center;
align-items: center;
}
#restContent {
background-color: white;
padding: 20px;
border-radius: 5px;
text-align: center;
width: 300px;
}
#continueButton {
margin-top: 10px;
padding: 10px 20px;
font-size: 16px;
border: 3px solid #52c41a;
border-radius: 4px;
}
#continueButton:hover {
cursor: pointer;
border: 3px solid #8912c0;
}
#submit_button {
margin-top: 0;
margin-bottom: 0;
width: 120px;
height: 45px;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
background-color: #ffffff;
border: 2px solid #ffffff;
}
#submit_button:hover {
border: 2px solid #8912c0;
}
#submit_button:disabled {
opacity: 0.65;
cursor: not-allowed;
}
#button_highlight {
border: 2px solid #8912c0;
background-color: #8912c0; /* Purple background */
color: white;
}
#instructions {
display: none; /* Hidden by default */
position: fixed;
z-index: 1000;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
/* display: flex; */
justify-content: center;
align-items: center;
}
#insContent {
background-color: white;
padding: 20px;
border-radius: 5px;
text-align: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
align-items: center;
justify-content: space-between;
width: 80%;
min-height: 300px;
max-height: 90vh;
overflow-y: auto;
overflow-x: hidden;
}
#insContent p {
word-wrap: break-word;
overflow-wrap: break-word;
}
#consentButton {
border: 3px solid #52c41a;
background-color: #52c41a;
width: 100px;
margin-top: 10px;
padding: 5px 20px;
font-size: 16px;
border-radius: 4px;
}
#declineButton {
border: 3px solid #bfc4bc;
background-color: #bfc4bc;
color: #ff4d4f;
width: 150px;
margin-top: 10px;
padding: 5px 20px;
font-size: 16px;
border-radius: 4px;
}
#consentButton:hover, #declineButton:hover {
border: 3px solid #000000;
cursor: pointer;
}
/* ...existing code... */
#rating_slider {
-webkit-appearance: none;
width: 300px;
height: 10px;
background: #e0e0e0;
border-radius: 5px;
outline: none;
margin: 20px 0;
}
/* Chrome, Safari, Opera */
#rating_slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 6px;
height: 28px;
border-radius: 3px;
background: #8912c0;
border: none;
margin-top: -9px; /* Center thumb vertically */
cursor: pointer;
}
/* Firefox */
#rating_slider::-moz-range-thumb {
width: 6px;
height: 28px;
border-radius: 3px;
background: #8912c0;
border: none;
cursor: pointer;
}
/* IE */
#rating_slider::-ms-thumb {
width: 6px;
height: 28px;
border-radius: 3px;
background: #8912c0;
border: none;
cursor: pointer;
}
/* Track styles for all browsers */
#rating_slider::-webkit-slider-runnable-track {
height: 10px;
border-radius: 5px;
background: #e0e0e0;
}
#rating_slider::-moz-range-track {
height: 10px;
border-radius: 5px;
background: #e0e0e0;
}
#rating_slider::-ms-fill-lower,
#rating_slider::-ms-fill-upper {
background: #e0e0e0;
border-radius: 5px;
}
/* Remove outline on focus */
#rating_slider:focus {
outline: none;
}
/* ...existing code... */