* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress Section */
.progress-section {
    margin-bottom: 40px;
}

.progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 14px;
    color: #999;
    text-align: center;
}

/* Form Pages */
.form-page {
    display: none !important;
    animation: fadeIn 0.3s ease-out;
}

.form-page.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 16px;
    font-weight: 700;
}

h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.subtitle {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

.hook-details {
    margin: 24px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.hook-details p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
}

.hook-details p:last-child {
    margin-bottom: 0;
}

.hook-details strong {
    color: #667eea;
}

.hint {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    margin-bottom: 16px;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Form Slider */
.form-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    margin-bottom: 16px;
}

.form-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.form-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-bottom: 20px;
}

#sliderValue {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

/* Radio Buttons */
.radio-group,
.checkbox-group {
    margin-bottom: 20px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: #667eea;
    background-color: #f5f7ff;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 12px;
    accent-color: #667eea;
}

.radio-label input[type="radio"]:checked ~ span,
.checkbox-label input[type="checkbox"]:checked ~ span {
    font-weight: 600;
    color: #667eea;
}

.radio-label input[type="radio"]:checked,
.checkbox-label input[type="checkbox"]:checked {
    accent-color: #667eea;
}

.radio-label input[type="radio"]:checked + span,
.checkbox-label input[type="checkbox"]:checked + span {
    color: #667eea;
}

.radio-label span,
.checkbox-label span {
    font-size: 15px;
    color: #333;
    transition: color 0.3s;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-back,
.btn-next,
.btn-submit {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back {
    background-color: #f0f0f0;
    color: #666;
}

.btn-back:hover {
    background-color: #e0e0e0;
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top: 2px solid #fff;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-submit.loading,
.btn-next.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit.loading .btn-text,
.btn-next.loading .btn-text {
    display: inline;
    opacity: 1;
}

/* Completion Message */
.completion-message {
    text-align: center;
    padding: 40px 20px;
}

.completion-message h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #667eea;
}

.completion-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
}

.completion-message .btn-submit {
    width: 100%;
    margin-top: 30px;
    padding: 16px;
    font-size: 18px;
}

/* Search Container */
.search-container {
    position: relative;
    margin-bottom: 16px;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f7ff;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Agreement Box */
.agreement-box {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.agreement-box p {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #333;
}

.agreement-box p:last-child {
    margin-bottom: 0;
}

.agreement-checkbox {
    margin-bottom: 20px !important;
}

.agreement-checkbox span {
    font-size: 14px;
    line-height: 1.5;
}

/* Daytime Sleepiness Assessment Card */
.daytime-sleepiness-card {
    background-color: #ffffff; /* White background for better readability */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    padding: 20px; /* Padding inside the card */
    max-width: 500px; /* Limit the width of the card */
    margin: 20px auto; /* Center the card horizontally */
    text-align: center; /* Center-align text */
}

.daytime-sleepiness-card h2 {
    font-size: 1.8em; /* Larger font for the heading */
    font-weight: bold; /* Bold heading */
    margin-bottom: 15px; /* Space below the heading */
}

.daytime-sleepiness-card p {
    font-size: 1em; /* Standard font size for instructions */
    line-height: 1.5; /* Better line spacing */
    margin-bottom: 15px; /* Space below paragraphs */
    color: #333333; /* Dark gray text for readability */
}

.daytime-sleepiness-card ul {
    text-align: left; /* Align list items to the left */
    margin: 15px 0; /* Space above and below the list */
    padding-left: 20px; /* Indent list items */
}

.daytime-sleepiness-card ul li {
    font-size: 1em; /* Standard font size for list items */
    margin-bottom: 5px; /* Space between list items */
}

.daytime-sleepiness-card button {
    background-color: #6c63ff; /* Purple button */
    color: #ffffff; /* White text */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    padding: 10px 20px; /* Button padding */
    font-size: 1em; /* Standard font size */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease; /* Smooth hover effect */
}

.daytime-sleepiness-card button:hover {
    background-color: #574bdb; /* Darker purple on hover */
}

/* Strongly Agree to Strongly Disagree Scale */
.agree-disagree-scale {
    text-align: left; /* Align text to the left */
    margin: 20px auto; /* Center the scale vertically */
    max-width: 500px; /* Limit the width of the scale */
    padding: 10px; /* Add padding around the scale */
    background-color: #f9f9f9; /* Light gray background for contrast */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.agree-disagree-scale ul {
    list-style-type: none; /* Remove bullet points */
    padding: 0; /* Remove padding */
    margin: 0; /* Remove margin */
}

.agree-disagree-scale ul li {
    font-size: 1em; /* Standard font size */
    margin: 5px 0; /* Space between items */
    padding: 10px; /* Add padding to each item */
    background-color: #ffffff; /* White background for items */
    border: 1px solid #dddddd; /* Light gray border */
    border-radius: 5px; /* Rounded corners for items */
    transition: background-color 0.3s ease; /* Smooth hover effect */
}

.agree-disagree-scale ul li:hover {
    background-color: #f0f0f0; /* Slightly darker gray on hover */
}

.agree-disagree-scale ul li span {
    font-weight: bold; /* Bold text for emphasis */
    color: #333333; /* Dark gray text */
}

/* Custom Alert */
.custom-alert {
    background-color: #ffebee;
    border: 1px solid #f44336;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease-out;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.custom-alert:hover {
    opacity: 0.9;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-message {
    color: #c62828;
    font-weight: 500;
    font-size: 16px;
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #c62828;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    line-height: 1;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 0.7;
}
@media (max-width: 600px) {
    .form-container {
        padding: 24px;
        margin: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .subtitle {
        font-size: 16px;
    }

    .button-group {
        gap: 8px;
    }

    .btn-back,
    .btn-next,
    .btn-submit {
        padding: 12px 16px;
        font-size: 14px;
    }

    .radio-label,
    .checkbox-label {
        padding: 10px;
        margin-bottom: 6px;
    }

    .radio-label input[type="radio"],
    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }
}
