/* ==========================================================
    GLOBAL STYLES AND LAYOUT
    (Applies to body, main page background, links, etc.)
    ========================================================== */
body {
    margin: 0;
    padding: 0 20px 20px 10px; /* Adjusted padding to accommodate fixed header */
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: block; /* Standard block layout for scrollable content */
    
    /* Background Properties (Combined using shorthand where possible) */
    background: #1a1a1a url('images/site_background.png') no-repeat center top fixed;
    background-size: cover;
    
    color: white;
}

/* Ensure the main content is pushed down so it doesn't hide behind the fixed banner */
body:not(.no-fixed-banner) {
    padding-top: 70px; 
}

/* Base container for content that sits over the background */
.main-content-layout {
    display: flex;
    min-height: calc(100vh - 150px);
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* General Link Styling */
a {
    color: #ffc300; /* Yellow accent */
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #fff;
}

.site-header {
    background: linear-gradient(to bottom, #0a0a1a 0%, #000 100%);
    border-bottom: 3px solid #ffc300;
    padding: 20px 40px;
    box-shadow: 0 4px 15px rgba(255, 195, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-logo {
    width: 50px;  /* Changed from 60px */
    height: 50px; /* Changed from 60px */
    object-fit: contain;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1600px;
    margin: 0 auto;
    gap: 30px;
}

.header-left,
.header-right {
    flex: 0 0 200px;
    display: flex;
    align-items: center;
}

.header-image-left,
.header-image-right {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.header-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-title {
    color: #ffc300;
    font-size: 2.5em;
    margin: 0;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.site-tagline {
    color: #fff;
    font-size: 1.2em;
    margin: 0;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* ==========================================================
   1. ALIGNMENT COLUMN STYLES (for DARK THEMES)
   ========================================================== */
.alignment-column {
    background-color: #332b00; /* Darker, desaturated gold/yellow background */
    color: #ffd700; /* Bright gold text */
    font-weight: bold;
    text-align: center;
    width: 120px;
}


/* ==========================================================
    MESSAGING STYLES (Error, Success, General)
    ========================================================== */
.error-message, .warning {
    background: #4a191c;
    color: #ffc300;
    border: 1px solid #721c24;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: #194a20;
    color: #c3e6cb;
    border: 1px solid #155724;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
}

.message {
    background: #333;
    color: #ffc300;
    border: 1px solid #ffc300;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.success-icon {
    font-size: 3em;
    color: #28a745;
    margin-bottom: 20px;
}


/* ==========================================================
    FORMS & CARD WRAPPERS (Login, Assessment Index, etc.)
    ========================================================== */
.login-form-container, 
.assessment-form-container {
    /* Combined styles for the dark card wrapper */
    background: rgba(30, 30, 30, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    text-align: center;
    margin: 20px auto;
    width: 90%;
}

.login-form-container { max-width: 500px; }
.assessment-form-container { max-width: 600px; }

/* Add vertical space to the header now that the wrapper margin is gone */
.header {
    margin-top: 50px; /* Use the 50px you had on the wrapper */
    padding: 0 20px; /* Add some padding to keep text off the edge */
}

.login-form-container .header h1,
.assessment-form-container h2 {
    color: #ffc300;
    margin-bottom: 10px;
}
.login-form-container .header h1 { font-size: 2.5em; }
.assessment-form-container h2 { font-size: 2.2em; margin-bottom: 30px;}

.login-form-container .header p {
    color: #ccc;
    font-size: 1.1em;
    line-height: 1.4;
}

/* --- Form Elements (Shared) --- */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label,
.assessment-form-container label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: bold;
    text-align: left;
}
.assessment-form-container label { margin-top: 15px; }

.form-group input,
.assessment-form-container input,
.assessment-form-container select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #555;
    background: #444;
    color: white;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
    margin-bottom: 10px;
}
.form-group input { margin-bottom: 0; }

.form-group input:focus,
.assessment-form-container input:focus,
.assessment-form-container select:focus {
    outline: none;
    border-color: #ffc300;
}

/* --- Buttons (Combined & Optimized) --- */
.submit-btn, .login-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

.submit-btn {
    background: #ffc300;
    color: #111;
    box-shadow: 0 4px 10px rgba(255, 195, 0, 0.4);
}
.submit-btn:hover {
    transform: translateY(-2px);
    background: #e6b000;
}

.login-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    color: white;
    text-decoration: none;
    display: inline-block;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}
.login-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
}

.submit-btn-wrapper { margin-top: 30px; }

/* --- Utility Links --- */
.forgot-password, .login-redirect-link { margin-top: 20px; text-align: center; }
.forgot-password a, .login-redirect-link a {
    color: #ffc300;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}
.login-redirect-link a { text-decoration: underline; font-size: 1.07em; }
.forgot-password a:hover { text-decoration: underline; }
.login-redirect-link a:hover { color: white; }

.home-link, .back-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
    text-align: center;
}
.home-link a, .back-links a {
    color: #ffc300;
    text-decoration: none;
    font-size: 0.95em;
    margin: 0 15px;
}
.home-link a:hover, .back-links a:hover { text-decoration: underline; color: #fff; }

/* --- Info/User Boxes (forgot/reset password) --- */
.info-box {
    background: #333;
    border: 1px solid #ffc300;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    color: #ffc300;
    font-size: 0.95em;
    line-height: 1.4;
    text-align: left;
}

.user-info {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: left;
    border-left: 4px solid #ffc300;
}
.user-info h3 {
    color: #ffc300;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}
.user-info p { margin: 5px 0; color: #ccc; }
.password-requirements { font-size: 0.9em; color: #aaa; margin-top: 5px; }


/* ==========================================================
    USER AREA / RESULTS STYLES (user-area.php)
    ========================================================== */

/* Find or create the .user-area-wrapper style */
.user-area-body {
    background: #000 !important;
    background-image: none !important;
    margin: 0;
    padding: 0;
}


.main-content-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
}

.user-area-wrapper {
    /* Ensure no unexpected horizontal padding or margin */
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto;
    margin-right: auto;
    /* You might want a small top/bottom margin */
    margin-top: 50px; 
    margin-bottom: 50px;
    
    /* CRITICAL: Ensure it can use 100% of the screen width */
    width: 100%;
    box-sizing: border-box; /* Includes padding in the total width */
}

.user-area-wrapper h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-align: center;
}

.domain-header {
    background: #ffc300;
    color: #1a1a1a;
    padding: 10px 15px;
    margin: 30px 0 20px 0;
    border-radius: 5px;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
}

.trait-overview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.trait-section, .trait-table-container {
    flex: 1 1 48%;
    min-width: 300px;
    border-radius: 10px;
}

.trait-table-container h2 {
    color: #ffc300;
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 15px;
}

.trait-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.trait-table thead {
    background: #333;
    color: #ffc300;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trait-table th, .trait-table td {
    padding: 12px 8px;
    text-align: left;
    border: 1px solid #444;
}

.trait-table .alignment-column {
    text-align: right;
    width: 100px;
    font-weight: bold;
}

.trait-table tbody tr:nth-child(even) { background-color: #303030; }
.trait-table tbody tr:hover { background-color: #404040; cursor: default; }

/* ==========================================================
   2. RESPONSIVE SIDEBAR LAYOUT STYLES (for DARK THEMES)
   ========================================================== */

/* 2a. Desktop/Tablet Layout (Default) */
.main-content-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.sidebar-nav {
    flex: 0 0 280px;
    width: 280px;
    background-color: #000;
    border-right: 2px solid #ffc300;
    padding: 20px 0;
    position: sticky;
    top: 150px; /* Stick below the header */
    height: calc(100vh - 150px);
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(255, 195, 0, 0.3);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #000;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.sidebar-header h2 {
    color: #ffc300;
    font-size: 1.5em;
    margin: 0;
    border: none;
    padding: 0;
}

/* Main content area */
.report-content {
    flex: 1;
    background: #1a1a1a;
    padding: 40px;
    overflow-y: auto;
}

/* Sidebar Specific Styles */
.sidebar-nav h2 {
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffd700;
    border-bottom: 2px solid #555;
    padding-bottom: 5px;
    text-transform: uppercase;
}

.sidebar-nav h3 {
    color: #ffc300;
    font-size: 1.1em;
    margin: 20px 20px 10px 20px;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 10px 20px 10px;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    text-decoration: none;
    color: #ccc;
    display: block;
    padding: 12px 15px;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 4px;
}

.sidebar-nav a:hover {
    color: #fff;
    background-color: #1a1a1a;
}

.separator {
    height: 1px;
    background-color: #444;
    margin: 0 20px;
}

.back-link {
    font-size: 0.9em;
    color: #777 !important;
    margin: 20px;
    display: block;
}

.back-link:hover {
    color: #aaa !important;
    background-color: transparent !important;
    text-decoration: underline !important;
}


/* ==========================================================
    ASSESSMENT SCENARIO PAGES (Parts 1 & 2)
    ========================================================== */

/* Ensure the generic assessment container is properly sized and centered */
/* Base container styles */
.assessment-scenario-container {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    text-align: center;
    position: relative; 
    max-width: 750px;
    width: 66%;
    margin: 20px auto; 
    padding: 40px;
}

/* Part 1 specific - vertically centered */
.assessment-scenario-container-part-1 {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    text-align: center;
    position: relative; 
    max-width: 650px;
    width: 90%;
    margin: 15vh auto; /* Vertically centered */
    padding: 40px;
}

/* Part 2 specific */
.assessment-scenario-container.part-2 {
    max-width: 1200px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Part 1 Styles */
.scenario-context { 
    color: #ffc300; 
    font-size: 1.8em; 
    font-weight: bold; 
    margin-bottom: 20px; 
}

.scenario-question-text { 
    color: white; 
    font-size: 2.2em; 
    font-weight: 500; 
    margin-bottom: 30px; 
    line-height: 1.3; 
    padding: 0 10px; 
}

.corner-audio-player {
    position: absolute; 
    top: 20px;      
    left: 15px;     
    width: 45px;    
    height: 45px;   
    overflow: hidden; 
    z-index: 10; 
}

/* 1. Base Flex Layout for the Checkpoint Page */
.trait-overview-container.traits-checkpoint-content {
    display: flex; 
    justify-content: center;
    gap: 0; /* Remove gap */
    margin-top: 30px;
    align-items: flex-start; 
    padding-left: 15px; 
    padding-right: 15px;
    width: 100%; 
    box-sizing: border-box;
}

/* Set fixed width for side tables */
.traits-checkpoint-content .trait-table-container {
    flex: 0 0 200px;
    width: 200px;
}

/* Center column - YOUR ORIGINAL */
.action-explanation-area.center-column {
    flex: 2 1 450px;
    margin-left: 0;
    margin-right: 0;
    width: 450px !important; 
    max-width: 100% !important; 
}

/* Add gap only on right side of left table */
.traits-checkpoint-content .trait-table-container.left-column {
    margin-right: 30px;
}

/* Add gap only on left side of right table */
.traits-checkpoint-content .trait-table-container.right-column {
    margin-left: 30px;
}

/* Table Styles */
/* General table styles (applies to both) */
.traits-checkpoint-content .trait-table {
    border-collapse: collapse;
    background-color: #333;
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Left table - align to the RIGHT side of its container */
.traits-checkpoint-content .trait-table-container.left-column .trait-table {
    width: 50% !important; /* Increased from 50% */
    margin-left: auto;
    margin-right: 0;
    margin-top: 15px;
}

/* Right table - align to the LEFT side of its container */
.traits-checkpoint-content .trait-table-container.right-column .trait-table {
    width: 50% !important; /* Increased from 50% */
    margin-left: 0;
    margin-right: auto;
    margin-top: 15px;
}
.traits-checkpoint-content .trait-table th,
.traits-checkpoint-content .trait-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.traits-checkpoint-content .trait-table th {
    background-color: #4a4a4a;
    color: #ffd700;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.traits-checkpoint-content .trait-table-container h2 {
    color: #ffd700;
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 15px;
}
.skip-button {
    display: block;
    text-align: center;
    margin: 10px auto;
}

.skip-container {
    background-color: #555; /* Gray background */
    padding: 1px 15px; /* Just enough space for text */
    text-align: center;
    border-radius: 4px; /* Optional: rounded corners */
    margin: 15px 0; /* Space above and below */
}

.skip-container .skip-button {
    color: #d4c5a9; /* Red-ish color for warning */
    text-decoration: none;
    font-size: 0.95em;
}

.skip-container .skip-button:hover {
    text-decoration: underline;
}

/* 1. Ensure the container is set up for inline-block centering (already done) */
.response-image-buttons-container {
    width: 100%;
    text-align: center; 
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Larger gap on desktop */
}

/* 2. Increase spacing using horizontal margin on the links */
.response-image-link { 
    display: inline-block; 
    
    /* CONTROL SIZE: Adjust this value (e.g., 100px - 150px) to control button size */
    width: 130px; 
    
    /* CONTROL SPACING: Increase this margin to create more space between buttons */
    margin: 0 35px; /* Increase 15px to 25px (or more, e.g., 35px) for more space */
    
    height: auto;
    transition: transform 0.2s, opacity 0.2s; 
    text-decoration: none;
}

/* 3. Ensure the image fills the link */
.response-image { 
    width: 100%;
    height: auto; 
    border-radius: 10px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); 
    display: block; 
}
.response-image-link:hover { transform: scale(1.05); opacity: 0.9; }

.key-hint-item { font-size: 0.9em; color: #ffc300; font-weight: bold; text-align: center; }
.key-hint-item:nth-child(even) { visibility: hidden; }
.key-hint-item:nth-child(1), .key-hint-item:nth-child(3), .key-hint-item:nth-child(5) {
    color: white; font-size: 1.2em;
}


/* Part 2 (Reactions Grid) Styles */
.part-2-question { font-size: 2.0em; margin-bottom: 20px; font-weight: 700; color: white; }
.question-title { color: #ffc300; font-size: 1.5em; font-weight: bold; margin-bottom: 15px; }
/* NOTE: The old .question-instruction is now part of the .scenario-instruction-card */
/* .question-instruction { color: #ccc; font-size: 1.0em; margin-bottom: 30px; line-height: 1.4; max-width: 700px; margin-left: auto; margin-right: auto; } */

/* --- REACTIONS GRID LAYOUT --- */
.reactions-grid {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.reaction-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reaction-block {
    position: relative;
    background: #333;
    color: white;
    border-radius: 10px;
    overflow: hidden;
    padding: 15px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex: 1; /* Make block fill available space */
}

/* --- CLICKABLE HALVES (CRITICAL FIX) --- */
.yes-half, .no-half {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 50; /* Ensure click area is on top */
    transition: background-color 0.15s;
}
.yes-half { left: 0; }
.no-half { right: 0; }

.skip-reaction-link {
    display: block;
    text-align: center;
    color: #999;
    font-size: 0.85em;
    text-decoration: none;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* --- OVERLAY TEXT AND LABELS (CRITICAL FIX) --- */
.reaction-text, .yes-label, .no-label { pointer-events: none; } /* Allow clicks to pass through */

.reaction-text {
    position: relative;
    z-index: 60; /* Above the halves */
    width: 90%;
    font-size: 1.0em;
    line-height: 1.3;
    font-weight: 500;
}

.reaction-block.skipped {
    background: #000 !important;
    opacity: 0.5;
    pointer-events: none;
}

.yes-label, .no-label {
    position: absolute;
    top: 5px;
    font-size: 0.7em;
    font-weight: bold;
    z-index: 70; /* Highest z-index for visibility */
    color: #888;
    transition: color 0.2s;
}
.yes-label { left: 8px; }
.no-label { right: 8px; }

/* --- HOVER STATES (Green/Red Tint) --- */
.reaction-block:hover .yes-half {
    background-color: rgba(0, 255, 0, 1); /* Subtle bright green tint on hover */
}
.reaction-block:hover .no-half {
    background-color: rgba(255, 0, 0, 1); /* Subtle bright red tint on hover */
}
.skip-reaction-link:hover {
    color: #ffc300;
    text-decoration: underline;
}

/* --- ANSWERED STATE STYLING (Bright Green & Bright Red) --- */
.reaction-block.answered-yes {
    /* Use a brighter background color that fills the block */
    background: #4CAF50; /* A clear, solid green color */
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.8); /* Keep the glow */
    border: 1px solid #00FF00;
}
.reaction-block.answered-no {
    /* Use a brighter background color that fills the block */
    background: #D32F2F; /* A clear, solid red color */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8); /* Keep the glow */
    border: 1px solid #FF0000;
}

/* Ensure all internal elements have the right color for the new bright background */
.reaction-block.answered-yes .reaction-text,
.reaction-block.answered-no .reaction-text {
    color: #fff; /* White text on the bright background for readability */
}

/* Also, remove the hover tints on the halves for answered blocks to prevent flickering */
.reaction-block.answered-yes .yes-half,
.reaction-block.answered-no .yes-half,
.reaction-block.answered-yes .no-half,
.reaction-block.answered-no .no-half {
    background-color: transparent !important;
}
.reaction-block.skipped::after {
    content: "Reaction Skipped";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffc300;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 100;
    pointer-events: none;
}

.reactivate-reaction-link {
    display: none; /* Hidden by default */
    text-align: center;
    color: #ffc300;
    font-size: 0.85em;
    text-decoration: none;
    margin-top: 5px;
    margin-bottom: 10px;
}

.reactivate-reaction-link:hover {
    text-decoration: underline;
    color: #fff;
}

/* Show reactivate link when parent wrapper has skipped block */
.reaction-wrapper.has-skipped .reactivate-reaction-link {
    display: block;
}

/* Hide skip link when skipped */
.reaction-wrapper.has-skipped .skip-reaction-link {
    display: none;
}

.reaction-block.skipped .reaction-text,
.reaction-block.skipped .yes-label,
.reaction-block.skipped .no-label {
    opacity: 0;
}
.reaction-block.answered-yes .yes-label { color: #00FF00; } /* Bright green label */
.reaction-block.answered-no .no-label { color: #FF0000; } /* Bright red label */
.reaction-block.answered-yes .no-label,
.reaction-block.answered-no .yes-label { color: #444; }

/* --- Shared Elements (Leave & Progress) --- */
.leave-assessment-link { display: block; text-align: center; margin-top: 30px; font-size: 0.9em; color: #999; }
.leave-assessment-link:hover { color: #ffc300; }
.progress-indicator { text-align: center; color: #ccc; font-size: 0.95em; margin-top: 10px; }
.progress-section {
    /* Add a little space above the message area */
    margin-top: 30px; 
    text-align: center;
}

.completion-message,
.loading-message {
    /* Initially hide the messages until JavaScript shows them */
    display: none; 
}


/* ==========================================================
    SCENARIO & INSTRUCTION CARD STYLING
    ========================================================== */

/* Wrapper for the Save Link and the main scenario card */
.header-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

/* --- Save Progress Button --- */
.save-progress-area {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
    
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 5px;
    
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.save-progress-link {
    color: #ffc300 !important;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}

.save-progress-link:hover {
    color: white !important;
}

/* --- Scenario/Instruction Card --- */
.scenario-instruction-card {
    background: rgba(30, 30, 30, 0.85); 
    border-radius: 10px;
    padding: 30px 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin-top: 10px;
}

.step-indicator {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Re-style the main question text within the new card */
/* Reusing .scenario-question-text from above, but scoped to the card if needed */

.question-instruction-text {
    border-top: 1px solid #444;
    padding-top: 20px;
    margin-top: 20px;
    color: #ccc;
    font-size: 1.05em;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* --- Scenario/Instruction Card --- */
/* ... (existing CSS above this point for .scenario-instruction-card) ... */

.step-indicator {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Re-style the main question text within the new card */
.scenario-question-text {
    color: white;
    font-size: 2.4em; /* Keep this size as it's the main scenario text */
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.3;
}

.question-instruction-text {
    border-top: 1px solid #444;
    padding-top: 20px;
    margin-top: 20px;
    color: #ccc;
    font-size: 1.05em; /* Keep instructions the current size */
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    font-weight: bold; /* Make all instruction text bold */
}

.question-instruction-text p:first-child {
    font-weight: bold;
    color: #ffc300;
    font-size: 1.9em; /* Make "What would you do?" bigger */
    margin-bottom: 10px;
}

/* ==========================================================
    INSTRUCTIONS BANNER (STICKY TOP HEADER)
    ========================================================== */

.instructions-banner {
    width: 100%;
    background: rgba(30, 30, 30, 1.0);
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 1.05em;
    font-weight: 500;
    line-height: 1.5;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
}
/* ==========================================================
    MEDIA QUERIES - ALL RESPONSIVE STYLES
    ========================================================== */

/* Large Tablets and Small Laptops */
@media (max-width: 1200px) {
    .response-image-link {
        width: 110px;
        margin: 0 20px;
    }
}

/* Tablets */
@media (max-width: 900px) {
    /* Assessment container */
    .assessment-scenario-container {
        width: 90%; 
    }
    
    /* Checkpoint page tables */
    .trait-overview-container.traits-checkpoint-content {
        flex-direction: column; 
        gap: 40px; 
        padding: 0 10px; 
    }
    
    .traits-checkpoint-content .trait-table-container,
    .action-explanation-area.center-column {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Result Tables */
    .trait-overview-container { 
        flex-direction: column; 
    }
    
    .trait-section, .trait-table-container { 
        flex: 1 1 100%; 
        min-width: unset; 
    }
    
    .user-area-wrapper { 
        padding: 20px; 
    }
    
    /* Reactions Grid (Tablet) */
    .reactions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 600px;
    }
}

/* Sidebar/Report Layout */
@media (max-width: 800px) {
    /* Change Flex Direction to Stack */
    .main-content-layout {
        flex-direction: column;
        gap: 0;
    }
    
    /* Make Sidebar Full Width */
    .sidebar-nav {
        flex: none;
        width: 100%;
        padding: 15px;
        margin-bottom: 30px;
        position: static;
        top: auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    /* Adjust list layout for mobile menu style */
    .sidebar-nav h2 {
        text-align: center;
        border-bottom: 1px solid #555;
        margin-bottom: 10px;
    }
    
    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
    }
    
    .sidebar-nav li {
        margin: 5px 10px;
    }
    
    .sidebar-nav a {
        padding: 5px 15px;
        white-space: nowrap;
        border: 1px solid #333;
    }
    
    .separator, .back-link {
        display: none;
    }
    
    /* Adjust Main Content Spacing */
    .report-content {
        padding: 0 15px;
    }
}

/* Mobile Phones */
@media (max-width: 600px) {
    /* Global mobile background */
    body {
        background-image: url('/images/site_background_mobile.png');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
    
    /* Forms & Wrappers */
    .login-form-container,
    .assessment-form-container { 
        padding: 30px 20px; 
        margin: 20px auto; 
    }
    
    .tab-button { 
        padding: 12px; 
        font-size: 0.9em; 
    }
    
    .home-link a, .back-links a { 
        display: block; 
        margin: 10px 0; 
    }
    
    /* User area */
    .user-area-wrapper { 
        padding: 15px; 
    }
    
    .user-area-wrapper h1 { 
        font-size: 1.8em; 
    }
    
    /* Tables */
    .trait-table th, .trait-table td { 
        padding: 10px 5px; 
        font-size: 0.9em; 
    }
    
    /* Assessment container */
    .assessment-scenario-container {
        width: 95%;
        padding: 20px;
    }
    
    /* Part 1 Assessment */
    .assessment-scenario-container.part-1 { 
        padding: 30px 20px; 
    }
    
    .scenario-context { 
        font-size: 1.5em; 
    }
    
    .scenario-question-text { 
        font-size: 1.7em; 
        margin-bottom: 25px; 
    }
    
    .key-hints { 
        max-width: 100%; 
        font-size: 0.8em; 
    }
    
    /* Response buttons */
    .response-image-buttons-container {
        display: flex;
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
        margin-top: 20px;
    }
    
    .response-image-link {
        flex: 1 1 0;
        max-width: 90px;
        margin: 0;
    }
    
    .response-image {
        width: 100%;
        height: auto;
        display: block;
    }
    
    /* Instructions banner */
    .instructions-banner {
        padding: 8px;
        font-size: 0.8em;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Save button mobile fix */
    .save-progress-area {
        position: static;
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
        box-shadow: none;
        background: none;
    }
    
    .save-progress-link {
        color: #ffc300 !important;
        font-size: 1em;
    }
    
    .scenario-instruction-card {
        padding: 20px 15px;
        margin-top: 0;
    }
    
    /* Part 2 Reactions Grid */
    .reactions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 90%;
    }
    
    .reaction-text { 
        font-size: 1.0em; 
    }
    
    .assessment-scenario-container.part-2 { 
        padding: 10px; 
        margin: 20px auto; 
    }
}