body {
    font-family: 'Noto Sans', 'Courier New', 'Monaco', monospace; /* clearer UI font (Noto Sans) */
    background: var(--background-start); /* Themed background */
    color: var(--text-color); /* Themed text color */
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

/* Remove animated background */
body::before {
    display: none;
}

.container {
    background-color: #ffffff; /* White container */
    padding: 30px 40px;
    border-radius: 0; /* Square corners */
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3); /* Classic drop shadow */
    max-width: 650px;
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
    border: 2px solid #000000; /* Black border */
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

h1 {
    font-family: 'Courier New', 'Monaco', monospace;
    color: #000000; /* Black title */
    margin-bottom: 25px;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: none; /* Remove glow effects */
    background: none; /* Remove gradient */
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-align: center;
    text-decoration: underline; /* Classic underline */
}

p {
    font-size: 1.1em;
    margin-bottom: 10px;
    line-height: 1.5;
    color: #000000;
}

button {
    background-color: #e0e0e0; /* Light gray buttons */
    color: #000000; /* Black text */
    border: 2px solid #808080; /* Gray border */
    padding: 14px 18px; /* more vertical room and slightly reduced horizontal to allow wrapping */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    margin: 8px 6px;
    transition: background-color 0.2s ease, transform 0.08s ease;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: visible; /* allow wrapped text to show */
    font-family: 'Noto Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    letter-spacing: 0.15px;
    white-space: normal; /* allow text to wrap */
    word-break: break-word;
    text-align: center; /* center multi-line button text */
    min-height: 44px; /* ensure touch-friendly size */
}

button::before {
    display: none; /* Remove ripple effect */
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

button:active::after {
    width: 300px;
    height: 300px;
}

button:active {
    transform: translateY(0);
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

button:disabled {
    background-color: #f0f0f0;
    color: #808080;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: none;
    opacity: 0.7;
}

button:disabled::before {
    display: none;
}

.hidden {
    display: none !important;
}

/* Face emoji styling */
#face-emoji {
    font-size: 90px;
    text-align: center;
    display: block;
    margin: 20px auto 30px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: none; /* Remove floating animation */
    text-shadow: none; /* Remove glow */
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

#face-emoji:hover {
    transform: scale(1.05);
}

#face-emoji.happy {
    animation: bounce 1s infinite;
}

#face-emoji.sad {
    animation: shake 0.5s ease-in-out;
}

#face-emoji.sick {
    animation: wobble 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes wobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

/* Selection divs */
#gender-select, #ethnicity-select, #year-select, #shop-section, #economics-section, #trait-select {
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #808080; /* Gray border */
    border-radius: 0; /* Square corners */
    background-color: #ffffff; /* White background */
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* Classic shadow */
    text-align: left;
    transition: none; /* Remove hover animations */
}

#gender-select:hover, #ethnicity-select:hover, #year-select:hover, #shop-section:hover, #economics-section:hover, #trait-select:hover {
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transform: none;
}

#gender-select p, #ethnicity-select p, #year-select p, #shop-section p, #trait-select p {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    color: #000000; /* Black text */
    font-size: 1.1em;
}

#gender-select label {
    margin-right: 20px;
    font-size: 1em;
    cursor: pointer;
    color: #000000;
}

#gender-select input[type="radio"] {
    margin-right: 5px;
    accent-color: #000000; /* Black radio button */
    transform: scale(1.2); /* Slightly larger radio buttons */
}

#year-select select, #ethnicity-select select, #trait-select select {
    padding: 8px 12px;
    border-radius: 0; /* Square corners */
    border: 2px solid #808080; /* Gray border */
    margin-right: 15px;
    width: auto; /* Allow width to adjust naturally */
    min-width: 180px; /* Ensure a minimum width */
    max-width: 90%; /* Prevent overflow on smaller screens */
    background-color: #ffffff; /* White background */
    color: #000000;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 1em;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: 'Courier New', 'Monaco', monospace;
}

#year-select select:focus, #ethnicity-select select:focus, #trait-select select:focus {
    border-color: #000000; /* Black on focus */
    outline: none;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#current-year-display, #player-ethnicity-display, #player-trait-display {
    font-weight: bold;
    color: #000000; /* Black text */
    display: inline-block; /* Keep them inline with selects */
    margin-left: 10px;
    font-size: 1em;
    background-color: #f0f0f0; /* Light gray background */
    padding: 5px 10px;
    border-radius: 0;
    border: 1px solid #808080;
    margin-left: 15px;
    font-size: 0.95em;
    color: #000000;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Life Activities Section */
#life-activities-section, #relationships-section, #life-stats-section {
    margin-top: 30px;
    padding: 20px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
    transition: none;
}

#life-activities-section:hover, #relationships-section:hover, #life-stats-section:hover {
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    transform: none;
}

#life-activities-section h2, #relationships-section h2, #life-stats-section h2 {
    text-align: center;
    color: #000000;
    margin-bottom: 15px;
    font-size: 1.8em;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: none;
    text-decoration: underline;
}

#life-activities-section button {
    background-color: #e0e0e0; /* Light gray for life activities */
    border-color: #808080;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
    margin: 5px;
    padding: 8px 15px;
    font-size: 0.9em;
}

#life-activities-section button:hover {
    background-color: #d0d0d0;
    border-color: #606060;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    color: #000000;
}

#relationships-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 10px;
    background-color: rgba(15, 26, 42, 0.8);
}

#relationships-list p {
    margin: 5px 0;
    padding: 5px;
    background-color: rgba(0, 204, 204, 0.1);
    border-radius: 3px;
    font-size: 0.9em;
}

#life-stats-section p {
    margin-bottom: 8px;
    padding-left: 10px;
    color: #c0c0c0;
    font-size: 1em;
}

#stress-display, #education-display, #credit-score-display, #travel-display, 
#social-media-display, #volunteer-display, #languages-display, #achievements-display,
#relationships-count, #reputation-display {
    font-weight: bold;
    color: #66ffff;
    text-shadow: 0 0 5px rgba(102, 255, 255, 0.3);
}

/* Stress level color coding */
#stress-display.low { color: #00cc00; }
#stress-display.medium { color: #cccc00; }
#stress-display.high { color: #ff3399; }

/* Credit score color coding */
#credit-score-display.excellent { color: #00cc00; }
#credit-score-display.good { color: #cccc00; }
#credit-score-display.fair { color: #ff6b35; }
#credit-score-display.poor { color: #ff3399; }

/* New Advanced Activities Section */
#advanced-activities-section {
    margin-top: 30px;
    padding: 25px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
}

#advanced-activities-section h2 {
    text-align: center;
    color: #000000;
    font-size: 2em;
    margin-bottom: 25px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: none;
    text-decoration: underline;
}

.activity-group {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #808080;
    border-radius: 0;
    background-color: #f8f8f8;
}

.activity-group h3 {
    color: #000000;
    font-size: 1.3em;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #808080;
    padding-bottom: 8px;
}

.activity-group div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.activity-group button {
    background-color: #e0e0e0;
    border-color: #808080;
    color: #000000;
    padding: 10px 15px;
    font-size: 0.85em;
    border-radius: 0;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.activity-group button:hover {
    background-color: #d0d0d0;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.danger-zone {
    border-color: #cc0000;
    background-color: #ffe6e6;
}

.danger-btn {
    background-color: #ffcccc !important;
    border-color: #cc0000 !important;
    color: #000000 !important;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
}

.danger-btn:hover {
    background-color: #ffaaaa !important;
    border-color: #990000 !important;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3) !important;
}

.warning {
    text-align: center;
    color: #cc0000;
    font-weight: bold;
    font-size: 0.9em;
    margin: 10px 0 0 0;
    background-color: #ffe6e6;
    padding: 8px;
    border-radius: 0;
    border: 1px solid #cc0000;
}

/* Extended Stats Section */
#extended-stats-section {
    margin-top: 25px;
    padding: 20px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}

#extended-stats-section h2 {
    text-align: center;
    color: #000000;
    font-size: 1.6em;
    margin-bottom: 15px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-decoration: underline;
}

#extended-stats-section p {
    margin-bottom: 8px;
    padding-left: 15px;
    color: #000000;
    font-size: 1em;
}

#extended-stats-section span {
    font-weight: bold;
    color: #000000;
    text-shadow: none;
}

/* Job select container */
#job-select {
    margin-top: 25px;
    padding: 20px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    transition: none;
}

#job-select:hover {
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transform: none;
}

#job-select p {
    font-weight: bold;
    color: #000000;
    margin-bottom: 15px;
}

#job-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* Space between job buttons */
}

#job-buttons-container button {
    background-color: #e0e0e0; /* Light gray for job buttons */
    border-color: #808080;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.12);
    color: #000000;
    font-size: 0.95em;
    padding: 12px 12px;
    flex-grow: 1; /* Allow buttons to grow */
    max-width: calc(50% - 10px); /* Two columns layout */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    min-width: 110px;
    text-wrap: wrap;
}

#job-buttons-container button:hover {
    background-color: #d0d0d0;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

/* House purchase options */
#house-purchase-options {
    margin-top: 20px;
}

#house-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

#house-options button {
    background-color: #cccc00; /* Darker yellow for house buttons */
    border-color: #cccc00;
    color: #000000;
    box-shadow: 1px 1px 3px rgba(204, 204, 0, 0.2);
    flex-grow: 1;
    max-width: calc(33% - 10px); /* Three columns layout */
}

#house-options button:hover {
    background-color: #e0e0e0;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

#buy-house-button, #sell-house-button {
    background-color: #e8e8e8; /* Light gray for main house buttons */
    border-color: #808080;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: #000000;
}

#buy-house-button:hover, #sell-house-button:hover {
    background-color: #d8d8d8;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

/* Family Tree Section */
#family-tree-section {
    margin-top: 40px;
    padding: 25px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    transition: none;
}

#family-tree-section:hover {
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    transform: none;
}

#family-tree-section h2 {
    text-align: center;
    color: #000000;
    margin-bottom: 20px;
    font-size: 2em;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: none;
    border-bottom: 2px solid #808080;
    text-decoration: underline;
}

#family-tree-section h2::after {
    display: none;
}

#family-tree-section p {
    margin-bottom: 8px;
    text-align: left;
    padding-left: 10px;
    color: #000000;
}

#children-list h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    color: #000000;
    font-size: 1.2em;
    text-align: left;
    border-bottom: 1px solid #808080;
    padding-bottom: 5px;
}

#children-ul {
    list-style: none;
    padding-left: 0;
}

#children-ul li {
    background-color: #f8f8f8;
    border: 1px solid #808080;
    border-radius: 0;
    padding: 10px 15px;
    margin-bottom: 10px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    word-break: break-word;
    display: flex; /* Use flexbox to align emoji and text */
    align-items: center; /* Vertically center */
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    color: #000000;
}

#children-ul li:hover {
    background-color: #e8e8e8;
    transform: translateY(-1px);
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
}

#children-ul li::before {
    content: none; 
}

.child-emoji {
    margin-right: 10px; /* Space between emoji and text */
    font-size: 1.5em; /* Larger emojis for children */
    text-shadow: 0 0 3px #fff;
}

#family-tree-section button {
    margin-top: 15px;
    background-color: #e0e0e0;
    border-color: #808080;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: #000000;
}

#family-tree-section button:hover {
    background-color: #d0d0d0;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

/* Child options menu */
#child-options-menu {
    background-color: #ffffff;
    border: 2px solid #808080;
    border-radius: 0;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    gap: 10px;
    transition: none;
}

#child-options-menu:hover {
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    transform: none;
}

#child-options-menu button {
    background-color: #f0f0f0;
    border-color: #808080;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: #000000;
}

#child-options-menu button:hover {
    background-color: #e0e0e0;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

/* New styles for Shop Section */
#shop-section {
    text-align: center;
}

#shop-section p {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: bold;
    color: #66ffff;
    font-size: 1.1em;
}

#shop-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

#shop-options button {
    background-color: #f0f0f0; /* Light gray for shop items */
    border-color: #808080;
    color: #000000;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    flex-grow: 1;
    max-width: calc(33% - 10px); /* Three columns layout */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    min-width: 110px;
    text-wrap: wrap;
}

#shop-options button:hover {
    background-color: #e0e0e0;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

#shop-button {
    background-color: #e8e8e8; /* Light gray for main shop button */
    border-color: #808080;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    color: #000000;
}

#shop-button:hover {
    background-color: #d8d8d8;
    border-color: #606060;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: #000000;
}

/* New styles for Economics Section */
#economics-section {
    margin-top: 30px;
    padding: 20px;
    border: 2px solid #808080;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
}

#economics-section h2 {
    text-align: center;
    color: #000000;
    margin-bottom: 15px;
    font-size: 1.8em;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: none;
    text-decoration: underline;
}

#economics-section p {
    margin-bottom: 8px;
    padding-left: 10px;
    color: #000000;
}

#inflation-display, #unemployment-display, #gdp-display, #global-events-display {
    font-weight: bold;
    color: #000000;
    text-shadow: none;
}

/* Game Over / Life Summary */
#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: none;
}

#game-over.visible {
    opacity: 1;
    visibility: visible;
}

#game-over-message, #summary-death-message {
    font-size: 1.4em;
    color: #cc0000; /* Red death message */
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: none;
}

#game-over button, #life-summary-box button {
    background-color: #e0e0e0;
    border-color: #808080;
    color: #000000;
    padding: 15px 30px;
    font-size: 1.2em;
}

#game-over button:hover, #life-summary-box button:hover {
    background-color: #d0d0d0;
    color: #000000;
}

#life-summary-box {
    background-color: #ffffff;
    border: 3px solid #808080;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    padding: 35px;
    border-radius: 0;
    max-width: 550px;
    transform: scale(0.9); /* Initial smaller size */
    opacity: 0; /* Initial hidden state */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; /* Smooth entrance */
    animation: fadeInScale 0.5s ease-out forwards;
    box-sizing: border-box;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

#life-summary-overlay.visible #life-summary-box {
    transform: scale(1); /* Scale up when visible */
    opacity: 1; /* Fade in when visible */
}

#life-summary-box h2 {
    color: #000000;
    font-size: 2.2em;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-decoration: underline;
}

#life-summary-box p {
    font-size: 1.1em;
    margin: 0; /* Remove default paragraph margin */
    text-align: left; /* Align text within summary box */
    padding-left: 20px;
    border-bottom: 1px dotted #eee; /* Subtle separator */
    padding-bottom: 5px;
}

#life-summary-box p:last-of-type {
    border-bottom: none; /* No border for the last paragraph */
}

#life-summary-box strong {
    color: #66ffff;
    min-width: 120px; /* Ensure strong tags have a minimum width for alignment */
    display: inline-block;
}

#summary-death-message {
    font-weight: bold;
    color: #cc0000;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-align: center !important; /* Override text-align left for this */
    padding-left: 0 !important;
    border-bottom: none !important;
}

#life-summary-box button {
    margin-top: 25px;
    padding: 12px 25px;
    background-color: #e0e0e0;
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.2s ease;
}

#life-summary-box button:hover {
    background-color: #d0d0d0;
}

/* Hack Buttons */
#hack-button, #super-hack-button, #infinite-money-button, #genius-button, #never-starve-button {
    position: static !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    padding: 10px 15px !important;
    font-size: 0.9em !important;
    background-color: #e0e0e0 !important;
    border: 2px solid #808080 !important;
    backdrop-filter: none !important;
    color: #000000 !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    margin: 5px !important;
    width: 100% !important;
    max-width: 200px !important;
    min-height: 40px !important;
}

#hack-button {
    background-color: #ffcccc !important; /* Light red hack button */
    border-color: #cc0000 !important;
}

#super-hack-button {
    background-color: #ccffcc !important; /* Light green super hack button */
    border-color: #00cc00 !important;
}

#infinite-money-button {
    background-color: #ccffff !important; /* Light cyan infinite money */
    border-color: #0088cc !important;
}

#genius-button {
    background-color: #ffffcc !important; /* Light yellow genius */
    border-color: #cccc00 !important;
}

#never-starve-button {
    background-color: #ffeecc !important; /* Light orange never starve */
    border-color: #cc6600 !important;
}

/* Hack button hover effects */
#hack-button:hover, #super-hack-button:hover, #infinite-money-button:hover, #genius-button:hover, #never-starve-button:hover {
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-1px) scale(1.02) !important;
}

/* New styles for Infinite Money button */
#infinite-money-button {
    right: 160px; /* Position next to Super Hack button */
    padding: 5px 10px;
    font-size: 0.8em;
    background-color: #00cc00; /* Green color */
    color: #000000;
    z-index: 100;
}

/* New style for Genius button */
#genius-button {
    right: 240px; /* Position next to Infinite Money button */
    background-color: #e0e0e0; /* A darker purple color */
    color: #000000;
}

/* New styles for event overlay */
#event-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
    backdrop-filter: blur(5px);
}

#event-overlay.visible {
    visibility: visible;
    opacity: 1;
}

#event-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 0;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 450px;
    transform: scale(0.9); /* Initial smaller size */
    opacity: 0; /* Initial hidden state */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out; /* Smooth entrance */
    animation: eventAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid #808080;
}

#event-overlay.visible #event-box {
    transform: scale(1); /* Scale up when visible */
    opacity: 1; /* Fade in when visible */
}

#event-box h3 {
    margin-top: 0;
    color: #000000;
    font-size: 1.8em;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    text-shadow: none;
    text-decoration: underline;
}

#event-box p {
    margin-bottom: 25px;
    font-size: 1.15em;
    color: #000000;
}

#event-buttons button {
    padding: 12px 25px;
    margin: 0 10px;
    border: 2px solid #808080;
    border-radius: 0;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#event-yes {
    background-color: #ccffcc; /* Light green yes */
    color: #000000;
    border-color: #00cc00;
}

#event-yes:hover {
    background-color: #aaffaa;
    border-color: #008800;
    color: #000000;
}

#event-no {
    background-color: #ffcccc; /* Light red no */
    color: #000000;
    border-color: #cc0000;
}

#event-no:hover {
    background-color: #ffaaaa;
    border-color: #990000;
    color: #000000;
}

@keyframes eventAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Donate Button */
#donate-button {
    background-color: #ffdddd; /* Light pink for donation */
    border-color: #cc6666;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #000000;
    font-size: 0.9em;
    padding: 10px 20px;
    margin: 10px auto;
    display: block;
    width: fit-content;
}

#donate-button:hover {
    background-color: #ffcccc;
    border-color: #cc4444;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    color: #000000;
}

/* New Reset Button Styles */
.reset-btn {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    z-index: 200 !important;
    padding: 8px 12px !important;
    font-size: 0.9em !important;
    background-color: #ffcccc !important; /* Light red */
    border: 2px solid #cc0000 !important;
    backdrop-filter: none !important;
    color: #000000 !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.reset-btn:hover {
    background-color: #ffaaaa !important;
    border-color: #990000 !important;
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4) !important;
}

/* New Settings Panel Styles */
.settings-btn {
    position: fixed !important;
    top: 15px !important;
    left: 15px !important;
    z-index: 200 !important;
    padding: 8px 12px !important;
    font-size: 0.9em !important;
    background-color: #e8e8e8 !important; /* Light gray */
    border: 2px solid #808080 !important;
    backdrop-filter: none !important;
    color: #000000 !important;
    border-radius: 0 !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.settings-btn:hover {
    background-color: #d8d8d8 !important;
    border-color: #606060 !important;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4) !important;
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: none;
}

.settings-box {
    background: #ffffff;
    border: 3px solid #808080;
    border-radius: 0;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
}

.settings-box h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #000000;
    font-size: 1.5em;
    text-decoration: underline;
}

.setting-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 0;
    border: 1px solid #808080;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: #000000;
    font-weight: bold;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #808080;
    border-radius: 0;
    background: #ffffff;
    color: #000000;
    font-family: inherit;
}

.setting-group input[type="range"] {
    margin-bottom: 5px;
}

.setting-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #000000;
}

.settings-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.settings-buttons button {
    padding: 10px 20px;
    border: 2px solid #808080;
    border-radius: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

#apply-settings {
    background: #ccffcc;
    color: #000000;
    border-color: #00cc00;
}

#apply-settings:hover {
    background: #aaffaa;
}

#reset-settings {
    background: #ffffcc;
    color: #000000;
    border-color: #cccc00;
}

#reset-settings:hover {
    background: #ffff99;
}

#close-settings {
    background: #f0f0f0;
    color: #000000;
    border-color: #808080;
}

#close-settings:hover {
    background: #e0e0e0;
}

/* Welcome Overlay Styles */
#welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: none;
}

#welcome-overlay .settings-box {
    animation: welcomeSlideIn 0.6s ease-out;
}

@keyframes welcomeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#welcome-overlay ul {
    color: #c0c0c0;
}

#welcome-overlay li {
    margin-bottom: 8px;
    padding-left: 5px;
}

#welcome-overlay strong {
    color: #000000;
}

#start-game-btn:hover {
    background: #ccffcc !important;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.5) !important;
}

/* Theme Variables - Old Computer Style */
:root {
    --primary-color: #000000;
    --secondary-color: #808080;
    --accent-color: #666666;
    --background-start: #f0f0f0;
    --background-mid: #ffffff;
    --background-end: #e8e8e8;
    --text-color: #000000;
    --container-bg: rgba(255, 255, 255, 1);
}

/* Theme modifiers — update CSS variables per theme class */
.theme-cyber { --primary-color:#001f3f; --secondary-color:#0056b3; --accent-color:#00ccff; --container-bg:#ffffff; --text-color:#000000; }
.theme-nature { --primary-color:#2f6f2f; --secondary-color:#6b8e23; --accent-color:#2e8b57; --container-bg:#f6fff2; --text-color:#062006; }
.theme-sunset { --primary-color:#b35400; --secondary-color:#d2691e; --accent-color:#ff8c42; --container-bg:#fff8f2; --text-color:#4a2b00; }
.theme-ocean { --primary-color:#004e7c; --secondary-color:#0077b6; --accent-color:#00a8e8; --container-bg:#f2fbff; --text-color:#002f44; }
.theme-royal { --primary-color:#2b0b3b; --secondary-color:#5b2e8a; --accent-color:#8a4ed1; --container-bg:#fbf7ff; --text-color:#1b0830; }
.theme-fire { --primary-color:#7a0b0b; --secondary-color:#cc2e00; --accent-color:#ff6b4a; --container-bg:#fff6f4; --text-color:#3b0806; }
.theme-gold { --primary-color:#402e00; --secondary-color:#b8860b; --accent-color:#ffd700; --container-bg:#fffaf0; --text-color:#2b1a00; }
.theme-mint { --primary-color:#0b5f4a; --secondary-color:#3fbf9b; --accent-color:#66ffd5; --container-bg:#f6fffb; --text-color:#003826; }
.theme-dark { --primary-color:#0b0b0b; --secondary-color:#2b2b2b; --accent-color:#666666; --container-bg:#0f0f10; --text-color:#e8e8e8; }
.theme-light { --primary-color:#ffffff; --secondary-color:#f0f0f0; --accent-color:#cccccc; --container-bg:#ffffff; --text-color:#000000; }

/* Apply themed variables to main UI elements */
.container { background-color: var(--container-bg) !important; border-color: var(--secondary-color) !important; color: var(--text-color) !important; }
h1, #life-activities-section h2, .button-section h3 { color: var(--primary-color) !important; }
button { background-color: var(--secondary-color) !important; color: var(--text-color) !important; border-color: rgba(0,0,0,0.12) !important; }

/* Remove all theme classes since we want classic look */
.theme-nature,
.theme-sunset,
.theme-ocean,
.theme-royal,
.theme-fire,
.theme-gold,
.theme-mint,
.theme-dark,
.theme-light {
    --primary-color: #000000;
    --secondary-color: #808080;
    --accent-color: #666666;
    --background-start: #f0f0f0;
    --background-mid: #ffffff;
    --background-end: #e8e8e8;
    --text-color: #000000;
    --container-bg: rgba(255, 255, 255, 1);
}

/* Remove background pattern styles */
.bg-pattern,
.bg-stars {
    display: none;
}

/* Remove historical visual filters */
.filter-painting,
.filter-sepia,
.filter-bw {
    filter: none;
    background: #f0f0f0 !important;
}

.filter-painting::before {
    display: none;
}

/* Status color coding - adjusted for white background */
#mental-health-display.high { color: #006600; }
#mental-health-display.medium { color: #cc6600; }
#mental-health-display.low { color: #cc0000; }

#fitness-display.high { color: #006600; }
#fitness-display.medium { color: #cc6600; }
#fitness-display.low { color: #cc0000; }

#criminal-record-display.clean { color: #006600; }
#criminal-record-display.criminal { color: #cc0000; }

/* Prison status styling - adjusted */
.imprisoned {
    color: #cc0000 !important;
    font-weight: bold;
    background-color: #ffe6e6;
    padding: 5px 10px;
    border-radius: 0;
    border: 2px solid #cc0000;
}

#job-display.imprisoned {
    background-color: #ffcccc;
    border: 2px solid #cc0000;
    color: #cc0000;
    font-weight: bold;
}

/* Current job display - adjusted for white background */
#job-display {
    font-weight: bold;
    color: #000000;
    padding: 5px 10px;
    background-color: #f8f8f8;
    border-radius: 0;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin-top: 10px;
    border: 1px solid #808080;
}

/* Study level display - adjusted */
#study-display {
    font-weight: bold;
    color: #000000;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 0;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin-top: 5px;
    border: 1px solid #808080;
}

/* Progress bars - adjusted for classic look */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    border: 2px solid #808080;
}

.progress-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.5s ease;
    position: relative;
}

.health-bar { background: #99cc99; }
.hunger-bar { background: #cc9966; }
.happiness-bar { background: #6699cc; }

/* Money, hunger, age displays - classic styling */
#money-display, #hunger-display, #age-display {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 12px;
    text-shadow: none;
    font-family: 'Courier New', 'Monaco', monospace;
}

#money-display {
    color: #006600; /* Dark green for money */
}

#hunger-display {
    color: #cc6600; /* Dark orange for hunger */
}

#age-display {
    color: #000066; /* Dark blue for age */
}

/* Improve select dropdown appearance - classic style */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    padding-right: 30px; /* Make space for the custom arrow */
    font-family: 'Courier New', 'Monaco', monospace;
}

/* Basic styling for overlays and other elements remain as original */

/* Status color coding */
#mental-health-display.high { color: #006600; }
#mental-health-display.medium { color: #cc6600; }
#mental-health-display.low { color: #cc0000; }

#fitness-display.high { color: #006600; }
#fitness-display.medium { color: #cc6600; }
#fitness-display.low { color: #cc0000; }

#criminal-record-display.clean { color: #006600; }
#criminal-record-display.criminal { color: #cc0000; }

/* Prison status styling */
.imprisoned {
    color: #cc0000 !important;
    font-weight: bold;
    background-color: #ffe6e6;
    padding: 5px 10px;
    border-radius: 0;
    border: 2px solid #cc0000;
}

#job-display.imprisoned {
    background-color: #ffcccc;
    border: 2px solid #cc0000;
    color: #cc0000;
    font-weight: bold;
}

/* Current job display */
#job-display {
    font-weight: bold;
    color: #000000;
    padding: 5px 10px;
    background-color: #f8f8f8;
    border-radius: 0;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin-top: 10px;
    border: 1px solid #808080;
}

/* Study level display */
#study-display {
    font-weight: bold;
    color: #000000;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 0;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    margin-top: 5px;
    border: 1px solid #808080;
}

/* Progress Section */
.progress-section {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #808080;
    border-radius: 0;
    padding: 20px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-label {
    font-size: 0.9em;
    color: #000000;
    font-weight: bold;
    font-family: 'Courier New', 'Monaco', monospace;
}

.progress-value {
    color: #000000;
    font-weight: bold;
    font-size: 1.1em;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #e0e0e0;
    border: 2px solid #808080;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: width;
}

.progress-text {
    font-size: 0.8em;
    font-weight: bold;
    color: #000000;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
    z-index: 10;
    will-change: transform;
}

.health-bar { 
    background: linear-gradient(90deg, #ff4444, #44ff44);
}

.hunger-bar { 
    background: linear-gradient(90deg, #ff6600, #66cc00);
}

.happiness-bar { 
    background: linear-gradient(90deg, #4444ff, #ff44ff);
}

/* Status Indicators */
#status-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #000000;
    transition: all 0.3s ease;
    cursor: help;
    will-change: transform;
}

.status-indicator:hover {
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.status-good { 
    background: #00cc00;
    box-shadow: 0 0 5px rgba(0, 204, 0, 0.5);
}

.status-warning { 
    background: #cccc00;
    box-shadow: 0 0 5px rgba(204, 204, 0, 0.5);
}

.status-danger { 
    background: #cc0000;
    box-shadow: 0 0 5px rgba(204, 0, 0, 0.5);
}

/* Enhanced Stats Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-card {
    background: #f8f8f8;
    border: 2px solid #808080;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #000000;
    font-size: 0.9em;
    font-family: 'Courier New', 'Monaco', monospace;
}

.stat-card span {
    font-size: 1.2em;
    font-weight: bold;
    color: #0066cc;
    font-family: 'Courier New', 'Monaco', monospace;
}

/* Enhanced Button Effects */
button {
    position: relative;
    overflow: hidden;
}

/* Game Sections */
.game-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    position: relative;
}

.game-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #000000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.game-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #000000;
    border-radius: 2px;
    opacity: 0.5;
}

.character-setup::before { background: #808080; }
.life-management::before { background: #666666; }
.advanced-section::before { background: #ff9800; }
.stats-section::before { background: #666; }

.section-title {
    font-size: 1.4em;
    color: #000000;
    margin: 0 0 20px 0;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #000000;
    display: inline-block; /* Shrink border to content width */
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 5px;
    background: linear-gradient(90deg, #00c6ff, #007bff);
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

/* Character Setup */
.character-setup {
    border-color: #808080;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setup-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-label {
    display: block;
    font-weight: bold;
    color: #000000;
    margin-bottom: 8px;
    font-size: 1em;
}

.setup-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #808080;
    border-radius: 6px;
    background: rgba(15, 26, 42, 0.8);
    color: #000000;
    font-family: inherit;
    font-size: 1em;
}

.setup-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-tip {
    color: #888;
    font-style: italic;
    font-size: 0.8em;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #808080;
}

.radio-option input[type="radio"] {
    margin: 0;
    transform: scale(1.2);
    accent-color: #000000;
}

.radio-text {
    font-size: 1em;
    color: #000000;
}

/* Character Display */
.character-display {
    text-align: center;
    border-color: #666666;
}

.character-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-weight: bold;
    color: #aaa;
}

.stat-value {
    color: #000000;
    font-weight: bold;
}

/* Action Grids */
.action-grid, .job-grid, .property-grid, .shop-grid, .hack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.primary-btn, .action-btn, .special-btn {
    padding: 15px 20px;
    font-size: 1em;
    border-radius: 8px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

/* Primary Action Buttons */
.primary-btn {
    font-size: 1.1em;
    padding: 18px 25px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000000;
    border-color: #000000;
    color: #000000;
    box-shadow: 0 0 15px rgba(0, 204, 204, 0.3);
}

.primary-btn:hover {
    background: #808080;
    border-color: #808080;
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(153, 0, 255, 0.4);
}

.age-btn { background: #4CAF50; border-color: #4CAF50; }
.work-btn { background: #FF9800; border-color: #FF9800; }
.health-btn { background: #F44336; border-color: #F44336; }
.food-btn { background: #795548; border-color: #795548; }

/* Secondary Action Buttons */
.action-btn {
    font-size: 0.95em;
    padding: 12px 18px;
    min-height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-color: #808080;
    color: #000000;
}

.action-btn:hover {
    background: #000000;
    color: #000000;
    transform: translateY(-2px);
}

.family-btn:hover { background: #E91E63; border-color: #E91E63; color: #000000; }
.education-btn:hover { background: #9C27B0; border-color: #9C27B0; color: #000000; }
.property-btn:hover { background: #607D8B; border-color: #607D8B; color: #000000; }
.shop-btn:hover { background: #FF5722; border-color: #FF5722; color: #000000; }

/* Special Buttons */
.special-btn {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    border-color: #FFD700;
    color: #000000;
    font-size: 1.2em;
    animation: none;
}

.magic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.6);
}

/* Job Selection */
.job-selection {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.job-selection h4 {
    color: #4CAF50;
    margin: 0 0 15px 0;
    text-align: center;
}

/* Quick Info */
.quick-info {
    font-size: 0.8em;
    color: #888;
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}

/* Job Selection Styling */
.job-grid button {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #000000;
    padding: 12px 15px;
    font-size: 0.9em;
}

.job-grid button:hover {
    background: #808080;
    border-color: #808080;
    color: #000000;
}

/* Property Options */
.property-option {
    background: #607D8B;
    border: 2px solid #607D8B;
    color: #000000;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
}

.property-option:hover {
    background: #000000;
    border-color: #808080;
    color: #000000;
    transform: translateY(-2px);
}

/* Family Tree Enhancements */
.family-tree {
    border-color: #E91E63;
}

.family-info {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.player-info, .children-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.children-list {
    list-style: none;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.children-list li {
    background: rgba(233, 30, 99, 0.1);
    border: 1px solid #E91E63;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    color: #000000;
}

.children-list li:hover {
    background: rgba(233, 30, 99, 0.2);
    transform: translateX(5px);
}

.family-stat {
    text-align: center;
    margin-top: 15px;
    font-size: 1.1em;
}

/* Hack Tools Section */
.hack-buttons-container {
    margin-top: 20px;
    border-radius: 10px;
    border: 1px solid #444;
    box-sizing: border-box;
}

.hack-title {
    margin: 0 0 10px 0;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px 8px 0 0;
    font-size: 1em;
    color: #888;
}

/* Streamlined Debug Tools */
.hack-buttons-container {
    margin-top: 20px;
    border-radius: 10px;
    border: 1px solid #444;
}

.hack-title {
    margin: 0 0 10px 0;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px 8px 0 0;
}

/* Enhanced Tooltips */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #000000;
    padding: 10px 15px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.85em;
    z-index: 2000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #808080;
    animation: none;
}

/* Streamlined UI Improvements */
.collapsible {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collapsible:hover {
    color: #808080;
    transform: translateY(-1px);
}

.collapse-arrow {
    transition: transform 0.3s ease;
    margin-left: 10px;
    font-size: 0.8em;
}

.collapsible.collapsed .collapse-arrow {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Subsection Styling */
.subsection {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.subsection-title {
    font-size: 1.2em;
    color: #808080;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Streamlined Section Organization */
.life-management, .advanced-section, .stats-section {
    border-left: 4px solid #000000;
}

.life-management {
    border-left-color: #808080;
}

.advanced-section {
    border-left-color: #666666;
}

.stats-section {
    border-left-color: #666;
}

/* Enhanced Button Styling */
.primary-btn {
    font-size: 1.1em;
    padding: 18px 25px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn {
    font-size: 0.95em;
    padding: 12px 18px;
    min-height: 45px;
}

/* Enhanced Button Effects */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

button:active::after {
    width: 300px;
    height: 300px;
}

.button-clicked {
    animation: buttonPress 0.15s ease;
}

@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Floating Numbers Animation */
.floating-number {
    position: absolute;
    color: #00cc00;
    font-weight: bold;
    font-size: 1.2em;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 2s ease-out forwards;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.floating-number.negative {
    color: #cc0000;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.2);
    }
}

/* Debug Tools Enhanced Styling */
.button-section:last-of-type {
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    border: 3px solid #666666;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.button-section:last-of-type h3 {
    color: #333333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

/* Special Debug Button Effects */
#god-mode-button {
    background: linear-gradient(45deg, #ffd700, #ffed4e) !important;
    border-color: #ffd700 !important;
    color: #000000 !important;
    animation: goldGlow 2s infinite alternate;
}

@keyframes goldGlow {
    0% { 
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); 
    }
    100% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); 
    }
}

#time-skip-button {
    background: linear-gradient(45deg, #9966cc, #cc66cc) !important;
    border-color: #9966cc !important;
    color: #ffffff !important;
}

#scenario-test-button {
    background: linear-gradient(45deg, #66ccff, #3399ff) !important;
    border-color: #66ccff !important;
    color: #000000 !important;
}

/* Accessibility Improvements */
button:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.progress-bar:focus-within {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Performance Optimizations */
.button-grid button {
    will-change: transform;
}

.progress-fill {
    will-change: width;
}

#face-emoji {
    will-change: transform;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .progress-section {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    #face-emoji {
        font-size: 60px;
    }
    
    .status-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Make sure the initial text paragraphs are well-styled too */
.container > p:not([id^="summary-"]):not([id^="event-"]):not([id$="-display"]) {
    color: #000000;
    font-size: 1.05em;
    margin-bottom: 15px;
}

/* Stock Market Panel */
#stock-market-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 12.5%; /* 1/8 of screen */
    min-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    border-left: 3px solid #808080;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow-y: auto;
    font-family: 'Courier New', 'Monaco', monospace;
    color: #000000;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f0f0f0;
    border-bottom: 2px solid #808080;
    position: sticky;
    top: 0;
    z-index: 10;
}

.stock-header h3 {
    margin: 0;
    color: #000000;
    font-size: 1.2em;
}

#close-stock-market {
    background: #ffcccc;
    border: 2px solid #cc0000;
    color: #000000;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

#close-stock-market:hover {
    background: #ffaaaa;
}

.portfolio-summary {
    padding: 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
}

.portfolio-summary p {
    margin: 5px 0;
    font-size: 0.9em;
    font-weight: bold;
}

#portfolio-value {
    color: #0066cc;
}

#available-cash {
    color: #006600;
}

#total-pnl.positive {
    color: #006600;
}

#total-pnl.negative {
    color: #cc0000;
}

.stocks-container {
    flex: 1;
    overflow-y: auto;
}

.stocks-list {
    padding: 10px;
}

.stock-item {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    margin-bottom: 10px;
    padding: 12px;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    align-items: center;
}

.stock-item .stock-mid {
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:6px;
}

/* sparkline canvas */
.stock-spark {
    width: 140px;
    height: 36px;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(250,250,250,0.6), rgba(245,245,245,0.6));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

/* stronger color styling for change */
.change.positive { color: #008800; font-weight: 700; }
.change.negative { color: #cc0000; font-weight: 700; }

.stock-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.stock-name {
    display: flex;
    flex-direction: column;
}

.stock-name strong {
    font-size: 1em;
    color: #000000;
}

.company-name {
    font-size: 0.7em;
    color: #666;
    margin-top: 2px;
}

.stock-price {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.price {
    font-size: 1em;
    font-weight: bold;
    color: #000000;
}

.change {
    font-size: 0.75em;
    font-weight: bold;
    margin-top: 2px;
}

.portfolio-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8em;
    color: #666;
}

.shares-owned {
    font-weight: bold;
}

.value {
    font-weight: bold;
    color: #0066cc;
}

.stock-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.buy-btn, .sell-btn {
    background: #e0e0e0;
    border: 1px solid #808080;
    color: #000000;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    flex: 1;
}

.buy-btn:hover {
    background: #ccffcc;
    border-color: #00cc00;
}

.sell-btn:hover:not(:disabled) {
    background: #ffcccc;
    border-color: #cc0000;
}

.sell-btn:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.amount-input {
    width: 40px;
    padding: 2px 4px;
    border: 1px solid #808080;
    text-align: center;
    font-size: 0.8em;
    color: #000000;
}

.market-news {
    position: sticky;
    bottom: 0;
    background: #f0f0f0;
    border-top: 2px solid #808080;
    padding: 10px;
}

.market-news h4 {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #000000;
}

#news-text {
    font-size: 0.8em;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

#stock-market-button {
    background-color: #e8f5e8;
    border-color: #4caf50;
    color: #000000;
}

#stock-market-button:hover {
    background-color: #d4f4d4;
    border-color: #388e3c;
}

/* Responsive adjustments for stock market */
@media (max-width: 1024px) {
    #stock-market-panel {
        width: 25%; /* 1/4 on smaller screens */
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    #stock-market-panel {
        width: 100%;
        height: 50vh;
        top: 50vh;
        border-left: none;
        border-top: 3px solid #808080;
    }
    
    .stock-actions {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .buy-btn, .sell-btn {
        min-width: 45px;
    }
    
    .amount-input {
        width: 35px;
    }
}

.secret-triggered {
    outline: 3px solid #ffd54f;
    transform: scale(1.02);
    transition: transform 0.12s ease, outline 0.12s ease;
}

#amazi-options {
    margin-top: 12px;
    padding: 12px;
    border: 2px dashed #808080;
    background: #fffdf6;
    text-align: left;
}

#amazi-options button {
    padding: 8px;
    font-size: 0.9em;
    border-radius: 4px;
    border: 1px solid #bdbdbd;
    background: #f6f6f6;
}

#creator-note {
    font-size: 0.95em;
    color: #333;
    margin: 8px 0 6px;
    text-align: center;
    font-style: italic;
}

#contributors {
    margin: 6px auto 14px;
    padding: 10px 14px;
    max-width: 420px;
    border: 1px solid #d0d0d0;
    background: #fafafa;
    border-radius: 4px;
    text-align: left;
    box-shadow: 1px 1px 6px rgba(0,0,0,0.04);
}

#contributors h4 {
    margin: 0 0 8px;
    font-size: 1em;
    text-decoration: underline;
    color: #000;
}

#contributors ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
    font-size: 0.95em;
}

#contributors li { margin-bottom:6px; }

/* Leaderboard styling */
#leaderboard-section { margin-top: 20px; }
#leaderboard-list div { background:#ffffff; }
#leaderboard-list div:nth-child(1) { border-left: 4px solid #ffd700; }
#leaderboard-list div:nth-child(2) { border-left: 4px solid #c0c0c0; }
#leaderboard-list div:nth-child(3) { border-left: 4px solid #cd7f32; }