body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f0f0;
}
#lottieContainer {
    position: fixed;
    top: 0;
    object-fit: contain;
    left: 0;
    width: 100%; /* Full width of the viewport */
    z-index: -1; /* Push it behind other elements */
    pointer-events: none; /* Prevent interaction with the animation */
}

dotlottie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* Ensures it fills the container without distortion */
    display: block;
}

@media (max-width: 767px) { /* Example breakpoint: typical mobile screen width */
    #lottieContainer {
        height: 100%;
        transform: scale(1.5);
        transform-origin: center; 
        object-fit: contain; 
        width: 100%; /* Add height back for mobile */
    }
}

.container {
    background-color:#15171a;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.10);
    max-width: 800px;
    width: 90%;
}

h1, h2, h3 {
    font-weight: 600;
    color: #dea51f;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

p {
    line-height: 1.7;
    color: #555;
    margin-bottom: 25px;
}

/* Modern Button Styles for CTA, Start, Restart, Lets Find Out */
.cta-button, #startButton, #restartButton, #letsFindOut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background-color: #dea51f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    outline: none;
}

.cta-button:hover, #startButton:hover, #restartButton:hover, #letsFindOut:hover {
    background-color: #998235;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.cta-button:active, #startButton:active, #restartButton:active, #letsFindOut:active {
    transform: scale(0.98);
}

/* Specific styling for Prev/Next buttons (Completely Redone) */
.question-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.question-navigation button {
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f7f7f7;
    background-color: #dea51f; /* Very light gray background */
    border: 1px solid #dea51f; /* Add a border */
    cursor: pointer;
    transition: color 0.3s, transform 0.2s, background-color 0.3s, border-color 0.3s;
    border-radius: 6px;
}

.question-navigation button:hover {
    color: #007bff;
    background-color: #998235; /* Slightly darker gray on hover */
    transform: scale(1.05);
    border-color: #dea51f; /* blue border on hover */
}

.question-navigation button:active {
    color: #0056b3;
    background-color: #dee2e6; /* Even darker gray on active */
    transform: scale(0.95);
}

.question-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #dea51f;
    border-color: #ddd;
    color: #555;
}
/* Select Styles */
select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 250px;
    margin-bottom: 20px;
    font-size: 16px;
    appearance: none;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #007bff;
}

/* Questionnaire Styles */
#questionnaire {
    margin-top: 30px;
    animation: slideIn 0.5s ease-in-out;
}

.question {
    margin-bottom: 30px; /* Increased margin bottom for more spacing between questions */
}

.question p {
    font-weight: 600; /* Slightly less bold */
    font-size: 1.8rem; /* Slightly increased font size */
    margin-bottom: 15px; /* Increased margin bottom for spacing between question and options */
    color: #dea51f; /* Darker text color for question */
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.options-container {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.5s ease-in-out;
}

.option-container {
    display: flex; /* Flexbox for alignment */
    align-items: center; /* Align text and checkboxes vertically */
    position: relative;
    padding-left: 35px; /* Maintain spacing for the custom checkmark */
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 18px;
    color: white;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background-color 0.3s, transform 0.2s;
}

.option-container:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: scale(1.02);
}

.option-container input {
    position: absolute;
    opacity: 0; /* Hide native checkbox */
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%; /* Center the checkmark vertically */
    left: 0;
    transform: translateY(-50%); /* Perfect vertical alignment */
    height: 25px;
    width: 25px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.option-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.option-container input:checked ~ .checkmark {
    background-color: #dea51f;
    border-color: #dea51f;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.option-container input:checked ~ .checkmark:after {
    display: block;
}

.checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.question-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.question-navigation .btn {
    margin: 0 5px;
}

#results {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.7); /* Added semi-transparent black background */
}

.emotion-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    display: none;
}

/* Example for Toska */
#toska-background {
    background-image: url("images/Toska.png");
}
#saudade-background {
    background-image: url("images/Saudade.png");
}
#hiraeth-background {
    background-image: url("images/Hiraeth.png");
}
#mono-no-aware-background {
    background-image: url("images/Mono no aware.png");
}
#sehnsucht-background {
    background-image: url("images/Sehnsucht.png");
}
#forelsket-background {
    background-image: url("images/Forelsket.png");
}
#ubuntu-background {
    background-image: url("images/Ubuntu.png");
}
#wabi-sabi-background {
    background-image: url("images/Wabi-sabi.jpg");
}
#smultronställe-background {
    background-image: url("images/Smultronställe.png");
}
#animosity-background {
    background-image: url("images/Animosity.png");
}
#estrangement-background {
    background-image: url("images/Estrangement.png");
}
#gemütlichkeit-background {
    background-image: url("images/Gemütlichkeit.png");
}

#results.show {
    display: flex;
}

.results-content {
    max-width: 800px;
    width: 90%;
    padding: 10px; /* Match questionnaire padding */
    border-radius: 12px; /* Match questionnaire border-radius */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.5); 
    position: relative; /* Needed for z-index on children */
    z-index: 2; /* Ensure content is above background image */
    color: white; /* Match questionnaire text color */
}

.results-content > * {
    margin-bottom: 20px;
}

.results-content > *:last-child {
    margin-bottom: 0;
}

.results-content h2 {
    text-align: center;
    color: #dea51f; /* Match question text color */
    font-size: 2.5rem; /* Increased size for results heading */
}

.score-display {
    font-size: 3em;
    font-weight: 700;
    color: white; /* Match question text color */
    text-align: center;
}

.dominant-emotion {
    display: block;
    margin-bottom: 10px;
    text-align: center;
    font-size: 2.1em;
    color: #dea51f;
}

.dominant-emotion span {
    display: block;
    text-align: center;
    font-weight: bold;
}

#emotion-general-meaning,
#emotion-origins, #emotion-description {
    font-size: 1.15em;
    font-weight: 550;
    color: white; /* Match option text color */
    line-height: 1.8;
    padding: 25px;
    border-radius: 16px;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    box-sizing: border-box;
    text-align: justify;
}

.results-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.results-buttons button {
    background-color: #dea51f; /* Match button background */
    color: #222831; /* Match button text color */
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
}

.results-buttons button:hover {
    background-color: #c49119; /* Darker gold on hover */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.results-content p strong{
    font-size: 1.2em;
    font-weight: 600;
}


/* Improved Fade-In Animation */
#emotion-description {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Easing function */
}

#emotion-description.show {
    opacity: 1;
    transform: translateY(0);
}


/* Added specific styles for breaks */
#emotion-description br {
    margin-bottom: 1em; /* Add vertical spacing after line breaks */
}
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.results-content p strong{
    font-size: 1.2em;
    font-weight: 600;
}

#relationship-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px; /* Added margin to create space below the title */
}

#relationship-selection h2 {
    margin-bottom: 15px; /* Reduced margin below the title */
}

.relationship-label {
    margin-bottom: 8px; /* Reduced margin below the label */
}

#progress-container {
    width: 100%;
    height: 10px; /* Adjust height as needed */
    background-color: #eee; /* Background color of the container */
    margin-bottom: 20px; /* Space between progress bar and questions */
    border-radius: 5px;
    overflow: hidden; /* Hide overflowing progress */
}

#progress-bar {
    display: none;
}

#progress-bar {
    height: 100%;
    width: 0%; /* Initial width is 0 */
    background-color: #dea51f; /* Green progress color */
    transition: width 0.3s ease-in-out; /* Smooth transition for width changes */
    border-radius: 5px;
}
/* Default styles (for larger screens/desktops) */
body {
    font-size: 14px; /* Base font size */
}

.steps-container {
    flex-direction: row; /* Default layout for larger screens */
}

.step {
    width: 280px;
}

/* Styles for tablets (e.g., screens smaller than 768px) */
@media (max-width: 768px) {
    body {
        font-size: 13px; /* Slightly smaller font size */
    }

    .steps-container {
        flex-direction: column; /* Stack steps vertically */
        align-items: center; /* Center the steps */
    }

    .step {
        width: 90%; /* Make steps take up most of the screen width */
        max-width: 400px; /* Set a maximum width */
    }
}
@media (max-width: 768px) {
  #results {
    /* Adjust padding for better spacing */
    padding: 10px;

    .results-content {
      /* Increase max-width for better content visibility */
      max-width: 100%;

      /* Adjust margin for better positioning */
      margin: 10px auto;
    }
  }
}
/* Styles for mobile phones (e.g., screens smaller than 480px) */
@media (max-width: 480px) {
    body {
        font-size: 12px; /* Even smaller font size */
    }

    .step {
        width: 100%; /* Take up more of the screen width */
    }
}

.share-with-them-message,
.retake-message {
    text-align: center;
    margin-top: 10px; /* Increased margin for better spacing */
    padding: 10px; /* Increased padding */
    border-radius: 16px; /* Match other rounded corners */
    background-color: rgba(0, 0, 0, 0.5); /* Keep semi-transparent black */
    color: white; /* Match other text color */
    border: none; /* Remove border */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Increased box shadow for depth */
    transition: transform 0.2s ease-in-out;
    font-size: 1.15em; /* Match other text size */
    font-weight: 550;
    line-height: 1.8; /* Match other line height */
}


.results-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px; /* Add some top margin */
}

.results-buttons button {
    background-color: #dea51f; /* Gold button background */
    color: #222831; /* Dark text on button */
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease-in-out;
    font-size: 1em; /* Match other text size */
}

.results-buttons button:hover {
    background-color: #c49119; /* Darker gold on hover */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}