/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0; /* Remove body padding to allow logo at very top */
    background-color: #f8f9fa; /* Lighter gray background */
    color: #212529; /* Bootstrap default text color */
    /* display: flex; */ /* Removed flex from body to allow normal flow with logo */
    /* justify-content: center; */
    /* padding: 20px; */
}

/* Logo Styling */
.app-logo {
    position: absolute; /* Position relative to viewport initially */
    top: 15px;
    left: 15px;
    height: 40px; /* Adjust height as needed */
    width: auto;
    z-index: 1000; /* Ensure it's above other content */
}

/* Container for centered content - adjusted margin-top */
.container {
    max-width: 800px;
    width: 90%; /* Use percentage for better responsiveness */
    background: #ffffff; /* White background */
    padding: 30px;
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
    margin: 70px auto 20px auto; /* Increased top margin to avoid overlap with logo, center horizontally */
}

/* Headings */
h1, h2, h3 {
    color: #343a40; /* Darker gray for headings */
    margin-bottom: 1rem;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #0056b3; /* A blue accent */
}

h2 {
    border-bottom: 1px solid #dee2e6; /* Light border below h2 */
    padding-bottom: 0.5rem;
    margin-top: 1.5rem;
}

/* Lists (used in summary) */
ul {
    list-style: none;
    padding: 0;
}

/* Form elements */
form {
    margin-top: 1.5rem;
}

.list-selection div, .options {
    margin-bottom: 1.5rem;
    padding: 15px;
    border: 1px solid #e9ecef; /* Lighter border */
    border-radius: 8px;
    background: #f8f9fa; /* Light background for sections */
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600; /* Slightly bolder labels */
    color: #495057;
}

/* Checkbox styling */
.list-selection input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1); /* Slightly larger checkbox */
}

.list-selection label {
    display: inline-block; /* Keep checkbox and label on same line */
    font-weight: normal; /* Normal weight for checkbox labels */
    margin-bottom: 10px; /* Space below each list item line */
    width: 90%; /* Prevent stretching too far */
}

/* Progress Bars */
.progress-bar-container {
    background-color: #e9ecef;
    border-radius: 50px; /* Pill shape */
    height: 22px;
    margin-top: 8px;
    overflow: hidden;
    position: relative; /* For text positioning */
}

.progress-bar {
    background-color: #28a745; /* Bootstrap success green */
    height: 100%;
    text-align: center;
    line-height: 22px; /* Match container height */
    color: white;
    width: 0%; /* Default width */
    transition: width 0.6s ease;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Style for progress bars specifically on the main menu (targets the bar inside the specific container) */
.main-menu-progress .progress-bar {
    background-color: #dc3545; /* Bootstrap danger red */
}

/* Select Dropdown */
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    font-size: 1rem;
    box-sizing: border-box; /* Include padding in width */
}

/* Buttons */
button, .button-link {
    background-color: #007bff; /* Bootstrap primary blue */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none; /* For .button-link */
    display: inline-block; /* For .button-link */
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 10px;
    margin-right: 10px;
}

button:hover, .button-link:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

button:active, .button-link:active {
    transform: translateY(0px); /* Press effect */
}

/* Specific Buttons */
#submit-answer-btn {
    background-color: #28a745; /* Green for submit */
}
#submit-answer-btn:hover {
    background-color: #218838;
}

#next-word-btn, #reveal-answer-btn, #continue-btn {
     background-color: #ffc107; /* Yellow for next/reveal/continue */
     color: #212529;
}
#next-word-btn:hover, #reveal-answer-btn:hover, #continue-btn:hover {
    background-color: #e0a800;
}

.button-link {
    background-color: #6c757d; /* Gray for back link */
}
.button-link:hover {
    background-color: #5a6268;
}


/* Exercise Page Specific Styles */
.progress-section {
    display: flex;
    justify-content: space-between;
    gap: 20px; /* Space between the two progress bars */
    margin-bottom: 2rem;
}

.progress-section > div {
    flex: 1; /* Each progress bar takes equal space */
}

#exercise-area {
    background-color: #e9ecef; /* Light background for the exercise box */
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

#word-prompt {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #0056b3;
}

#answer-input input[type="text"] {
    width: calc(100% - 22px); /* Full width minus padding/border */
    padding: 10px;
    font-size: 1.2em;
    border: 1px solid #ced4da;
    border-radius: 5px;
    margin-bottom: 1rem;
}

#answer-input .mc-button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    background-color: #ffffff;
    color: #007bff;
    border: 1px solid #007bff;
}
#answer-input .mc-button:hover {
    background-color: #e7f3ff; /* Light blue background on hover */
}

#feedback {
    margin-top: 1rem;
    font-size: 1.1em;
    font-weight: bold;
}

#feedback.correct {
    color: #28a745;
}

#feedback.incorrect {
    color: #dc3545; /* Bootstrap danger red */
}

#controls {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Summary and Completion Styles */
#cycle-summary, #session-complete {
    margin-top: 2rem;
    padding: 20px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background-color: #f8f9fa;
}

#cycle-summary h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

#cycle-summary ul {
    padding-left: 20px;
    list-style: disc;
}

#incorrect-words-list li {
    color: #dc3545;
}

#correct-words-list li {
     color: #28a745;
}

/* Utility Classes */
.hidden {
    display: none;
}

.error {
    color: #dc3545;
    font-weight: bold;
    background-color: #f8d7da; /* Light red background */
    border: 1px solid #f5c6cb; /* Red border */
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Compact layout for main menu word list selection */
.list-selection div {
    display: flex;
    align-items: center;
    gap: 12px; /* Space between checkbox/label and progress bar */
    margin-bottom: 10px; /* Reduce vertical spacing */
    padding: 8px 12px; /* Tighter padding */
}

.list-selection label {
    margin-bottom: 0; /* Remove bottom margin so label aligns center */
    width: auto; /* Allow label to size to its content */
    flex: 0 0 auto; /* Preserve intrinsic width */
}

/* Make the progress bar sit inline and take remaining space */
.list-selection .progress-bar-container {
    flex: 1; /* Take the remaining horizontal space */
    height: 14px; /* Slimmer bar */
    margin-top: 0; /* Remove top margin so bar is centered */
    position: relative; /* Needed for absolute positioning of bar */
}

.list-selection .progress-bar {
    line-height: 14px; /* Match new height for centered percentage */
    font-size: 0.75em; /* Slightly smaller percentage text */
    position: absolute;
    right: 0; /* Anchor to right edge */
    top: 0;
    height: 100%;
    min-width: 24px; /* Always show at least a small bar */
}

/* Progress bar styling */
.progress-container {
    width: 100%;
    /* background-color: #e9ecef; */ /* Removed to let parent handle background */
    border-radius: 4px;
    /* margin-top: 5px; */ /* Adjust margin if needed, or move to parent */
    height: 12px; /* Narrower progress bar */
}

.progress-bar-background {
    background-color: #ffffff; /* White background */
    padding: 2px; /* Optional: small padding around the progress bar container */
    border-radius: 6px; /* Slightly larger radius than progress-container to contain it */
    margin-top: 5px; /* Space above background */
    display: inline-block; /* To keep it constrained to the progress bar width */
    vertical-align: middle; /* Align with the label text */
}

.progress-bar {
    background-color: #28a745; /* Bootstrap success green */
    height: 100%;
    text-align: center;
    line-height: 22px; /* Match container height */
    color: white;
    width: 0%; /* Default width */
    transition: width 0.6s ease;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 600;
} 