/* session1.css - Specific styles for the first session */

.lecturer-intro {
    background-color: var(--secondary-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.reflection-box {
    background-color: #e7f3fe; /* Light blue */
    border: 1px solid #cce5ff;
}

.process-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    text-align: center;
}

.process-flow .step {
    padding: 0.5rem 1rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 600;
}

.process-flow .arrow {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.5em;
}

.collapsible-box {
    margin: 1.5rem 0;
}

.collapsible-trigger {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
    padding: 12px 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.collapsible-trigger:hover {
    background-color: #e2e6ea;
}

.collapsible-content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.collapsible-content ol {
    padding-top: 1rem;
}

/* === The Research Expedition Visualization === */

#expedition-container {
    margin: 2.5rem 0;
}

.expedition-map {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 1rem;
}

.expedition-stage {
    flex: 1;
    min-width: 100px;
    padding: 15px 10px;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.expedition-stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-color: #ccc;
}

.expedition-stage.active {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--accent-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    background-color: #fffaf8;
}

.stage-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.expedition-stage.active .stage-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stage-label {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9em;
    min-height: 2.5em; /* Ensures consistent height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-units {
    font-size: 0.75em;
    color: #888;
    margin-top: 5px;
    font-weight: 500;
}

.expedition-arrow {
    font-size: 2rem;
    color: #ccc;
    font-weight: bold;
    flex-shrink: 0;
}

/* Details Container */
.expedition-details-container {
    max-height: 420px !important;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.expedition-details-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease-out 0.1s, transform 0.4s ease-out 0.1s;
}

.expedition-details-container.show .expedition-details-content {
    opacity: 1;
    transform: translateY(0);
}

.expedition-details-content h4 {
    margin-top: 0;
    color: var(--accent-color);
    font-size: 1.3em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .expedition-map {
        flex-direction: column;
        gap: 15px;
    }
    .expedition-arrow {
        transform: rotate(90deg);
    }
    .stage-label {
        min-height: auto;
    }
}

/* === ENHANCED Expedition Details & Animations === */

.expedition-details-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.details-text {
    flex-basis: 55%;
    flex-shrink: 1;
}

.details-animation {
    flex-basis: 45%;
    flex-shrink: 0;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Context for absolute positioned items */
    background-color: #fff;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

/* --- Animation specific for Stage 1: The Blueprint --- */
#blueprint-animation {
    width: 100%;
    height: 100%;
}

.blueprint-word {
    position: absolute;
    background-color: #e3f2fd; /* Light blue */
    color: #1565c0; /* Darker blue text */
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid #bbdefb;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bouncy transition */
    opacity: 0;
}

#blueprint-animation.run-animation .blueprint-word {
    opacity: 1;
}

#blueprint-animation.focused .blueprint-word:not(.final-question) {
    transform: scale(0.1) rotate(360deg);
    opacity: 0;
}

.final-question {
    font-size: 1.1em !important;
    font-weight: bold !important;
    background-color: var(--accent-color) !important;
    color: white !important;
    border-color: transparent !important;
    padding: 10px 15px !important;
    z-index: 10;
    white-space: nowrap;
}

/* Responsive adjustments for the enhanced view */
@media (max-width: 768px) {
    .expedition-details-content {
        flex-direction: column;
    }
}

/* === Animation specific for Stage 2: Gearing Up === */

#gearing-up-animation {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    height: 100%;
}

.toolkit-prompt {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9em;
}

.toolkit-workbench {
    width: 100%;
    height: 100px;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.toolkit-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toolkit-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toolkit-item .item-icon {
    font-size: 3rem;
    line-height: 1;
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 50%;
    border: 2px solid #ced4da;
}

.toolkit-item.instrument .item-icon {
    font-size: 1.8rem;
    background-color: #fff;
}

.toolkit-item .item-name {
    font-size: 0.8em;
    font-weight: 500;
    color: #555;
    margin-top: 5px;
}

.toolkit-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 1rem;
}

.toolkit-button {
    flex: 1;
    max-width: 180px;
    padding: 8px 10px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid #adb5bd;
    border-radius: 5px;
    background-color: #fff;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolkit-button:hover {
    background-color: #f8f9fa;
    border-color: #6c757d;
}

.toolkit-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.toolkit-description {
    font-size: 0.85em;
    color: #333;
    text-align: center;
    min-height: 3.5em; /* Reserve space to prevent layout jumps */
    padding: 0 10px;
}

/* === Animation specific for Stage 3: In The Field === */

#data-collection-animation {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden; /* Important for the stream effect */
}

.collection-source {
    width: 100%;
    height: 80px;
    background: linear-gradient(180deg, #e3f2fd, #fafcff);
    position: relative;
    border-bottom: 2px solid #bbdefb;
    overflow: hidden;
}

@keyframes flow-source {
    from { transform: translateY(-100%); opacity: 0; }
    20% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateY(150%); opacity: 0; }
}

.source-item {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation-name: flow-source;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.collection-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
}

.collection-button {
    padding: 6px 12px;
    font-size: 0.8em;
    font-weight: 600;
    border: 1px solid #adb5bd;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-button:hover {
    background-color: #f8f9fa;
}

.collection-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.collection-path {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.collection-researcher {
    font-size: 3.5rem;
    transition: all 0.3s ease;
}

.collection-storage {
    text-align: center;
}

.storage-label {
    font-size: 0.75em;
    font-weight: bold;
    color: #6c757d;
}

.storage-bin {
    width: 80px;
    height: 60px;
    background-color: #e9ecef;
    border: 2px solid #ced4da;
    border-top: none;
    border-radius: 0 0 5px 5px;
    position: relative;
    padding: 4px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 3px;
}

.collected-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.collection-status {
    font-size: 0.8em;
    color: #555;
    text-align: center;
    padding-bottom: 10px;
    min-height: 1.2em;
}

/* Data point flying animation */
@keyframes fly-to-storage {
    0% {
        transform: translate(0, 0) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(150px, 60px) scale(0.5); /* Fly towards the bin */
        opacity: 0;
    }
}

.data-point {
    position: absolute;
    font-size: 1.2rem;
    padding: 2px;
    background: #fff;
    border-radius: 50%;
    z-index: 100;
    animation: fly-to-storage 1.5s ease-in forwards;
}

/* === Animation specific for Stage 4: Analysis & Finalization === */

#analysis-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    height: 100%;
    position: relative;
}

.engine-input, .engine-output {
    text-align: center;
}

.engine-data-label {
    font-size: 0.75em;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 5px;
}

.engine-data-pile, .engine-chart-container {
    width: 100px;
    height: 50px;
    background-color: #e9ecef;
    border: 2px solid #ced4da;
    border-radius: 5px;
    position: relative;
}

.raw-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #adb5bd;
    top: 50%;
    left: 50%;
    transform: translate(var(--rand-x, 0), var(--rand-y, 0));
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#analysis-animation.processing .raw-dot {
    opacity: 0;
    transform: translate(0, 0) scale(0);
}

.engine-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.engine-stage {
    padding: 10px;
    border: 2px solid #ced4da;
    border-radius: var(--border-radius);
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.engine-stage.active {
    background-color: #fff3cd; /* Yellow highlight */
    border-color: #ffc107;
}

.engine-stage .stage-icon {
    font-size: 1.5rem;
}

.engine-stage .stage-name {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--primary-color);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.engine-stage .stage-gears {
    font-size: 0.8rem;
    line-height: 1;
    margin-top: 5px;
    opacity: 0.5;
}

.engine-stage.active .stage-gears {
    animation: spin 1s linear infinite;
    opacity: 1;
}

.engine-arrow {
    font-size: 1.5rem;
    color: #ccc;
    font-weight: bold;
}

.engine-chart-container {
    padding: 5px;
}

.insight-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    height: 100%;
}

.insight-chart .bar {
    width: 25%;
    background-color: var(--primary-color);
    border-radius: 2px 2px 0 0;
    height: 0; /* Initial state for animation */
    transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.insight-chart .bar.visible {
    /* Height is set in-line */
}

.engine-button {
    position: absolute;
    bottom: 5px;
    padding: 6px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.engine-button:hover {
    background-color: #d73a0a;
    border-color: #d73a0a;
}

.engine-button:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* === UPGRADED Animation for Stage 5: The Summit === */

#presentation-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Align to the bottom */
    padding: 1rem;
    position: relative;
    overflow: hidden;
    height: 100%;
    background: linear-gradient(to top, #e3f2fd 0%, #ffffff 60%);
}

.summit-platform {
    width: 80px;
    height: 15px;
    background-color: #6c757d;
    border-radius: 5px 5px 0 0;
    position: relative;
    margin-bottom: 25px;
    z-index: 5;
}

.summit-researcher {
    font-size: 3rem;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.3s ease-in-out;
}

.summit-researcher.presenting {
    transform: translateX(-50%) scale(1.1);
}

.summit-button {
    position: absolute;
    bottom: 10px;
    padding: 6px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.summit-button:hover {
    background-color: #d73a0a;
}

.summit-button:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.summit-audiences {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.audience {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.audience-icon {
    font-size: 2.5rem;
    position: relative; /* For the checkmark */
    transition: filter 0.3s ease;
}

.audience-label {
    font-size: 0.6em;
    font-weight: 500;
    color: #555;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 4px;
    border-radius: 3px;
    margin-top: 2px;
}

.audience.received .audience-icon {
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.audience .audience-icon::after { /* The checkmark */
    content: '✔';
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 0.7em;
    color: white;
    background-color: #28a745; /* Green */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease-out 0.1s;
}

.audience.received .audience-icon::after {
    transform: scale(1);
    opacity: 1;
}

/* Insight Packet Animation */
@keyframes fly-packet {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    99% {
        transform: translate(var(--end-x), var(--end-y)) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--end-x), var(--end-y)) scale(1);
        opacity: 0;
    }
}

.insight-packet {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 0 8px var(--accent-color);
    z-index: 20;
    transform-origin: center center;
    opacity: 0; /* Hidden until fired */
}

.insight-packet.fire {
    animation: fly-packet 1s cubic-bezier(0.4, 0, 0.9, 0.6) forwards;
}

/* === Detailed Phase Content Section === */

#phase-details-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.phase-content-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 5px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    /* Animation will be handled by JS */
    transition: all 0.5s ease-in-out;
}

.phase-content-block h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5em;
}

.phase-content-block h4 {
    margin-top: 1.5rem;
    color: var(--text-color);
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.25rem;
}

.task-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.task-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.task-list .task-icon {
    font-size: 2rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.task-list ul {
    font-size: 0.9em;
    margin-top: 0.5rem;
}

/* === Animated Statistics Timeline === */

#stats-timeline-container {
    margin-top: 2.5rem;
    text-align: center;
}

.timeline-wrapper {
    margin: 2rem auto;
    padding: 2.5rem 1rem 1.5rem 1rem;
    position: relative;
    max-width: 800px;
    padding-top: 120px;
}

.timeline-track {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    position: relative;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0; /* Animated by JS */
    background-color: var(--accent-color);
    border-radius: 3px;
    transition: width 2.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.timeline-milestone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.milestone-dot {
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 4px solid #e0e0e0;
    border-radius: 50%;
    transition: all 0.3s ease-out;
}

.timeline-milestone.visible .milestone-dot {
    border-color: var(--accent-color);
    transform: scale(1.2);
}

.milestone-info {
    position: absolute;
    bottom: 30px; /* Position above the dot */
    min-width: 120px;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-align: center;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.timeline-milestone.visible .milestone-info {
    opacity: 1;
    transform: translateY(0);
}

.info-year {
    font-size: 0.9em;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.info-value {
    font-size: 2em;
    font-weight: bold;
    line-height: 1;
}

.info-label {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-context-note {
    margin-top: 1.5rem;
    font-size: 0.9em;
    color: #555;
    font-style: italic;
}


/* --- Brainstorming Tool Styles --- */
#brainstorm-tool {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
    position: relative;
    /* Needed for potential absolute children if any */
    transition: all 0.3s ease-in-out;
    /* For fullscreen */
}

.brainstorm-controls {
    display: flex;
    justify-content: flex-end;
    /* Align buttons to the right */
    gap: 10px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #ccc;
    flex-wrap: wrap;
    /* Allow buttons to wrap */
}

.brainstorm-controls button {
    /* Reuse existing button styles or define new */
    padding: 6px 12px;
    font-size: 0.9em;
    display: inline-flex;
    /* Align icon and text */
    align-items: center;
    gap: 5px;
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.brainstorm-controls button:hover:not(:disabled) {
    background-color: #eee;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.brainstorm-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Optional Icons (Emojis) */
#btn-visualize::before {
    margin-right: 3px;
}

#btn-export-csv::before {
    margin-right: 3px;
}

#btn-export-png::before {
    margin-right: 3px;
}

#btn-fullscreen::before {
    content: '↔️';
    margin-right: 3px;
}

#btn-close-modal {
    display: none;
    /* Hidden by default */
}

/* Input Sections */
.brainstorm-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Responsive columns */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-size: 0.9em;
}

.input-group input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1em;
    flex-grow: 1;
    /* Input takes space if button next */
    transition: border-color 0.2s ease;
}

.input-group .input-row {
    display: flex;
    gap: 5px;
}

.input-group .input-row button {
    padding: 8px 15px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9em;
    flex-shrink: 0;
    /* Prevent button shrinking */
}

.input-group .input-row button:hover {
    background-color: #d73a0a;
}

/* List Display Sections */
.brainstorm-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    min-height: 100px;
    /* Ensure lists have some height */
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.list-column h4 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
    font-size: 1.1em;
}

.brainstorm-list {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 80px;
    /* Min height for empty state */
}

.brainstorm-list li {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.brainstorm-list li.empty-list {
    border-style: dashed;
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    box-shadow: none;
}

.remove-item {
    cursor: pointer;
    color: #dc3545;
    /* Red */
    font-weight: bold;
    font-size: 1.2em;
    padding: 0 5px;
    margin-left: 10px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.brainstorm-list li:hover .remove-item {
    opacity: 1;
}

/* Visualization Area */
#brainstorm-visualization {
    position: relative;
    /* Needed for absolute positioned items */
    min-height: 500px;
    /* Ensure space for visualization */
    background-color: #fff;
    border: 1px dashed var(--primary-color);
    border-radius: var(--border-radius);
    margin-top: 1rem;
    padding: 10px;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

#brainstorm-visualization.active {
    opacity: 1;
    border-style: solid;
}

.empty-viz {
    text-align: center;
    color: #888;
    margin-top: 20px;
    font-style: italic;
}


.viz-item {
    display: inline-block;
    /* Needs display for sizing */
    position: absolute;
    /* Positioned by JS */
    padding: 4px 8px;
    border-radius: 15px;
    /* Pill shape */
    margin: 3px;
    /* Slight spacing handled by JS pos */
    cursor: default;
    transition: transform 0.2s ease;
    border: 1px solid transparent;
    /* Base border */
}

.viz-item:hover {
    transform: scale(1.1);
    z-index: 10;
    /* Bring to front on hover */
}

/* Assign colors based on category */
.viz-topic {
    background-color: #cfe2ff;
    border-color: #a6cfff;
    color: #003d80;
}

/* Blueish */
.viz-platform {
    background-color: #d1e7dd;
    border-color: #a3cfbb;
    color: #0a3622;
}

/* Greenish */
.viz-method {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #664d03;
}

/* Yellowish */

/* --- Fullscreen Modal Styles --- */
#brainstorm-tool.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(248, 249, 250, 0.98);
    /* Almost opaque background */
    overflow-y: auto;
    /* Allow scrolling within modal */
    padding: 2rem;
    /* More padding in fullscreen */
    border-radius: 0;
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    display: flex;
    /* Allow flex column layout for centering content */
    flex-direction: column;
}

/* Hide non-modal elements when active */
body.brainstorm-fullscreen-active {
    overflow: hidden;
    /* Prevent scrolling body behind modal */
}

/* Show close button only in fullscreen */
#brainstorm-tool.fullscreen-mode #btn-close-modal {
    display: inline-flex;
    position: absolute;
    /* Position relative to toolContainer */
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2em;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
}

#brainstorm-tool.fullscreen-mode #btn-close-modal::before {
    content: '×';
    /* Close icon */
}

#brainstorm-tool.fullscreen-mode #btn-fullscreen {
    display: none;
    /* Hide regular fullscreen button in modal */
}

#brainstorm-tool.fullscreen-mode .brainstorm-inputs,
#brainstorm-tool.fullscreen-mode .brainstorm-lists,
#brainstorm-tool.fullscreen-mode #brainstorm-visualization {
    max-width: 1200px;
    /* Optional: Limit content width within fullscreen */
    margin-left: auto;
    margin-right: auto;
    width: 95%;
    /* Ensure it doesn't touch edges */
}

#brainstorm-tool.fullscreen-mode #brainstorm-visualization {
    flex-grow: 1;
    /* Allow visualization to take more space */
    min-height: 400px;
}

/* === Group Former Game: "Find Your Research Tribe" === */

#group-former-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
}

.tribe-room {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Modern way to enforce 16:9 */
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    overflow: hidden; /* Keeps cards from visually spilling out */
}

.tribe-card {
    position: absolute;
    width: 40%;
    height: 40%;
    background-color: #fff;
    border: 2px solid #ced4da;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.tribe-card.disabled {
    cursor: not-allowed;
    filter: grayscale(80%);
}

.tribe-card:hover:not(.disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.tribe-card.selected {
    border-color: var(--accent-color);
    background-color: #fffaf8;
    transform: scale(1.08);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Card Positioning in Corners */
#card-a { top: 5%; left: 5%; }
#card-b { top: 5%; right: 5%; }
#card-c { bottom: 5%; left: 5%; }
#card-d { bottom: 5%; right: 5%; }

.card-content { text-align: center; }
.card-emoji { font-size: 2.5rem; line-height: 1; }
.card-text { font-weight: 600; color: var(--primary-color); font-size: 0.9em; margin-top: 5px; }
.card-label { position: absolute; top: 5px; left: 10px; font-weight: bold; color: #ccc; }

.peer-count {
    position: absolute;
    bottom: 5px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tribe-card.selected .peer-count {
    transform: scale(1);
}

.tribe-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 5px;
}

.question-area { text-align: center; }
#question-counter { font-size: 0.8em; color: #6c757d; font-weight: bold; display: block; }
#question-text { margin: 0; font-size: 1.1em; }

.timer-area { text-align: center; }
#timer-bar-container {
    width: 100%;
    height: 8px;
    background-color: #ced4da;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}
#timer-bar {
    width: 100%;
    height: 100%;
    background-color: #28a745; /* Green */
    border-radius: 4px;
    transition: width 1s linear, background-color 0.5s ease;
}
#timer-text { font-weight: bold; font-size: 1.1em; }

.tribe-button {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    justify-self: end;
}
.tribe-button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}
#start-game-btn { justify-self: center; }

.tribe-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(248, 249, 250, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}
.tribe-overlay.visible {
    opacity: 1;
    pointer-events: all;
}