:root {
    --ua-blue: #002e65;
    --ua-red: #ea2c38;
    --fti-purple: #b10097;
    --fti-pastel: #e4c1db;
    --ua-bg: #f4f6f9;
    --ua-card-bg: #ffffff;
    --ua-text: #222222;
    --ua-border: #d0d7de;
    --ua-subtle: #edf2f7;
}

body {
    font-family: "ITC Officina Sans", Calibri, system-ui, -apple-system, sans-serif;
    background-color: var(--ua-bg) !important;
    color: var(--ua-text);
    margin: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.logo-header {
    width: 100%;
    max-width: 1550px;
    margin-bottom: 15px;
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.beta-badge {
    background-color: var(--ua-red);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wrapper {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1550px;
}

@media (max-width: 1100px) {
    .wrapper {
        grid-template-columns: 1fr;
    }
}

.container {
    background: var(--ua-card-bg);
    padding: 1.25rem;
    border-radius: 4px;
    box-shadow: 0 10px 25px -5px rgba(0, 46, 101, 0.08);
    border-top: 6px solid var(--ua-red);
    border-left: 1px solid var(--ua-border);
    border-right: 1px solid var(--ua-border);
    border-bottom: 1px solid var(--ua-border);
    box-sizing: border-box;
}

/* Explicitly disables internal scrolling so it scrolls with the main window */
.left-panel {
    overflow: visible !important;
    max-height: none !important;
    position: static !important;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--ua-blue);
    padding-bottom: 0.5rem;
    margin-bottom: 0.8rem;
}

h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--ua-blue);
    font-weight: 700;
}

.brand-tag {
    background-color: var(--ua-red);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    text-transform: uppercase;
}

/* The clickable 'i' badge */
.info-badge {
    background-color: rgba(0, 46, 101, 0.1);
    color: var(--ua-blue);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    user-select: none;
}
.info-badge:hover {
    background-color: var(--ua-blue);
    color: white;
}

.form-group {
    margin-bottom: 0.65rem;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    color: var(--ua-blue);
}

input, select {
    width: 100%;
    padding: 0.45rem;
    border: 1px solid var(--ua-border);
    border-radius: 2px;
    font-size: 0.82rem;
    box-sizing: border-box;
    background: #fff;
    color: var(--ua-text);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--ua-blue);
    box-shadow: 0 0 0 3px rgba(0, 46, 101, 0.15);
}

button {
    background-color: var(--ua-blue);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 2px;
    font-size: 0.72rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background-color: #001d40;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem;
}

.results {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--ua-subtle);
    border-left: 4px solid var(--ua-blue);
    border-radius: 0 4px 4px 0;
}

.results h3 {
    margin-top: 0;
    font-size: 0.78rem;
    color: var(--ua-blue);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

.result-value {
    font-weight: bold;
    color: var(--ua-red);
}

hr {
    border: 0;
    border-top: 1px solid var(--ua-border);
    margin: 0.8rem 0;
}

.file-upload-box {
    border: 2px dashed var(--ua-border);
    padding: 6px;
    text-align: center;
    background: var(--ua-subtle);
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--ua-blue);
    margin-bottom: 0.4rem;
    display: block;
}
.file-upload-box:hover {
    border-color: var(--ua-blue);
    background: #e2e8f0;
}

#viewer-container {
    width: 100%;
    height: 450px;
    background: #1e293b;
    border-radius: 4px;
    border: 1px solid var(--ua-border);
    position: relative;
    box-sizing: border-box;
}

#sim-container {
    width: 100%;
    height: 450px;
    background: #000;
    border-radius: 4px;
    border: 1px solid var(--ua-border);
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.viewer-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #fff;
    background: rgba(0, 46, 101, 0.85);
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 0.72rem;
    pointer-events: none;
    letter-spacing: 0.03em;
    z-index: 10;
}

.copyright-banner {
    width: 100%;
    max-width: 1550px;
    text-align: center;
    padding: 20px 0;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--ua-blue);
    border-top: 1px solid var(--ua-border);
}

/* Modal CSS styles[cite: 5] */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    border-radius: 4px;
    width: 700px;
    max-width: 90%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    overflow: hidden;
}

.modal-header {
    background-color: var(--ua-blue);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.15rem;
    font-weight: bold;
}

.modal-header .close {
    color: white;
    font-size: 1.5rem;
    font-weight: normal;
    cursor: pointer;
    line-height: 1;
}

.modal-header .close:hover {
    color: #ddd;
}

.modal-body {
    padding: 24px;
    color: #333;
    font-size: 0.92rem;
    line-height: 1.5;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-body h3 {
    color: var(--ua-blue);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.modal-body p {
    margin-bottom: 12px;
}

.param-label {
    color: var(--fti-purple);
    font-weight: bold;
}