:root {
    /* Base Colors (Dark Theme Default) */
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #8a2be2;
    --text-color: #e0e0e0;
    --text-secondary-color: #a0a0a0;
    --font-family: 'Inter', sans-serif;
    --danger-color: #e53935;

    /* Component Colors */
    --input-bg: #2a2a2a;
    --input-border: #444;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --mic-bg: #333;
    --mic-hover: #444;
    --board-member-bg: #333;
    --board-member-border: #444;
    --justification-bg: rgba(0, 0, 0, 0.2);
    --justification-border: #333;
    --menu-bg: var(--surface-color);
    --menu-border: #333;
    --menu-item-hover: rgba(255, 255, 255, 0.1);
    --send-btn-color: var(--primary-color);
    --send-btn-hover: #7b24c8;
}

body.light-theme {
    /* Base Colors (Light Theme) */
    --background-color: #f0f2f5;
    --surface-color: #ffffff;
    --text-color: #212529;
    --text-secondary-color: #6c757d;

    /* Component Colors */
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --hover-bg: rgba(0, 0, 0, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --mic-bg: #e9ecef;
    --mic-hover: #dee2e6;
    --board-member-bg: #f8f9fa;
    --board-member-border: #dee2e6;
    --justification-bg: #f8f9fa;
    --justification-border: #e9ecef;
    --menu-bg: #ffffff;
    --menu-border: #dee2e6;
    --menu-item-hover: rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    background-image: url("/img/background.png"); /* Replace with your image path */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    background-size: cover;      /* Scales the image to cover the entire container */
    background-attachment: fixed; /* Keeps the image fixed when scrolling */

    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

#root {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 90vh;
    background-color: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.3s, box-shadow 0.3s;
}

/* --- Login Styles (Commented Out) --- */

.login-container {
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    animation: fadeIn 0.5s ease-in-out;
}

.login-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.login-container p {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin-bottom: 2.5rem;
    max-width: 400px;
}

#google-signin-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Wizard Styles --- */
.wizard-container {
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-step h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.wizard-step p {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    align-self: flex-start;
    min-width: 100px;
    text-align: center;
}

.btn:hover:not(:disabled) {
    background-color: #7b24c8;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #5a1a8a;
}

.btn-file {
    position: relative;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.file-name {
    margin-left: 1rem;
    color: var(--text-secondary-color);
    font-style: italic;
}

.spinner-small {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* --- Conversation Styles --- */
.conversation-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.board-members-container {
    padding: 1rem 2rem 0.5rem;
    border-bottom: 1px solid var(--input-border);
    text-align: center;
    transition: border-color 0.3s;
}

.board-members-container h2 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary-color);

    text-transform: uppercase;
    letter-spacing: 1px;
}

.board-members {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.board-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.board-member-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--board-member-bg);
    border: 2px solid var(--board-member-border);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #666;
    transition: all 0.3s ease-in-out;
}

.board-member.highlight .board-member-image {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
    transform: scale(1.1);
}

.board-member-image svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}


.board-member-name {
    font-size: 0.8rem;
    color: var(--text-secondary-color);
}

a.board-member-name {
    color: var(--text-secondary-color);
    text-decoration: none;
}

a.board-member-name:hover {
    text-decoration: underline;
}

.justification-entry {
    background-color: var(--justification-bg);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--justification-border);
    transition: background-color 0.3s, border-color 0.3s;
}

.justification-entry h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.justification-entry p {
    font-size: 0.9rem;
    color: var(--text-secondary-color);
    margin-bottom: 1rem;
}

.justification-entry ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.justification-entry li strong {
    font-weight: 500;
    color: var(--text-color);
    display: block;
    margin-bottom: 0.25rem;
}

.justification-entry li span {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    line-height: 1.5;
}

.transcript-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    /* Changed from column-reverse */
}

.transcript {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.transcript-entry {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    line-height: 1.5;
}


.transcript-entry strong {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-secondary-color);
}

.transcript-entry p {
    margin-bottom: 1rem;
}

.transcript-entry ul {
    margin-bottom: 1rem;
}

.transcript-entry li {
    margin-left: 20px;
}

.transcript-entry.user {
    align-self: flex-end;
    align-items: flex-end;
}

.transcript-entry.model {
    align-self: flex-start;
    align-items: flex-start;
}

.transcript-entry.user strong {
    color: var(--primary-color);
}

.transcript-entry.model strong {
    color: #25a0a0;
}

.loading-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.loading-indicator .dot {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: var(--text-secondary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-indicator .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-indicator .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

.controls {
    padding: 1.5rem;
    border-top: 1px solid var(--input-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.3s;
}

.main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1.5rem;
}

.mic-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background-color: var(--mic-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    color: var(--text-color);
}

.mic-button svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.mic-button:hover:not(:disabled) {
    background-color: var(--mic-hover);
}

.mic-button.active:not(.paused) {
    background-color: var(--primary-color);
    animation: pulse 1.5s infinite;
    color: #fff;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(138, 43, 226, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0);
    }
}

.status {
    color: var(--text-secondary-color);
    font-size: 0.8rem;
}

.disclaimer {
    color: var(--text-secondary-color);
    font-size: 0.6rem;
    margin-bottom: 1rem;
}

.menu-container {
    position: relative;
    top: -5px;
    right: 10px;
    z-index: 1000;
    float: right;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background-color: var(--hover-bg);
}


.hamburger-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--menu-bg);
    border: 1px solid var(--menu-border);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: 0 4px 12px var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    transition: background-color 0.3s, border-color 0.3s;
}

.menu-item {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-family: var(--font-family);
    font-size: 0.95rem;
}

.menu-item:hover {
    background-color: var(--menu-item-hover);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

.text-input-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    place-content: center;
}

.text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    /* Space for the send button */
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 24px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

.text-input:focus {
    border-color: var(--primary-color);
}

.send-button {
    position: absolute;
    right: 0.5rem;
    bottom: 1.0rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--send-btn-color);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.send-button:hover {
    color: var(--send-btn-hover);
}

.send-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.tooltiptext {
    visibility: hidden;
    /* Hidden by default */
    /* width: 130px; */
    border: 1px solid var(--justification-border);
    background-color: var(--background-color);
    color: var(--text-secondary-color);
    font-family: var(--font-family);
    font-size: 0.9rem;
    text-align: left;
    padding: 5px 0;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    top: 150px;
    /*
         
        Ensure tooltip is displayed above content */
}


.board-member:hover .tooltiptext {
    visibility: visible;
}

.errormessage {
    color: var(--danger-color);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.errormessage a {
    color: var(--danger-color);
    margin-top: 1rem;
    font-size: 0.9rem;
}