/* 1. CORE SETUP
   ------------------------------------------------------------------------- */
   body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #313131;
    color: white;
    font-family: "DM Sans", sans-serif;
}

#container {
    background-color: #313131;
    width: 1200px;
    height: 750px;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
}

.question {
    display: none; 
}

#progress-container {
    display: none; 
}

/* 2. STARTING OVERLAY
   -------------------------------------------------------------------------*/
#starting-overlay {
    background-color: #313131;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;   
    text-align: center;
    width: 100%;
    height: 100%;
}

#title-with-decorations {
    position: relative;
    display: inline-block;
}

#starting-overlay h1 {
    font-size: 48px;
    margin: 0;
}

#starting-overlay h2 {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.6;
}

#jar-text {
    position: absolute;
    top: -1.9em;
    left: 43%;
    font-family: "Covered By Your Grace";
    font-weight: 200;
    white-space: nowrap;
    margin: 0;
}

#carrot {
    position: absolute;
    top: -1.5em;
    left: 46%;
}

#scribble {
    position: absolute;
    top: -0.3em;
    left: 18%;
}

#starting-overlay button {
    background-color: #EF4444;
    color: white;
    font-size: 24px;
    border-radius: 999px;
    border: none;
    padding: 10px 24px;
    font-family: "DM Sans", sans-serif;
    font-weight: 300;
    cursor: pointer;
}

#starting-overlay button:hover {
    background-color: #b32222;
}

/* 3. INTERACTIVE LAYERING (JAR POSITIONING)
   ------------------------------------------------------------------------- */
#Q1.question {
    background-color: #313131;
    box-sizing: border-box;
    padding: 40px;
    display: grid;
    grid-template-columns: 380px 1fr; 
    gap: 40px;
    align-items: center;
    border-radius: 12px; 
}

#jar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

#jar-layer-wrapper {
    position: relative;
    width: 380px;
    height: 550px;
}

#matter-jar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#jar-overlay-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none; 
}

/* 4. RIGHT COL CONTENT & CARDS
   ------------------------------------------------------------------------- */
.text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px; 
}

.text > section:first-child {
    background-color: #e0e0e0;
    border-radius: 24px;
    padding: 24px 30px; 
    color: #000000;
    height: 275px; 
    box-sizing: border-box;
    overflow: hidden; 
}

.text h1 {
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    font-size: 20px; 
    margin: 0 0 10px 0;
}

.text p {
    font-size: 13px; 
    line-height: 1.5;
    margin: 0;
    white-space: pre-line; 
}

.text > section:first-child.prologue-mode {
    height: auto; 
    min-height: 275px;
    max-height: 480px;
    padding: 25px 35px;
}

.text > section:first-child.end-game-mode {
    height: auto;
    min-height: 275px;
    max-height: 520px;
    padding: 16px 0;
    overflow-y: auto;
    border-radius: 0;
    background-color: transparent;
    color: inherit;
}

.end-screen-panel {
    background-color: #ffffff;
    color: #000000;
    border-radius: 24px;
    padding: 22px;
    box-sizing: border-box;
    font-family: "DM Sans", sans-serif;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.end-screen-panel h1,
.end-screen-panel h2 {
    font-family: "Courier New", Courier, monospace;
    line-height: 1.2;
}

.end-screen-panel h1 {
    font-size: 1.65rem;
}

.end-screen-panel h2 {
    font-size: 1.05rem;
}

.end-screen-panel p,
.metrics-list li {
    font-size: 0.95rem;
}

.end-screen-panel strong {
    font-weight: 700;
}

.end-screen-panel + .end-screen-panel {
    margin-top: 18px;
}

.end-screen-panel h1 {
    margin:0;
}

.end-screen-panel h2 {
    margin: 0 0 12px 0;
}

.end-screen-panel.end-screen-title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding-top: 18px;
    padding-bottom: 18px;
}

.metrics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.metrics-list li {
    line-height: 1.6;
}

.interactive-flow-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px; 
}

.options-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px; 
}

.option-card {
    background-color: #e0e0e0;
    border-radius: 30px;
    padding: 18px 16px; 
    color: #000000;
    display: flex;
    flex-direction: column;
    height: 220px; 
    box-sizing: border-box;
    overflow: hidden; 
    cursor: pointer;
    user-select: none;
    border: 4px solid transparent; 
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s ease, border-color 0.2s ease;
}

.option-card:hover {
    background-color: #eeeeee;
    transform: translateY(-3px);
}

.option-card.selected {
    border-color: #EF4444; 
    background-color: #ffffff;
    transform: translateY(0);
}

.option-card h2 {
    font-size: 14px; 
    font-weight: bold;
    margin: 0 0 6px 0;
}

.option-card p {
    font-size: 13px; 
    line-height: 1.4;
    color: #333333;
    margin: 0;
}

/* 5. NAVIGATION BUTTON TRYS
   ------------------------------------------------------------------------- */
.confirm-container {
    display: flex;
    justify-content: flex-end; 
}

#confirm-btn {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #EF4444; 
    border: none;
    border-radius: 999px;
    padding: 8px 40px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

#confirm-btn:hover:not(:disabled) {
    background-color: #b32222;
    transform: scale(1.04);
}

#confirm-btn:active:not(:disabled) {
    transform: scale(0.98);
}

#confirm-btn:disabled {
    background-color: #555555; 
    color: #aaaaaa;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 6. PROGRESS HEADER TRACKER
   ------------------------------------------------------------------------- */
#progress-container {
    width: 100%;
    box-sizing: border-box;
    padding: 30px 40px 10px 40px; 
    gap: 6px; /* Tightened gap to accommodate 9 bars */
    display: flex;
}

.bar {
    display: block;
    flex: 1; 
    height: 6px; 
    background-color: rgba(255, 255, 255, 0.15); 
    border-radius: 999px; 
    transition: background-color 0.3s ease; 
}

.bar.active {
    background-color: rgba(255, 255, 255, 1); 
}

/* 7. MODIFIERS
   ------------------------------------------------------------------------- */
.hidden {
    display: none !important;
}

/* 8. JAR LABELS
   ------------------------------------------------------------------------- */

#jar-layer-wrapper { position: relative; width: 380px; height: 550px; }

#chart-labels { 
    position: absolute; 
    bottom: -10px; /* Sits just inside the bottom frame */
    left: 0;
    width: 100%;
    display: flex; 
    justify-content: space-between; 
    pointer-events: none;
    z-index: 10;
    padding: 0 45px; /* Pushes labels inward to align with the columns */
    box-sizing: border-box;
}

#chart-labels span {
    font-family: "Intel One Mono", monospace;
    font-size: 9px;
    color: #ffffffb3;
    text-align: center;
    width: 50px; /* Keeps labels tight under the orbs */
}

/* 9. SOURCES
   -------------------------------------------------------------------------*/

footer {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 20;
}

footer a {
    font-size: 12px;
    color: #ffffffb3;
    text-decoration: none;
}

footer a:hover {
    color: #ffffff;
}