@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --ul-green: #005335;
    --ul-modern-green: #00B140;
    --ul-heritage-green: #003726;
    --light-gray: #F5F7F6;
    --bg: #f9fbfa;
}

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: #1a1a1a;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--ul-green);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

nav a:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    padding: 6px;
    background: var(--ul-green);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

/* Invisible bridge over the gap so the menu stays open while moving the mouse down */
.nav-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-dropdown-menu a {
    display: block;
    white-space: nowrap;
    text-align: center;
}

#participant-display {
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    line-height: 1;
    text-align: center;
}

.page {
    display: none;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.active {
    display: block;
}

#part1-chat-container, #part2-chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
    height: calc(100vh - 160px);
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.chat-header {
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #e5e5e5;
}

#part1-messages, #part2-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: var(--light-gray);
}

.message {
    max-width: 75%;
    margin: 8px 0;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    animation: fadeIn 0.25s ease;
    position: relative;
}

.user {
    background: var(--ul-modern-green);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.bot {
    background: var(--ul-heritage-green);
    color: white;
    border-bottom-left-radius: 6px;
}

.timestamp {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 2px;
    color: #333;
}

.user .timestamp {
    text-align: right;
    color: #222;
}

.bot .timestamp {
    text-align: left;
    color: #ddd;
}

#part1-input-area, #part2-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e5e5e5;
    background: white;
}

#part1-user-input, #part2-user-input {
    flex: 1;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
}

#part1-user-input:focus, #part2-user-input:focus {
    border-color: var(--ul-modern-green);
}

#part1-send-btn, #part2-send-btn {
    margin-left: 10px;
    padding: 12px 18px;
    background: var(--ul-modern-green);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

#part1-send-btn:hover, #part2-send-btn:hover {
    background: var(--ul-green);
}

#consent-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#consent-box {
    background: white;
    width: 90%;
    max-width: 720px;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

#consent-text {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 15px;
    font-size: 14px;
}

#consent-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

#consent-checklist label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

#consent-checklist input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
#code-section {
    margin-bottom: 16px;
}

#code-section label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

#participant-code-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    margin-top: 4px;
}

#participant-code-input:focus {
    border-color: var(--ul-modern-green);
}

#consent-btn {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
    background: var(--ul-modern-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#consent-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#consent-btn:not(:disabled):hover {
    background: var(--ul-green);
}

#participant-id-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

#participant-id-modal.show {
    display: flex !important;
}

#participant-id-box {
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 20px;
}

#participant-id-box h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--ul-green);
    text-align: center;
}

#close-id-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none !important;
    border: none !important;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

#close-id-modal:hover {
    color: #333;
}

#id-display-section {
    background: linear-gradient(135deg, var(--light-gray) 0%, #f0f4f2 100%);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

#id-display-section p {
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
    font-weight: 500;
}

#id-display-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--ul-modern-green);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#id-display-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--ul-modern-green);
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
}

#id-actions {
    display: flex;
    gap: 12px;
}

#id-actions button {
    flex: 1;
    padding: 14px 16px;
    background: var(--ul-modern-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#id-actions button:hover {
    background: var(--ul-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 177, 64, 0.3);
}

#email-section {
    padding: 24px;
    background: linear-gradient(135deg, var(--light-gray) 0%, #f0f4f2 100%);
    border-radius: 12px;
}

#email-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ul-green);
}

#email-section > p {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px 0;
}

#email-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

#email-input:focus {
    border-color: var(--ul-modern-green);
    box-shadow: 0 0 0 3px rgba(0, 177, 64, 0.1);
}

#email-input::placeholder {
    color: #bbb;
}

#email-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--ul-modern-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

#email-btn:hover {
    background: var(--ul-green);
}

#email-status {
    font-size: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(0, 177, 64, 0.1);
    color: var(--ul-modern-green);
    display: none;
}

.page-content {
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    line-height: 1.6;
}

.page-content h2 {
    color: var(--ul-green);
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
}

.page-content h3 {
    color: var(--ul-green);
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.page-content h4 {
    color: var(--ul-heritage-green);
    font-size: 15px;
    margin-top: 16px;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-content p {
    font-size: 15px;
    color: #333;
    margin-bottom: 14px;
}

.page-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

.page-content li {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
}

.faq-container {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 16px;
    background: #f5f7f6;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: var(--ul-green);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: #eef2f1;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    font-weight: 600;
    color: var(--ul-modern-green);
    transition: transform 0.2s ease;
}

.faq-item.open .faq-question {
    background: var(--ul-heritage-green);
    color: white;
}

.faq-item.open .faq-question::after {
    content: '−';
    color: white;
    transform: rotate(0deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.faq-item.open .faq-answer {
    max-height: 1000px;
    padding: 16px;
    border-top: 1px solid #e0e0e0;
}

.faq-answer p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

a {
    color: var(--ul-modern-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ul-green);
    text-decoration: underline;
}

/* ---------- VentureVerse: coming soon page ---------- */
.coming-soon-box {
    margin: 80px auto 0;
    padding: 48px 32px;
    max-width: 640px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    text-align: center;
}

.coming-soon-box h1 {
    margin: 0 0 16px;
    font-size: 30px;
    font-weight: 600;
    color: var(--ul-green);
}

.coming-soon-box p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

.coming-soon-box a {
    color: var(--ul-modern-green);
    font-weight: 500;
}

/* ---------- VentureVerse: participant ID entry ---------- */
#id-entry-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#id-entry-modal.show {
    display: flex;
}

#id-entry-box {
    position: relative;
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#id-entry-box h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--ul-green);
    text-align: center;
}

#id-entry-box .modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

#id-entry-btn {
    margin-top: 6px;
    width: 100%;
    padding: 12px;
    background: var(--ul-modern-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

#id-entry-btn:hover {
    background: var(--ul-green);
}
