@font-face {
  font-family: 'Press Start 2P';
  src: url('https://nerktendo.com/fonts/PressStart2P-Regular.ttf') format('truetype'), url('fonts/PressStart2P-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --screen-bg: #8bac0f;
  --screen-border: #0f380f;
  --text-color: #0f380f;
  --dark-bg: #2c3e50;
  --light-text: #d0d2d6;
  --button-bg: #4a4e54;
  --button-border: #1a1c1e;
}

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

body {
  width: 100vw;
  height: 100vh;
  font-family: 'Press Start 2P', monospace;
  background-color: var(--dark-bg);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 30px 30px;
  color: var(--text-color);
  line-height: 1.5;
  overflow: hidden;
}
/* Added to prevent body scroll when a modal is active */
body.modal-active-no-scroll {
    overflow: hidden !important;
}

#mobile-prompt {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 450px;
    background-color: rgba(0,0,0,0.85);
    color: white;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #fff;
    text-align: center;
    z-index: 2000;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

#mobile-prompt h3 {
    margin-bottom: 15px;
    color: var(--screen-bg);
    text-transform: uppercase;
    font-size: 16px;
}

#mobile-prompt p {
    margin-bottom: 10px;
}

#mobile-prompt .click-to-close {
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.7;
    font-style: italic;
}


@media (max-width: 1200px) {
    #mobile-prompt {
        display: block; /* Shown only on mobile */
    }
}

.main-header {
    font-size: 28px;
    color: #d0d2d6;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    text-transform: uppercase;
}

.gameboy-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  /* height: auto; Changed for mobile to fill screen */
  height: 100%; /* Fill parent (body, which is 100vh) */
  box-sizing: border-box;
  gap: 10px; /* Adjusted gap for tighter mobile layout */
  padding: 10px 0 5px 0; /* Adjusted padding */
  overflow: hidden; /* Prevent this container from scrolling if content is unexpectedly large */
}

.gameboy {
  background-image: url('images/ui/gameboy_background_1600_2.webp');
  background-repeat: no-repeat;
  /* The background-size and background-position are now controlled by JavaScript to ensure pixel-perfect alignment. */
  width: 100%;
  /* height: 100%; is removed to allow aspect-ratio to work */
  aspect-ratio: 2 / 3; /* Giving the div an intrinsic ratio */
  max-width: 800px;
  position: relative;
  /* order, flex-grow, flex-shrink, min-height are removed from here,
     as it's no longer a direct flex child managing gameboy-container's space.
     It will be a flex child of game-area-mobile. */
  flex-shrink: 1; /* Allow Gameboy to shrink if game-area-mobile's height is constrained */
  min-height: 0;  /* Crucial for aspect-ratio to work with flex-shrink within game-area-mobile */
}

.screen-container, .dpad, .action-buttons, .menu-buttons, .btn-select, .btn-start, .power-light {
    position: absolute;
    transform-origin: top left;
    pointer-events: auto;
}

.screen-container {
    width: 408px; 
    height: 370px;
}

.screen {
  width: 100%;
  height: 100%;
  background-color: var(--screen-bg);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  transition: background-color 0.8s ease-in-out, box-shadow 0.8s ease-in-out, transform 0.3s ease-in-out, border-radius 0.3s ease-in-out;
  transform-origin: center center;
}

.screen.screen-enlarged {
    transform: scale(1.8);
    border-radius: 8px;
    z-index: 10;
}


.screen.screen-off {
    background-color: #081820; 
    box-shadow: none;
}

.power-light {
    width: 13px;
    height: 13px;
    background-color: #f00;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 5px #f00, 0 0 10px #f00, 0 0 15px #f00;
    transition: opacity 0.05s ease-in; 
}

.power-light.on {
    opacity: 1;
    animation: glow 1s infinite alternate ease-in-out;
}

@keyframes glow {
    from {
        box-shadow: 0 0 4px #f00, 0 0 8px #f00, 0 0 12px #ff4d4d;
    }
    to {
        box-shadow: 0 0 8px #f00, 0 0 16px #ff4d4d, 0 0 24px #ff8080;
    }
}

.screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  pointer-events: none;
  z-index: 2;
}

.screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
  pointer-events: none;
  z-index: 2;
}

#screen-content {
  width: 100%;
  height: 100%;
  padding: 8px;
  overflow: hidden; 
  font-size: 14px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

#mute-toggle {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 3;
    cursor: pointer;
    color: rgba(15, 56, 15, 0.4);
    transition: color 0.2s;
}
#mute-toggle:hover {
    color: rgba(15, 56, 15, 0.8);
}
#mute-toggle svg {
    width: 30px;
    height: 30px;
}

.enlarge-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 3;
    cursor: pointer;
    color: rgba(15, 56, 15, 0.4);
    transition: color 0.2s;
}
.enlarge-icon:hover {
    color: rgba(15, 56, 15, 0.8);
}
.enlarge-icon svg {
    width: 30px;
    height: 30px;
}

.scroll-wrapper::-webkit-scrollbar,
.guestbook-textarea::-webkit-scrollbar,
.project-items::-webkit-scrollbar,
.menu-items::-webkit-scrollbar,
.skill-nodes-area::-webkit-scrollbar {
  width: 5px;
}

.scroll-wrapper::-webkit-scrollbar-track,
.guestbook-textarea::-webkit-scrollbar-track,
.project-items::-webkit-scrollbar-track,
.menu-items::-webkit-scrollbar-track,
.skill-nodes-area::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.scroll-wrapper::-webkit-scrollbar-thumb,
.guestbook-textarea::-webkit-scrollbar-thumb,
.project-items::-webkit-scrollbar-thumb,
.menu-items::-webkit-scrollbar-thumb,
.skill-nodes-area::-webkit-scrollbar-thumb {
  background: rgba(15, 56, 15, 0.5);
}

.dpad { width: 180px; height: 180px; }
.action-buttons { width: 180px; height: 80px; }
.menu-buttons {
    width: 210px; 
    height: 30px;
}

.dpad-center {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.dpad-up, .dpad-right, .dpad-down, .dpad-left {
    position: absolute;
    cursor: pointer;
    transition: all 0.1s;
    background-color: transparent;
    border-radius: 5px;
}

.dpad-up, .dpad-down { width: 70px; height: 70px; left: 33%; transform: translateX(-50%); }
.dpad-left, .dpad-right { width: 70px; height: 70px; top: 44%; transform: translateY(-50%); }
.dpad-up { top: -10%; }
.dpad-right { right: 10%; }
.dpad-down { bottom: 0; }
.dpad-left { left: -25%; }

.btn-a, .btn-b {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    background-color: transparent;
    position: absolute;
}

.btn-b { top: 52px; left: 22px; }
.btn-a { top: -6px; right: -70px; }

.btn-select, .btn-start {
    width: 92px;
    height: 30px;
    cursor: pointer;
    border-radius: 15px;
}

.dpad-up:hover, .dpad-right:hover, .dpad-down:hover, .dpad-left:hover,
.btn-a:hover, .btn-b:hover, .btn-select:hover, .btn-start:hover,
.dpad-up.active, .dpad-right.active, .dpad-down.active, .dpad-left.active,
.btn-a.active, .btn-b.active, .btn-select.active, .btn-start.active {
  background-color: rgba(0, 0, 0, 0.15);
}

.instructions-container {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* On mobile, instructions-container (for header) should take full width */
    width: 100%;

}

/* New wrapper for Gameboy and its mobile controls */
.game-area-mobile {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center Gameboy and controls horizontally */
    width: 100%;         /* Take full width available in the column */
    order: 2;            /* Position after instructions-container on mobile */
    flex-grow: 1;        /* Allow this area to grow and shrink */
    flex-shrink: 1;
    min-height: 0;       /* Important for shrinking content with aspect ratio */
}

.instructions {
    display: none;
    font-size: 14px;
    background-color: #30343a;
    color: var(--light-text);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--button-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}
.instructions h2 { 
    margin-bottom: 25px; 
    text-align: center;
    color: var(--screen-bg);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #4a4e54;
    padding-bottom: 10px;
}

.control-group {
    margin-bottom: 20px;
}

.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.control-row .key-icon {
    background-color: var(--button-bg);
    border: 1px solid #2a2c2e;
    border-radius: 4px;
    padding: 5px 10px;
    margin-right: 10px;
    box-shadow: 1px 1px 0 #5a5e64, 2px 2px 3px rgba(0,0,0,0.4);
    font-size: 12px;
    color: #f0f0f0;
    min-width: 30px;
    text-align: center;
}

.action-text {
    color: var(--light-text);
}

.boot-animation { text-align: center; padding-top: 100px; }
.nintendo-logo { font-size: 24px; margin-bottom: 40px; position: relative; }

.nintendo-logo::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
}

.boot-progress-bar {
    width: 80%;
    height: 10px;
    border: 2px solid var(--text-color);
    margin: 0 auto;
    padding: 1px;
}

.boot-progress-fill {
    width: 0;
    height: 100%;
    background-color: var(--text-color);
    animation: fill-progress 1.75s cubic-bezier(0.75, 0, 0.25, 1) forwards; /* Adjusted to match bootAnimationDuration */
}

@keyframes fill-progress {
    from { width: 0%; }
    to { width: 100%; }
}

.start-menu {
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.nerktendo { font-size: 22px; margin-bottom: 20px; padding-top: 50px;}
.author { font-size: 14px; margin-bottom: 35px; }
.start-prompt {
    margin-top: auto;
    padding-bottom: 15px;
    font-size: 16px;
    animation: blink 1.75s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.main-menu, .projects-menu {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.main-menu h2, .projects-menu h2 { 
    font-size: 18px; 
    margin-bottom: 15px; 
    text-align: center;
    flex-shrink: 0; 
}

.menu-items, .project-items {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0; /* Flexbox fix for overflow */
}
.menu-item, .project-item { padding: 10px; font-size: 16px; border-radius: 5px; cursor: pointer;}
.menu-item.active, .project-item.active { background-color: rgba(15, 56, 15, 0.2); }
.menu-item.active::before, .project-item.active::before { 
    content: "►"; 
    margin-right: 10px; 
    position: relative;
    top: -4px;
}

.submenu-description {
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
    margin: 0px 5px 15px 5px;
    flex-shrink: 0; /* Prevent description from shrinking */
}

.page-content, .project-gallery, .game-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.page-title { 
    font-size: 18px; 
    margin-bottom: 10px; 
    text-align: center; 
    flex-shrink: 0; 
}
.scroll-wrapper {
    flex-grow: 1; 
    overflow: auto; 
    padding-right: 5px; 
    position: relative; 
    min-height: 0;
}

.about-image {
    width: 120px;
    height: 179px;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--text-color);
    float: right;
    margin-left: 8px;
    margin-bottom: 5px;
}
.about-text {
     font-size: 12px; line-height: 1.6;
}
.contact-description, .project-description {
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.contact-description {
    text-align: center;
}
.club-description { font-size: 14px; ; text-align: center; line-height: 1.6; }

.list-title {
    font-size: 16px;
    text-transform: uppercase;
    margin-top: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 5px;
}

.skills-list {
    list-style-type: none;
    padding-left: 10px;
    margin-bottom: 15px;
}

.skills-list li {
    margin-bottom: 10px;
    font-size: 12px;
}

.skills-list li::before {
    content: "▪";
    margin-right: 10px;
}

/* SKILL TREE Page Enhancements */
.skills-list {
    padding-left: 15px; /* Reduce overall left padding for the main list */
}

.skills-list > li {
    margin-bottom: 12px; /* More space between top-level items */
    font-size: 13px; /* Slightly larger base font for skills */
    line-height: 1.5;
}

/* Style for category <li> elements */
.skills-list > li.skills-category-item {
    margin-bottom: 15px; /* Extra space after a category block */
}

/* Remove default bullet from category <li> elements */
.skills-list > li.skills-category-item::before {
    content: ""; /* Remove the default bullet */
    margin-right: 0; /* Remove space taken by the bullet */
}

/* Style for direct skill <li> elements (no sub-list) */
.skills-list > li.skills-direct-item {
    margin-bottom: 15px; /* Match category item spacing for consistency */
}

/* Remove default bullet from direct skill <li> elements */
.skills-list > li.skills-direct-item::before {
    content: ""; /* Remove the default bullet */
    margin-right: 0; /* Remove space taken by the bullet */
}

/* Style for category titles (strong elements) */
.skills-list strong {
    display: block; /* Default for Level 1 titles and direct skills */
    font-size: 15px; /* Level 1: Top-level category titles and direct skills */
    color: var(--text-color);
    margin-bottom: 8px;
}

/* Level 2: Sub-category titles (e.g., "Modeling and rendering:") - Override display for nesting */
.skills-sub-list > li.skills-sub-category-item > strong {
    font-size: 12px; /* Slightly smaller than top-level titles */
    margin-bottom: 6px; /* Adjust spacing */
}

/* Style for sub-lists */
.skills-sub-list { /* Second level ul */
    list-style-type: none; /* Remove default bullets from sub-list ul */
    padding-left: 15px;  /* Indentation for sub-items */
    margin-top: 5px;     /* Space above the sub-list (after the strong title) */
}

/* Style for sub-list items (second level) */
/* This applies to <li> elements that are direct skills at level 2, or containers for sub-category titles */
.skills-sub-list > li {
    font-size: 12px; /* Level 2: Actual skills under a main category and sub-category titles */
    margin-bottom: 7px;
    line-height: 1.4;
    position: relative; /* Needed for absolute positioning of ::before */
    padding-left: 20px; /* Make space for the bullet and ensure wrapped lines indent here */
}

/* Remove bullet from li elements that are sub-category titles */
.skills-sub-list li.skills-sub-category-item::before {
    content: ""; /* Remove the dash bullet */
    margin-right: 0;
}
/* Removed specific padding/indent for sub-category-item to allow it to align with other L2 text */
.skills-sub-list > li.skills-sub-category-item {
    /* It will inherit padding-left: 20px and text-indent: -20px from .skills-sub-list > li */
    /* The ::before rule above ensures no bullet character is shown */
}

/* Style for sub-sub-lists (third level) */
.skills-sub-sub-list { /* Third level ul */
    list-style-type: none; /* Remove default bullets */
    padding-left: 15px;  /* Indentation for sub-sub-items, relative to parent li */
    margin-top: 5px;     /* Space above the sub-sub-list (after its strong title) */
}

/* Style for sub-sub-list items (third level) */
.skills-sub-sub-list > li {
    font-size: 11px; /* Level 3: Actual skills under a sub-category */
    margin-bottom: 6px; 
    line-height: 1.3;
    position: relative; /* Needed for absolute positioning of ::before */
    padding-left: 20px; /* Consistent padding for L3 items */
    text-indent: -20px; /* Consistent indent for L3 items */
}

/* Custom bullet for Level 2 skill items */
.skills-sub-list.skills-list li::before {
    content: "-\00A0"; /* Use a dash and a non-breaking space */
    position: absolute;
    left: 0;
}

/* Custom bullet for Level 3 skill items */
.skills-sub-sub-list.skills-list li::before {
    content: "◦\00A0"; /* Use a small circle bullet and a non-breaking space */
    position: absolute;
    left: 0;
}

/* --- HORIZONTAL GANTT CHART STYLES --- */
.gantt-container-horizontal {
    width: 100%;
    height: 100%;
    font-size: 11px;
    display: flex;
    flex-direction: column;
}

.gantt-header {
    flex-shrink: 0;
    display: flex;
    border-bottom: 2px solid var(--text-color);
    position: sticky;
    top: 0;
    background-color: var(--screen-bg); 
    z-index: 3;
}

.gantt-year-header {
    flex-shrink: 0;
    padding: 5px;
    text-align: center;
    font-size: 12px;
    color: var(--text-color);
    border-right: 1px dashed var(--text-color);
}

.gantt-chart-area-horizontal {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    width: 100%; 
}

.gantt-job-bar-horizontal {
    position: absolute;
    background-color: rgba(15, 56, 15, 0.2);
    border: 1px solid var(--text-color);
    border-radius: 3px;
    padding: 4px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background-color 0.2s;
    overflow: hidden;
    white-space: nowrap;
}

.gantt-job-bar-horizontal:hover {
    background-color: rgba(15, 56, 15, 0.4);
}

.gantt-job-title-horizontal {
    font-size: 11px;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-job-company-horizontal {
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-job-dates-horizontal {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* --- END GANTT CHART STYLES --- */
/* --- NEW SKILL TREE STYLES --- */
.skill-tree-container {
    display: flex; /* Lays out columns horizontally */
    flex-direction: row;
    padding: 10px;
    gap: 20px; /* Space between columns */
    height: 100%; /* Fill the scroll-wrapper */
    align-items: flex-start; /* Align columns to the top */
}

.skill-tree-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center header and nodes-area within the column */
    background-color: rgba(15, 56, 15, 0.05);
    border: 1px solid var(--text-color);
    border-radius: 8px;
    padding: 10px;
    width: 240px;
    height: 100%; /* Adjust to fit within container padding */
    flex-shrink: 0; /* Prevent columns from shrinking */
}

.skill-tree-column.active-column {
    background-color: rgba(15, 56, 15, 0.13); /* Darker background for active column */
    /* border-color: #a5c73f; Slightly lighter/brighter border for active column */
}

.skill-category-header {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--text-color);
    text-align: center;
    width: 100%;
}

.skill-nodes-area {
    width: 100%;
    overflow-y: auto; /* Allow vertical scrolling if nodes exceed column height */
    padding-right: 5px; /* For scrollbar */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center node groups */
}

.skill-node-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 5px; /* Space before connector */
}

.skill-node {
    background-color: transparent;
    border: 2px solid var(--text-color);
    border-radius: 5px;
    padding: 8px 10px;
    margin-bottom: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--text-color);
    width: 90%; /* Relative to parent (.skill-node-group or .skill-nodes-area) */
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.skill-node.active {
    background-color: rgba(15, 56, 15, 0.15);
    box-shadow: 0 0 8px rgba(139, 172, 15, 0.7);
}
.skill-node-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: var(--text-color); /* Ensure icons use the theme color */
}
.skill-node-text {
    flex-grow: 1;
    text-align: left;
}

.sub-skill-nodes-container {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Make sub-nodes take full width of this container */
    width: calc(90% - 20px); /* Slightly narrower and indented */
    margin-left: 20px; /* Indent L3 nodes */
    margin-top: 5px;
}
.skill-node-l3 { /* Specific styling for L3 nodes */
    font-size: 10px;
    padding: 5px 8px;
}
.skill-node-connector {
    width: 2px;
    height: 15px; /* Height of the line */
    background-color: var(--text-color);
    margin-bottom: 5px; /* Space after connector */
}
/* --- END SKILL TREE STYLES --- */

.email-address-display {
    margin-bottom: 8px; /* Space between email and copy button */
    text-align: center; /* Center the email address text */
    cursor: pointer;
}

.contact-items {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 3px; 
}
.contact-item, .club-button, .project-link-button {
    display: block;
    width: fit-content;
    margin: 15px auto 0 auto;
    padding: 10px 15px;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative;
    text-decoration: none;
    color: var(--text-color);
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
}

.contact-item.active, .club-button.active, .project-link-button.active {
    border-color: var(--text-color);
}
.contact-item:hover, .club-button:hover, .project-link-button:hover {
    background-color: rgba(15, 56, 15, 0.2);
}

.project-gif-image {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 10px auto;
    border: 2px solid var(--text-color);
    filter: grayscale(1) contrast(1) sepia(100%) hue-rotate(55deg) saturate(2);
}
.project-gif-image.augmented-review-gif {
  width: 100%; /* Or a fixed width if you prefer, but 100% makes it responsive */
  max-width: 320px; /* Retain max-width from .project-gif-image */
  aspect-ratio: 16 / 9;
  background-color: #3a3a3a; /* Darker placeholder for screen-like content */
  object-fit: contain; /* Ensures the GIF fits within the aspect ratio box without cropping */
}
.project-gif-image.project-gif-image-glitch-qr {
    width: 150px;
    height: 150px;
    /* object-fit: contain; /* Optional: if you want to ensure the whole image fits without cropping */
}

.project-local-video {
    display: block;
    width: 100%; /* Responsive within its container */
    max-width: 320px; /* Max width as requested */
    height: auto; /* Maintain aspect ratio */
    margin: 0 auto 10px auto; /* Center and add bottom margin */
    border: 2px solid var(--text-color); /* Consistent border */
    filter: grayscale(1) contrast(1) sepia(50%) hue-rotate(55deg) saturate(2); /* Gameboy color effect */
}
.project-local-video::-webkit-media-controls { display:none !important; }
.project-local-video::-webkit-media-controls-enclosure { display:none !important; }
.project-local-video::-webkit-media-controls-panel { display:none !important; }

.project-gif-image.project-gif-image-glitch-qr {
    width: 150px;
    height: 150px;
    /* object-fit: contain; /* Optional: if you want to ensure the whole image fits without cropping */
}

.project-gallery .image-container { 
    display: block; /* Allows margin: auto for centering */
    width: fit-content; /* Key change: container width fits the image */
    max-width: 100%; /* Ensures container doesn't exceed scroll-wrapper width */
    flex-shrink: 0;
    height: 180px;
    background-color: #000;
    margin: 0 auto 10px auto;
    position: relative;
    border: 2px solid var(--text-color);
    /* line-height: 0; /* Removes potential extra space if img were inline-block */
}

/* Styles for the new <img> tag used in the gallery */
.project-gallery .gallery-image-tag {
    display: block;
    height: 100%; /* Fills the container's 180px height */
    width: auto;   /* Width adjusts to maintain aspect ratio */
    max-width: 100%; /* Ensures image doesn't overflow container (if container is constrained by its max-width) */
    object-fit: contain; /* Scales image down, letterboxing if necessary, to fit within its bounds */
    filter: grayscale(1) contrast(1) sepia(100%) hue-rotate(55deg) saturate(2);
}

/* Old .gallery-image (div with background) styles - can be removed if not used elsewhere */
/*
.project-gallery .gallery-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
*/

.project-gallery .image-container::after { /* Moved from .gallery-image::after */
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, rgba(15, 56, 15, 0.15), rgba(15, 56, 15, 0.15) 1px, transparent 1px, transparent 3px);
    pointer-events: none;
}
.project-gallery .image-counter { text-align: center; font-size: 12px; margin-bottom: 5px; flex-shrink: 0; }
.project-gallery .project-description { font-size: 12px; line-height: 1.5; text-align: left; margin-top: 10px; }

/* Styles for the new scrollable gallery with captions */
.scroll-gallery-item {
    margin-bottom: 20px;
}
.scroll-gallery-image {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 10px auto;
    border: 2px solid var(--text-color);
}
.scroll-gallery-caption {
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    font-style: italic;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(15, 56, 15, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.play-icon::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 20px solid var(--screen-bg);
    margin-left: 5px;
}
.documentation-placeholder {
    width: 90%;
    height: 180px;
    border: 2px solid var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 15px auto;
    padding: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

.navigation-hint { 
    font-size: 11px; 
    text-align: center; 
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px dashed var(--text-color); 
    flex-shrink: 0; 
    width: 100%
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding-top: 2vh;
}
.modal-overlay.visible {
    display: flex;
}

.modal-dialog { /* For Image Modal */
    font-family: 'Press Start 2P', sans-serif;
    color: var(--light-text);
    background-color: var(--dark-bg);
    border: 2px solid var(--light-text);
    border-radius: 10px; /* Consistent with PDF modal */
    width: 95vw; /* Match PDF modal width - Should make it large */
    height: 95vh; /* Match PDF modal height - Should make it large */
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 2px solid var(--light-text);
    flex-shrink: 0;
}
.modal-title {
    font-size: 14px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-close-button { /* New class for the 'x' in header */
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 24px;
    font-family: sans-serif;
    cursor: pointer;
    line-height: 1;
}
.modal-close-button:hover {
    color: var(--screen-bg);
}

.modal-body { /* For Image Modal Content */
    flex-grow: 1;
    position: relative;
    overflow: hidden; /* Important for containing the image */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}
.modal-image-content { /* Class for the <img> tag itself */
    display: block;
    width: 100%; /* Fill the container width */
    height: 100%; /* Fill the container height */
    object-fit: contain;
    border: none;
}

.modal-controls { /* For Image Modal Controls */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-top: 2px solid var(--light-text);
    flex-shrink: 0;
    gap: 20px;
}

/* --- PDF Viewer Overlay --- */
#pdf-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2vh;
}

#pdf-viewer-overlay.visible {
    display: flex;
}

.pdf-viewer-container {
    font-family: 'Press Start 2P', sans-serif;
    color: var(--light-text);
    background-color: var(--dark-bg);
    border: 2px solid var(--light-text);
    border-radius: 10px;
    width: 95vw;
    height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 2px solid var(--light-text);
    flex-shrink: 0;
}
.pdf-viewer-title {
    font-size: 14px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdf-viewer-close {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 24px;
    font-family: sans-serif;
    cursor: pointer;
    line-height: 1;
}
.pdf-viewer-close:hover {
    color: var(--screen-bg);
}

.pdf-viewer-body {
    flex-grow: 1;
    position: relative;
    overflow: hidden; /* Prevent scrolling of the body itself */
    display: flex; /* Ensures content within body is flex-controlled */
    justify-content: center;
    align-items: center;
    padding: 5px; /* Small padding around the page container */
}
.pdf-viewer-loading {
    font-size: 18px;
    animation: blink 1.5s infinite;
    display: flex; /* Ensure it's visible if flex is used by parent */
    align-items: center;
    justify-content: center;
}
.pdf-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px; /* Small gap between pages if two are shown */
    width: 100%;
    height: 100%;
    overflow: hidden; /* Ensure canvases don't make container scroll */
}
.pdf-page-container .pdf-canvas { /* Target canvas elements specifically */
    display: block; /* Remove extra space below canvas */
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.pdf-viewer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-top: 2px solid var(--light-text);
    flex-shrink: 0;
    gap: 20px;
}
.pdf-nav-button, .modal-nav-button { /* Shared style for nav buttons */
    background-color: var(--button-bg);
    border: 2px solid var(--button-border);
    color: var(--light-text);
    padding: 10px 20px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.1s;
}
.pdf-nav-button:disabled, .modal-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pdf-nav-button:not(:disabled):hover, .modal-nav-button:not(:disabled):hover {
    background-color: #5a5e64;
}
.pdf-nav-button:not(:disabled):active, .modal-nav-button:not(:disabled):active {
    transform: translateY(2px);
}
.pdf-page-num, .modal-page-num { /* Shared style for page number display */
    font-size: 16px;
    min-width: 100px;
    text-align: center;
}
@media (max-width: 768px) {
    .pdf-viewer-title, .modal-title { font-size: 11px; }
    .pdf-page-container { flex-direction: column; }
    .pdf-page-container canvas { max-width: calc(100% - 20px); height: auto; }
}
@media (min-width: 769px) {
    .pdf-page-container { flex-direction: row; }
    .pdf-page-container canvas { width: auto; height: 100%; }
}


@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

.pixel-art {
  margin: 20px auto;
  width: 180px;
  height: 55px;
  position: relative;
}

.page-title,
.menu-item,
.project-item,
.contact-item,
.club-button,
.project-link-button,
.start-prompt,
.nerktendo {
    text-transform: uppercase;
}

/* Container for side-by-side buttons */
.project-links-container {
    display: flex;
    justify-content: center; /* Center the buttons */
    gap: 10px; /* Space between buttons */
    flex-wrap: wrap; /* Allow buttons to wrap if screen is too small */
    margin-top: 15px; /* Space above the button container */
    margin-bottom: 10px; /* Space below the button container */
}

.project-links-container .project-link-button {
    margin: 0; /* Remove auto margins */
    width: auto; /* Let content dictate width */
    min-width: 100px; /* Ensure a minimum width for buttons */ 
}

/* Guestbook Actions (for the button) */
.guestbook-actions {
    flex-shrink: 0; /* Prevent shrinking */
    padding: 10px 0;
    text-align: center;
    border-top: 1px dashed var(--text-color);
    margin-top: 10px;
}
.guestbook-actions.form-actions {
    display: flex;
    justify-content: space-around; /* Space out Send and Back buttons */
    gap: 10px; 
}

.guestbook-action-button {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--text-color);
    border-radius: 5px;
    color: var(--text-color);
    background-color: rgba(15, 56, 15, 0.1);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    text-align: center; /* Center text within button */
}
.guestbook-actions.form-actions .guestbook-action-button {
    flex-grow: 1; /* Allow buttons to grow and share space */
    max-width: 45%; /* Limit max width to allow for gap */
}
#leave-message-button {
    padding-left: 20px; /* More padding for the single button */
    padding-right: 20px;
}
.guestbook-action-button:hover { background-color: rgba(15, 56, 15, 0.2); }
/* Guestbook Styles */
.guestbook-messages-container {
    padding-top: 5px;
}
.guestbook-entry {
    background-color: rgba(15, 56, 15, 0.05); /* Subtle background for the card */
    border: 1px solid var(--text-color);    /* Solid border for the card */
    border-radius: 5px;                     /* Rounded corners for the card */
    padding: 10px;                          /* Padding inside the card */
    margin-bottom: 15px;
}
/* .guestbook-entry:last-child {
} */
.guestbook-author-date {
    font-size: 11px;
    margin-bottom: 5px;
    opacity: 0.8;
}
.guestbook-author {
    font-weight: bold; /* Or keep it normal, depends on style preference */
}
.guestbook-message-text {
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap; /* Preserve line breaks from textarea */
}

.guestbook-form-container {
    display: flex;
    flex-grow: 1; /* Make this container take up available vertical space */
    flex-direction: column;
    min-height: 0; /* Necessary for flex-grow to work correctly in some contexts */
    gap: 10px;
}
.guestbook-input, .guestbook-textarea {
    flex-shrink: 0; /* Prevent inputs from shrinking too much */
    -webkit-appearance: none; -moz-appearance: none; appearance: none; /* Remove default browser appearance */
    background-color: rgba(15, 56, 15, 0.05); /* Slightly lighter for better text contrast */
    border: 1px solid var(--text-color);
    color: var(--text-color);
    font-family: 'Press Start 2P', monospace;
    padding: 10px; /* Increased padding */
    font-size: 16px; /* iOS zoom prevention */
    border-radius: 3px;
}
.guestbook-textarea {
    resize: none; /* Disable user resizing */
    flex-grow: 1; /* Allow textarea to fill available vertical space */
    min-height: 100px; /* Set a minimum height */
}
.guestbook-input::placeholder, .guestbook-textarea::placeholder {
    color: rgba(15, 56, 15, 0.6);
    font-size: 14px; /* Placeholder can be slightly smaller if desired */
}

/* Override browser autofill styles for input fields */
.guestbook-input:-webkit-autofill,
.guestbook-input:-webkit-autofill:hover,
.guestbook-input:-webkit-autofill:focus,
.guestbook-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 40px rgba(15, 56, 15, 0.05) inset !important; /* Your desired background color */
    -webkit-text-fill-color: var(--text-color) !important; /* Your desired text color */
    caret-color: var(--text-color) !important; /* Match caret color */
    transition: background-color 5000s ease-in-out 0s; /* Hack to delay browser style override */
    font-family: 'Press Start 2P', monospace !important; /* Ensure font matches */
    font-size: 16px !important; /* Ensure font size matches */
}
/* Documentation Page Content */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 15px 0;
    border: 2px solid var(--text-color);
}

.embedded-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.postcards-title {
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 5px;
}

.postcards-container, .documentation-images-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.postcard-image, .documentation-image {
    width: 100%;
    height: auto;
    border: 2px solid var(--text-color);
}

/* Game Styles */
#game-canvas {
    background-color: #000;
    flex-grow: 1;
    min-height: 0;
}

.game-ui-top {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.game-ui-bottom {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    flex-shrink: 0;
}
.game-button {
    padding: 8px 12px;
    border: 2px solid var(--text-color);
    background-color: transparent;
    color: var(--text-color);
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    text-transform: uppercase;
}
.game-button:hover {
    background-color: rgba(15, 56, 15, 0.2);
}

.external-controls-desktop {
    display: none; /* Hidden by default, shown on desktop */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--button-border); /* Reverted to 2px, will span width of this container */
    width: 90%; /* Set container width to 90% of its parent */
    justify-content: center; /* Center the buttons within this container */
    gap: 15px;
}

.external-controls-mobile {
    display: flex; /* Shown by default, hidden on desktop */
    justify-content: space-around;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin: 5px auto 5px auto; /* Reduced top margin, consistent bottom margin */
    padding: 0 10px;
    flex-shrink: 0; /* Prevent controls from shrinking */
    /* order: 3; Removed, as it's now naturally positioned within game-area-mobile */
}

.external-control-button {
    background-color: var(--button-bg);
    border: 2px solid var(--button-border);
    color: var(--light-text);
    padding: 10px 15px;
    font-family: 'Press Start 2P', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 5px;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.1s;
    flex-grow: 1;
    text-align: center;
    min-width: 135px;
    max-width: 135px;
}
.external-control-button:hover {
    background-color: #5a5e64;
}
.external-control-button:active {
    transform: translateY(1px);
}

.nerktek-creation-footer {
    font-family: 'Inter', sans-serif; /* Using site's font for consistency */
    color: rgba(234, 234, 234, 0.4); /* rgb(234, 234, 234) from your example */
    font-size: 12.8px;
    font-weight: 500; /* Adjusted for pixel font readability */
    letter-spacing: 1px; /* Approximates the requested 0.96px */
    text-transform: uppercase;
    margin-top: 20px;
    text-align: center;
}

.nerktek-creation-desktop {
    display: none; 
}

.nerktek-creation-mobile {
    display: block;
    margin-bottom: 10px;
}

@media (min-width: 1200px) {
    .gameboy-container { 
        flex-direction: row; 
        /* height: 100%; Desktop already has this */
        justify-content: center;
        gap: 20px; /* Restore desktop gap */
        padding: 10px; /* Restore generic padding for desktop if needed */
        overflow: visible; /* Or as it was */
    }
    .game-area-mobile { /* Adjustments for desktop */
        order: 1; /* Game area (containing Gameboy) comes first on desktop */
        width: auto; /* Allow it to size based on the Gameboy's fixed width */
        max-width: none; /* Remove any mobile max-width constraint */
        flex-grow: 0;    /* Don't grow in the row layout */
        flex-shrink: 0;  /* Don't shrink in the row layout */
        min-height: auto;/* Reset min-height */
    }
    .gameboy { 
        width: 800px; 
        height: 90vh;
        flex-shrink: 0;
        /* order: 1; Removed, .game-area-mobile now handles this order */
        aspect-ratio: auto; /* Reset aspect ratio for desktop */
        min-height: auto; /* Reset min-height for desktop */
    }
    .instructions-container {
        width: 400px;
        flex-shrink: 0;
        order: 2; /* Header/instructions area to the side */
        justify-content: center; /* Center content */
    }
    .instructions { 
        display: block; 
        width: 100%;
    }
    .main-header {
        margin-bottom: 20px;
    }
    .external-controls-desktop {
        display: flex; /* Show on desktop */
    }
    .external-controls-mobile {
        display: none; /* Hide on desktop */
        /* order: initial; Not strictly needed as it's hidden */
    }
    .nerktek-creation-desktop {
    display: block; 
    }
    .nerktek-creation-mobile {
        display: none;
    }
}

.boot-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--screen-bg);
    opacity: 0.7;
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
    animation: blink 1.75s infinite;
    z-index: 5;
    pointer-events: none; /* The click will be on the parent screen */
}

.screen.screen-off {
    cursor: pointer;
}

.toast {
    visibility: hidden;
    min-width: 150px; /* Adjusted min-width */
    background-color: rgba(125, 153, 22); /* Similar to active button bg */
    color: var(--text-color); /* Screen text color */
    text-align: center;
    border-radius: 5px;
    border: 1px solid var(--text-color); /* Screen text color for border */
    padding: 12px 15px;
    position: absolute; /* Positioned within #screen-content */
    z-index: 50; /* Above other screen content, but below modals/overlays */
    left: 50%;
    transform: translateX(-50%);
    top: 20px; /* Position from the top of #screen-content */
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, top 0.3s;
}
.toast.show {
    visibility: visible;
    opacity: 1;
    top: 40%;
}

/* NERKCAM Styles */
.nerkcam-container {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: space-between; /* Pushes title to top, canvas to middle, hint to bottom */
    height: 100%;
}

.nerkcam-header-controls {
    display: flex;
    justify-content: center; /* Center title by default */
    align-items: center;
    position: relative; /* For absolute positioning of the icon */
    width: 100%;
    margin-bottom: 5px; /* Space below header */
    flex-shrink: 0;
}

.nerkcam-header-controls .page-title {
    margin-bottom: 0; /* Remove default margin if any */
}

#nerkcam-switch-camera-icon {
    position: absolute;
    right: 36px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(15, 56, 15, 0.6);
    transition: color 0.2s;
    z-index: 3; 
}
#nerkcam-switch-camera-icon:hover { color: rgba(15, 56, 15, 0.9); }
#nerkcam-switch-camera-icon svg { width: 28px; height: 28px; }

#nerkcam-canvas {
    flex-grow: 1; /* Allow canvas to take available vertical space */
    min-height: 0; /* Important for flex-grow in some browsers */
    border: 2px solid var(--text-color);
    background-color: #000; /* Fallback if webcam fails early */
    /* Removed fixed width/height to allow JS to control it based on container */
    width: 100%;
    max-height: calc(100% - 70px); /* Adjust based on title and hint height */
}

.nerkcam-ui-bottom {
    width: 100%;
}

/* Styles for the git-graph page to mimic a terminal */
.scroll-wrapper.git-graph-terminal-style {
    background-color: #1E1E1E; /* Dark terminal background */
    padding: 10px; /* Padding inside the terminal area */
    border-radius: 3px; 
    border: 1px solid #333; /* Darker border for the terminal box */
}

/* Git Graph Styles */
.git-graph-output {
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Lucida Console", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.4;
    /* white-space: pre; Removed to allow children to control wrapping */
    color: #D4D4D4; /* Default light text color for messages in terminal */
}

.git-graph-prompt-line {
    margin-bottom: 8px; /* Space after the prompt */
    text-wrap: auto;
    /* text-wrap-style: pretty; */
}
.git-prompt-userhost {
    color: #569CD6; /* Light blue for user@host */
}
.git-prompt-path {
    color: #4EC9B0; /* Teal for path */
}
.git-prompt-char {
    color: #D4D4D4; /* Default text color for '%' */
}
.git-prompt-command {
    color: #D4D4D4; /* Default text color for the command itself */
}
.git-prompt-cursor {
    display: inline-block;
    background-color: #D4D4D4;
    width: 8px; /* Adjust width as needed for 'Press Start 2P' or terminal font */
    height: 14px; /* Adjust height as needed */
    margin-left: 2px;
    /* animation: blink 1s step-end infinite; Will be controlled by JS */
}


.git-graph-log-line {
    display: flex;
    align-items: flex-start; /* Align items to the start of the cross axis */
}

.git-graph-structure-container {
    flex-shrink: 0; /* Prevent this container from shrinking */
    white-space: pre; /* Crucial for preserving graph characters and their spacing */
    overflow: hidden; /* Hide repeated content that exceeds container height */
    padding-right: 0.5em; /* Space between graph and main content */
}

.git-graph-main-content {
    flex-grow: 1; /* Allow this container to take remaining space */
    /* white-space: normal; 
    word-break: break-all; */
    /* Consider overflow-wrap: break-word; as an alternative if break-all is too aggressive */
    min-width: 0; /* Fix for flex item overflow */
    text-wrap: auto; /* Allow text to wrap naturally */
    /* text-wrap-style: pretty;  */
    word-break: break-word; /* Break long words to prevent overflow */
}

.git-graph-structure { /* For the lines like | / \ - (excluding the commit '*') */
    color: rgba(15, 56, 15, 0.65); /* Dimmer version of --text-color for graph lines */
}
.scroll-wrapper.git-graph-terminal-style .git-graph-structure {
    color: #888888; /* Dimmer gray for graph lines in terminal style */
}

.git-graph-commit-point { /* For the '*' character of a commit */
    color: #d7ba7d; /* Yellow, same as hash, for emphasis */
    font-weight: bold;
}
.scroll-wrapper.git-graph-terminal-style .git-graph-commit-point {
    color: #DCDCAA; /* Yellow for dark themes */
}

.git-graph-hash {
    color: #d7ba7d; /* Yellow */
}
.scroll-wrapper.git-graph-terminal-style .git-graph-hash {
    color: #DCDCAA; /* Yellow for dark themes */
}

.git-graph-decorations {
    /* Container for all decorations */
}

.git-deco-head { /* "HEAD ->" part */
    font-weight: bold;
}
.scroll-wrapper.git-graph-terminal-style .git-deco-head { color: #4EC9B0; /* Bright Cyan */ }
.scroll-wrapper:not(.git-graph-terminal-style) .git-deco-head { color: #2a9d8f; }

.git-deco-branch { /* Local branch names, and branch name part of HEAD -> */
    font-weight: bold;
}
.scroll-wrapper.git-graph-terminal-style .git-deco-branch { color: #B5CEA8; /* Light Green (macOS like) */ }
.scroll-wrapper:not(.git-graph-terminal-style) .git-deco-branch { color: #4CAF50; }

.git-deco-remote { /* Remote name like "origin/" */
    font-weight: bold;
}
.scroll-wrapper.git-graph-terminal-style .git-deco-remote { color: #CE9178; /* Light Orange/Reddish */ }
.scroll-wrapper:not(.git-graph-terminal-style) .git-deco-remote { color: #e76f51; }

.git-deco-remote-branch { /* Branch name part of remote, e.g., "main" in "origin/main" */ }
.scroll-wrapper.git-graph-terminal-style .git-deco-remote-branch { color: #CE9178; }
.scroll-wrapper:not(.git-graph-terminal-style) .git-deco-remote-branch { color: #e76f51; }

.git-deco-tag-label { /* "tag: " part */ }
.scroll-wrapper.git-graph-terminal-style .git-deco-tag-label { color: #DCDCAA; /* Yellow */ }
.scroll-wrapper:not(.git-graph-terminal-style) .git-deco-tag-label { color: #c586c0; }

.git-deco-tag-name { /* Actual tag name */ }
.scroll-wrapper.git-graph-terminal-style .git-deco-tag-name { color: #DCDCAA; /* Yellow */ }
.scroll-wrapper:not(.git-graph-terminal-style) .git-deco-tag-name { color: #c586c0; }

.git-graph-message {
    color: var(--screen-bg); /* Default text color for commit messages */
}

/* Styles for when Oregon Trail game is active within the git-graph-output <pre> tag */
#screen-content .git-graph-output.oregon-trail-game-active-in-pre {
    display: flex;
    flex-direction: column;
    height: 100%; /* Allow the game area to fill the scroll-wrapper */
    white-space: normal; /* Override <pre> default to allow text wrapping */
    overflow: hidden; /* Prevent the <pre> itself from scrolling; its children will manage scroll */
}

#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-status-line {
    white-space: normal;    /* Ensure text wraps */
    word-break: break-word; /* Break long words to prevent overflow */
    line-height: 1.3;       /* Adjust line height for wrapped text */
    flex-shrink: 0;         /* Prevent status lines from shrinking */
}

/* Oregon Trail Game Specific Styles (when inside git-graph output) */
/* Scoped to when the game is active using .oregon-trail-game-active-in-pre */
#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-menu-prompt {
    margin-bottom: 4px; /* Space between prompt and options */
    flex-shrink: 0;
    /* color: var(--text-color); Already inherits from game style */
}

#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-menu-options-container {
    flex-grow: 1; /* Allow this container to take up available vertical space */
    min-height: 30px; /* Ensure it has at least some height, e.g., for 1-2 lines */
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    /* padding-right: 5px; /* Optional: if you want a small gutter even if scrollbar is hidden */
}

#screen-content .git-graph-output .oregon-trail-menu-options-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-menu-option {
    white-space: normal;    /* Allow text to wrap */
    word-break: break-word; /* Break long words to prevent overflow */
    padding: 1px 0;       /* Minimal vertical padding for options */
    line-height: 1.3;       /* Adjust line height for wrapped text */
}

#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-scroll-indicator {
    /* font-family is inherited */
    font-size: 10px; /* Smaller font for indicators */
    text-align: center;
    color: var(--text-color); /* Match game text color */
    opacity: 0.6;
    line-height: 1;
    flex-shrink: 0; /* Prevent indicators from shrinking */
}

#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-scroll-indicator.up {
    margin-bottom: 2px; /* Space between up arrow and options container */
}
#screen-content .git-graph-output.oregon-trail-game-active-in-pre .oregon-trail-scroll-indicator.down {
    margin-top: 2px; /* Space between options container and down arrow */
}

.multi-line-text {
  white-space: pre-line;
}