/* Global Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #000;
    overflow-x: hidden;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1rem;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}

/* Main Layout */
.content-wrapper {
    display: flex;
    flex-direction: row;
    max-width: 95%;
    /* Maximized width */
    margin: 0 auto;
    padding: 20px 0;
    gap: 0;
    /* No gap, strict widths */
    align-items: flex-start;
}

/* Sidebar - 20% */
.sidebar {
    width: 20%;
    flex-shrink: 0;
    padding-right: 20px;
    /* Internal spacing */
    box-sizing: border-box;
}

.sidebar h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.input-container {
    display: flex;
    align-items: center;

    width: 100%;
    max-width: 600px;
    /* keeps it nicely sized */
    margin: 0 auto 40px;
    /* center it */

    background: #fff;
    border: 2px solid #000;
    border-radius: 30px;
    /* rounded search-bar shape */

    padding: 10px 16px;
    box-sizing: border-box;
}


#user-input {
    flex: 1;
    border: none;
    outline: none;

    font-size: 1rem;
    font-family: inherit;

    padding: 6px 0;
    /* vertical breathing room */
    background: transparent;
}

#user-input::placeholder {
    color: #000;
    font-size: 0.9rem;
    /* Smaller placeholder */
}

#send-btn {
    background: #000;
    color: #fff;
    border: none;

    padding: 10px 16px;
    /* smaller, fits inside bar */
    border-radius: 20px;
    /* rounded, search-bar style */

    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;

    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

#send-btn:hover {
    background: #333;
}

#send-btn:active {
    background: #555;
    transform: translateY(1px);
}


/* Question List */
.question-list h3 {
    font-size: 0.9rem;
    /* Slightly smaller header too */
    margin-bottom: 10px;
    font-weight: 600;
}

.question-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.question-list li {
    font-size: 0.75rem;
    /* SMALLER TEXT as requested */
    margin-bottom: 6px;
    line-height: 1.4;
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
}

.question-list li:hover {
    color: #000;
    text-decoration: underline;
}

/* Persona Grid - 80% */
.scene-container {
    width: 80%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 COLUMNS (3x2) */
    gap: 40px 60px;
    /* Adjusted gap for 3-col layout */
    box-sizing: border-box;
    padding-left: 40px;
    /* Spacing from sidebar */
}

.persona-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 250px;
}

/* Images */
.persona-image-container {
    width: 130px;
    height: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    z-index: 2;
}

.persona-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.persona-name {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
    text-align: center;
}

.speech-bubble {
    position: absolute;
    bottom: 100%;
    /* Keep it just above the head */
    left: 50%;
    transform: translateX(-50%);

    width: 150px;
    /* Compact width */
    padding: 8px 12px;
    /* Smaller padding for a neat look */
    background: #fff;
    /* White background */
    border: 2px solid #000;
    /* Ensure solid black border */
    border-radius: 6px;
    /* Slightly rounded corners */

    font-size: 0.75rem;
    /* Smaller font size */
    text-align: center;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);

    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    border-width: 6px;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
    /* Match the bubble’s border color */

    filter: none;
    /* Remove the drop-shadow filter if it’s not needed */
}


.persona-card.active .speech-bubble {
    opacity: 1;
    transform: translateY(0);
}

/* Thinking Pulse */
.persona-card.thinking .persona-image {
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Instruction Overlay */
#instruction-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: 200;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.key-hint {
    background: #444;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #666;
}

#bottom-hint {
    position: fixed;
    bottom: 20px;
    /* distance from bottom */
    left: 50%;
    transform: translateX(-50%);

    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.85rem;
    border-radius: 6px;

    opacity: 0;
    /* hidden by default */
    pointer-events: none;
    /* don't interact */
    transition: opacity 0.4s ease;
}