#candidate-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; /* Fixed smaller size */
    height: 200px; /* Square for circle */
    border-radius: 50%; /* Circled image */
    object-fit: cover; /* Maintain aspect ratio */
}

.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.9);
}

/* Chat Container */
#chat-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
    background-color: #F8F9FA; /* Light gray for chat area */
    margin-bottom: 20px;
    display: flex;
    flex-direction: column-reverse;
}

#chat-history div {
    margin: 10px 0;
    padding: 10px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

#chat-history div.user {
    background-color: #007BFF; /* Blue for user */
    color: white;
    margin-left: auto;
    text-align: right;
}

#chat-history div.assistant {
    background-color: #28A745; /* Green for AI/pet owner */
    color: white;
    margin-right: auto;
    text-align: left;
}
#chat-history div.system img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer; /* Make image clickable */
}

#chat-history div.system {
    background-color: #FFC107; /* Yellow for system/test results */
    color: #333;
    text-align: center;
    font-style: italic;
}

#mode-toggle-btn {
    background-color: #FFC107; /* Yellow for toggle */
    color: #333;
}

#mode-toggle-btn:hover {
    background-color: #e0a800;
}

/* Buttons below chat */
.input-group {
     display: flex;
    align-items: center;
    gap: 8px;
    /* Tighter gap for compactness */
    background: #FFFFFF;
    /* White background for input bar */
    border: 1px solid #ccc;
    border-radius: 30px;
    /* Pill-shaped for modern look */
    padding: 5px 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    /* Space from chat history */
}

input#user-input {
    flex: 1;
    border: none; /* Remove border for seamless integration */
    background: transparent;
    padding: 10px;
    outline: none; /* No outline on focus */
    font-size: 1em;
}
button#send-btn, button#voice-btn, button#mode-toggle-btn.input-toggle {
    background: transparent; /* Icon-only buttons inside input bar */
    border: none;
    color: #007BFF; /* Blue icons */
    padding: 10px;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s, padding 0.2s, background-color 0.3s, border-radius 0.3s; /* Smooth transitions */
    font-size: 1.2em; /* Larger icons */
    border-radius: 50%; /* Circular for attractiveness */
    white-space: nowrap; /* Prevent text wrapping */
}
button#send-btn:hover, button#voice-btn:hover, button#mode-toggle-btn.input-toggle:hover {
    color: #0056b3;
    transform: scale(1.1); /* Subtle zoom on hover */
}

button#voice-btn {
    color: #FFC107; /* Keep yellow for voice */
}

button#voice-btn:hover {
    color: #e0a800;
}

button#mode-toggle-btn.input-toggle {
    color: #FFC107; /* Yellow icon to match original theme */
}

button#mode-toggle-btn.input-toggle:hover {
    color: #e0a800;
}

button#mode-toggle-btn.input-toggle.text-mode {
    background-color: #FFC107; /* Background when showing text */
    color: #333;
    padding: 5px 10px;
    border-radius: 20px; /* Rounded for text */
    font-size: 0.9em; /* Smaller font for text */
    transform: scale(1); /* Override hover scale during text mode */
}

button#mode-toggle-btn.input-toggle.enlarge {
    transform: scale(1.2); /* Slightly enlarge during switch */
}
/* Tab Container Styles (above chat) */
.tab-container {
    display: flex;
    gap: 0; /* No gap between tabs for seamless look */
    margin-bottom: 10px;
    border-bottom: 2px solid #ccc; /* Bottom border for tab bar */
}

.tab-btn {
    flex: 1; /* Equal width for tabs */
    padding: 10px 20px;
    background-color: #f0f0f0; /* Light gray for inactive tabs */
    border: 1px solid #ccc;
    border-bottom: none; /* Remove bottom border to blend with content */
    border-radius: 8px 8px 0 0; /* Rounded top corners */
    cursor: pointer;
    font-weight: 500;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

.tab-btn.active {
    background-color: #007BFF; /* Blue for active tab */
    color: white;
    font-weight: 600;
}

.tab-btn:hover {
    background-color: #e0e0e0; /* Hover effect for inactive tabs */
}

.tab-btn.active:hover {
    background-color: #0056b3; /* Darker blue on hover for active */
}

/* Right side bar */
.sidebar {
    flex: 3; /* 30% width */
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    background: #F8F9FA; /* Light background for contrast */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.sidebar section {
    margin-bottom: 0; /* Tighten spacing */
}

.sidebar h2 {
    color: #007BFF;
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chat Layout */
.chat-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.chat-section {
    flex: 7; /* 70% width */
    display: flex;
    flex-direction: column;
}

button {
    padding: 10px 15px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

/* Content Areas */
#transcript-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    max-height: 60vh;
    scrollbar-width: thin;
}
#candidate-content,#transcript-content {
    border: 1px solid #ccc;
    border-radius: 0 0 8px 8px; 
    padding: 15px;
    background-color: #F8F9FA;
    height: 400px; 
}
#candidate-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* For overlay positioning */
}
#candidate-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; /* Size of the circle */
    height: 200px;
    border-radius: 50%;
    background-color: transparent; 
    overflow: hidden; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}
#mic-alert {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none; 
    color: red; 
    font-size: 9em;
    z-index: 10; /* Ensure it's on top of photo*/
}

#audio-visualizer {
    width: 100%;
    height: 40px;
    border-top: 1px solid #ccc;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    border-radius: 0 0 8px 8px;
}
/* Soundwave Animation */
#candidate-content.soundwave-active {
    position: relative;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(0, 123, 255, 0.4);
    opacity: 0;
    animation: wave-animate 2s infinite ease-out;
    pointer-events: none;
    z-index: 1;
}

@keyframes wave-animate {
    0% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Guide Modal */
#guide-modal {
    display: none;
    position: fixed;
    z-index: 1003;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.evaluation-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
}
#guide-modal .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
}

#guide-modal h2 {
    color: #FFC107;
    margin-bottom: 15px;
}

#guide-text {
    font-size: 1em;
    color: #333;
    line-height: 1.5;
}

#guide-modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

#guide-modal .close:hover,
#guide-modal .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.utility-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; /* More space between */
    margin-top: 20px; /* More space from visualizer */
    margin-bottom: 20px; /* Add bottom margin for page flow */
}
.small-btn {
    background: linear-gradient(to right, #f0f9ff, #e0f2fe); /* Consistent blue theme */
    color: #007BFF;
    border: 1px solid #bfdbfe;
    border-radius: 10px; /* Slightly more rounded for softness */
    padding: 8px 16px; /* Larger for prominence */
    font-size: 1em; /* Bolder text */
    font-weight: 500; /* Match test-btn weight */
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s; /* Add shadow transition */
    display: flex;
    align-items: center;
    justify-content: center; /* Full centering */
    gap: 6px; /* Slightly larger icon gap */
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1); /* Subtle blue-tinted shadow for depth */
}
button i {
    margin-right: 5px;
}
.small-btn:hover {
    background: linear-gradient(to right, #dbeafe, #bfdbfe);
    transform: translateY(-2px) scale(1.05); /* Lift and slight zoom for appeal */
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2); /* Stronger shadow on hover */
}

.small-btn i {
    font-size: 1.2em; /* Larger icons for visual pop */
}

#live-feedback-section {
    color: #007bff;
}
.live-feedback-response {
  list-style-type: none; 
  padding: 0;
  margin: 10px 0; 
  font-size: 14px; 
  color: #333;
}.live-feedback-response li {
  background-color: #f9f9f9; 
  padding: 10px; 
  border-radius: 5px; 
  margin-bottom: 10px; 
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 
  border: 1px solid #ddd; 
}.live-feedback-response li:last-child {
  margin-bottom: 0; /
}





/* Responsive Adjustments */
@media (max-width: 900px) {
    .chat-layout {
        flex-direction: column;
    }

    .chat-section, .sidebar {
        width: 100%;
    }

    .sidebar {
        margin-top: 30px;
    }
}


#chat-history {
    position: relative; /* Required for absolute children to position relative to this */
    /* Existing styles, e.g., overflow-y: auto; height: some-value; */
}

.placeholder {
    height: 0; /* No height to not take space in flow */
    margin: 0;
    padding: 0;
    overflow: hidden; /* Hide any overflow */
}

#respContainer {
    font-family: 'Times New Roman', Times, serif;
    font-size: 12px;
    color: #606770;
    background-color: #F0F2F5;
    position: absolute;
    bottom: -35px;
    left: -10px;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    opacity: 0.8;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#respContainer::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% {
        content: '.';
    }

    20% {
        content: '..';
    }

    40% {
        content: '...';
    }

    60% {
        content: '....';
    }

    80% {
        content: '....';
    }
}

.assigned-tasks-section {
    background-color: #e6f2ff; /* Slightly deeper light blue for more visibility */
    border: 3px solid #4da6ff; /* Thicker border with a bolder blue */
    border-radius: 10px; /* More pronounced rounded corners */
    padding: 20px; /* Increased padding for better framing */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Stronger shadow for added depth */
    margin-bottom: 30px; /* Extra space below to separate from other sections */
}

.assigned-tasks-section h2 {
    font-size: 1.8em; /* Larger heading */
    color: #0056b3; /* Dark blue for importance */
    margin-bottom: 15px; /* Space below heading */
    text-align: center; /* Centered for emphasis */
    font-weight: bold;
}

.assigned-tasks-section .scenario-grid {
    border-top: 1px solid #ccc; /* Subtle separator */
    padding-top: 10px;
}