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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background-color: #f5f3ff;
    color: #1e1b4b;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: #7c3aed;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

a:hover {
    opacity: 0.7;
}

i {
    background-color: transparent;
    color: #7c3aed;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

a:hover i {
    opacity: 0.7;
    transform: scale(1.1);
}

dialog {
    background-color: #fefce8;
    border: 2px solid #4c1d95;
    border-radius: 16px;
    padding: 5px;
    position: fixed;
    top: 0;
    left: 0;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

dialog::backdrop {
    background-color: rgba(109, 40, 217, 0.2);
    backdrop-filter: blur(4px);
}

header {
    display: flex;
    width: 100%;
    background-color: #ede9fe;
    color: #4c1d95;
    padding-top: 5px;
    padding-left: 10px;
    padding-right: 10px;
    border-bottom: 1px solid #ddd6fe;
}

.header-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-left { justify-content: flex-start; }
.header-center { justify-content: center; }
.header-right { justify-content: flex-end; }

main {
    flex: 1;
    width: 80%;
    margin: 0 auto;
    padding: 2rem;
    background-color: #ffffff;
    overflow-y: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.08);
}
main.chat-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
.chat-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    min-height: 0;
}
.chat-input-area {
    flex-shrink: 0;
    background-color: #ffffff;
    padding: 1rem 2rem;
    border-top: 1px solid #ddd6fe;
}

footer {
    display: flex;
    width: 100%;
    background-color: #ede9fe;
    color: #4c1d95;
    padding: 1rem;
    justify-content: space-between;
    border-top: 1px solid #ddd6fe;
}

.footer-section { flex: 1; }
.footer-right { text-align: right; }

h2 {
    color: #3730a3;
    letter-spacing: 0.02em;
}
h3 {
    color: #3730a3;
    letter-spacing: 0.02em;
    padding-top: 5px;
    padding-bottom: 10px;
}
h4 {
    color: #3730a3;
    letter-spacing: 0.02em;
    padding-top: 5px;
    padding-bottom: 5px;
}
th {
    color: #3730a3;
    font-size: 12pt;
    font-weight: 600;
}
.data-table {
    width: 100%;
    font-size: 10pt;
    border-collapse: collapse;
}
.data-table td,
.data-table th {
    padding: 1px 6px;
}
.text-right { text-align: right; }
.text-center { text-align: center; }
.hr-thick {
    background-color: #7c3aed;
    border: 0;
    height: 2px;
    margin-bottom: 10px;
    margin-right: auto;
    width: 100%;
}
.hr-thin {
    background-color: #a78bfa;
    border: 0;
    height: 1px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
iframe {
    border: none;
    display: block;
    margin-left: 5px;
    margin-right: auto;
    width: 98%;
}
.model-list {
    font-size: 10pt;
    margin-left: 0;
    padding-left: 1.25em;
}
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="text"] {
    background-color: #f5f3ff;
    border: 1px solid #ddd6fe;
    color: #1e1b4b;
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-family: 'Inter', Verdana, sans-serif;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
::placeholder {
    text-align: center;
}
#textArea::placeholder {
    color: #7c3aed;
    font-style: italic;
    text-align: left;
}
button,
input[type="submit"],
input[type="button"] {
    background-color: #7c3aed;
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Inter', Verdana, sans-serif;
    padding: 6px 14px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 2px 1px;
    cursor: pointer;
    border-radius: 8px;
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
button:hover,
input[type="submit"]:hover {
    opacity: 0.85;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
input[type="radio"] {
    accent-color: #7c3aed;
}
input[type="checkbox"] {
    margin-left: 5px;
    margin-bottom: 5px;
    accent-color: #7c3aed;
}
input[type="number"] {
    margin-left: 5px;
    margin-bottom: 10px;
}
label {
    font-size: 12pt;
    font-weight: 500;
}
.label-small {
    font-size: 10pt;
    padding-top: 3px;
    padding-bottom: 1px;
}
.rounded-input {
    border-radius: 15px;
    padding: 10px;
    border: 1px solid #a78bfa;
    font-size: 12px;
    font-family: 'Inter', Verdana, sans-serif;
}
textarea::placeholder {
    color: #7c3aed;
    font-style: italic;
}
textarea {
    border-radius: 12px;
    color: #1e1b4b;
    padding: 12px 14px;
    border: 1.5px solid #a78bfa;
    background-color: #f5f3ff;
    font-family: 'Inter', Verdana, sans-serif;
    font-size: 11pt;
    min-height: 2lh;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
textarea[readonly] {
    background-color: #e9e6f5;
    border-color: #c4b5fd;
    color: #4c1d95;
    cursor: default;
    font-style: italic;
}
.readonly {
    color: #4c1d95;
    font-size: 11pt;
    font-style: italic;
}
details {
    color: #4338ca;
    font-size: 10pt;
    padding: 2px 0;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    margin-bottom: 4px;
    overflow: hidden;
}
summary {
    color: #6b7280;
    cursor: pointer;
    font-size: 12pt;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
    list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s ease;
    color: #7c3aed;
}
details[open] > summary::before {
    transform: rotate(90deg);
}
summary:hover {
    background-color: #f5f3ff;
}
details > div {
    padding-top: 6px;
}
details.compact {
    border: none;
    margin-bottom: 1px;
    padding: 0;
}
details.compact > summary {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 10pt;
    padding: 2px 8px;
}
details.compact > summary a,
details.compact > summary > i {
    flex-shrink: 0;
}
.summary-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}
.title {
    color: #3730a3;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-align: center;
}
.signin-div {
    background-color: #ede9fe;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 60%;
    border-radius: 12px;
}
.centered-centered-div {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
}
.centered-left-div {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 10px;
}
.results-div {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
}
.span-12pt {
    font-size: 12pt;
    color: #1e1b4b;
    padding: 10px;
    line-height: 1.7;
}
.span-10pt {
    font-size: 10pt;
    color: #4338ca;
    padding-left: 20px;
    line-height: 1.6;
}
.span-trivia {
    color: #4f46e5;
    font-size: 10pt;
    font-style: italic;
    padding-top: 5px;
    padding-bottom: 15px;
    text-align: center;
}
.span-hint {
    color: #4f46e5;
    font-size: 10pt;
    font-style: italic;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: left;
}
input.btn-decline {
    background-color: #e5e7eb;
    color: #374151;
}
input.btn-decline:hover {
    background-color: #d1d5db;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
input.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
    opacity: 0.75;
}
input.btn-danger:hover {
    opacity: 0.85;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}
.details-body {
    width: 90%;
    margin-left: 22px;
}
.icon-danger { color: #dc2626; }
.icon-info { color: #0096FF; }
.text-warning {
    font-size: 10pt;
    color: #dc2626;
}
.form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.form-row-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.form-inline {
    display: inline;
}
.float-right {
    float: right;
}

/* =====================================================================
   Responsive / Mobile
   ===================================================================== */

/* Tablet */
@media (max-width: 768px) {
    main {
        width: 95%;
        padding: 1.5rem;
    }
    .signin-div {
        width: 80%;
    }
    dialog::backdrop {
        backdrop-filter: none;
    }
}

/* Hide header title on screens where 3-column layout gets cramped */
@media (max-width: 600px) {
    .header-center {
        display: none;
    }
}

/* Mobile */
@media (max-width: 480px) {
    main {
        width: 95%;
        padding: 1rem;
    }
    header {
        padding: 3px 8px;
    }
    header img {
        height: 36px;
    }
    .header-section {
        gap: 0.5rem;
    }
    header a:has(i) {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }
    .signin-div {
        width: 90%;
    }
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="text"],
    textarea {
        font-size: 16px; /* Prevents iOS auto-zoom on focus */
    }
}
