body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

.container {
    width: 100%;
}

/* Make grid images responsive */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive grid */
    gap: 15px;
    width: 90vw;
    max-width: 1200px;
    margin-top: 20px;
}

/* Each emotion block (title + image) */
.option {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
}

/* Emotion Name Styling */
.option h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Adjusting images to be fully responsive */
.option img {
    width: 100%;
    height: auto; /* Keeps aspect ratio */
    max-width: 250px; /* Prevents excessive stretching */
    border-radius: 10px;
}

.option.selected {
    border-color: #4caf50;
}

.option.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Emotion Level Selector */
#level-container {
    margin-top: 20px;
    display: none;
    text-align: center;
    width: 100%;
}

#level-container label {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

#level-range {
    width: 80%;
    max-width: 300px;
    margin-top: 10px;
}

/* Center Confirmation Button */
#confirm-button {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 18px;
    background-color: gray;
    color: white;
    border: none;
    cursor: not-allowed;
    border-radius: 5px;
    transition: background 0.3s;
    display: block;
    margin-left: auto;
    margin-right: auto; /* Centers the button */
    text-align: center;
}

/* When enabled */
#confirm-button.enabled {
    background-color: #4caf50;
    cursor: pointer;
}

#confirm-button.enabled:hover {
    background-color: #388e3c;
}

/* Toggle Button */
.toggle-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    text-align: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}
