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

body {
    font-family: 'Courier New', monospace;
    background-color: #0a0a0a;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
}

#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* Map Container */
#map-container {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 15px;
    border-radius: 4px;
    z-index: 1001;
    max-width: 300px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

#map-display {
    margin-bottom: 10px;
}

#map-content {
    font-size: 11px;
    line-height: 1.3;
    color: #00ff00;
    white-space: pre;
    margin: 0;
    padding: 8px;
    background-color: #000000;
    border: 1px solid #00ff00;
    border-radius: 2px;
    min-height: 150px;
    font-family: 'Courier New', monospace;
}

/* Map location states */
#map-content {
    /* Current location will be ● (filled circle) */
    /* Visited locations will be ✓ (checkmark) */
    /* Available locations will be ○ (empty circle) */
    /* Locked locations will be · (middle dot) */
}

#map-legend {
    font-size: 8px;
    color: #00cc00;
    text-align: center;
    margin-top: 5px;
    padding: 5px;
    border-top: 1px solid #00ff00;
    line-height: 1.4;
}

.map-toggle-btn {
    width: 100%;
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 6px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.map-toggle-btn:hover {
    background-color: #00ff00;
    color: #000000;
}

/* ASCII Art Container - Top Section */
#ascii-art-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    border-bottom: 2px solid #00ff00;
    padding: 20px;
    overflow: auto;
    min-height: 40vh;
}

#ascii-art {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.2;
    color: #00ff00;
    white-space: pre;
    text-align: center;
    margin: 0;
}

/* Dialogue Container - Bottom Section */
#dialogue-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #0a0a0a;
    padding: 20px;
    overflow-y: auto;
    min-height: 40vh;
    scroll-behavior: smooth;
}

#dialogue-text {
    font-size: 16px;
    line-height: 1.6;
    color: #00ff00;
    margin-bottom: 20px;
    white-space: pre-wrap;
    /* Removed fadeIn animation - typewriter effect handles animation */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#choices-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    border-radius: 4px;
}

.choice-btn:hover {
    background-color: #00ff00;
    color: #000000;
    transform: translateX(5px);
}

.choice-btn:active {
    transform: translateX(5px) scale(0.98);
}

.choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.choice-btn-locked {
    border-color: #555;
    color: #888;
    background-color: #0a0a0a;
}

.choice-btn-locked:hover {
    background-color: #0a0a0a;
    color: #888;
    transform: none;
}

.choice-reason {
    color: #ffaa00;
    font-style: italic;
    font-size: 13px;
}

#warning-strip {
    background-color: #2a1a00;
    border: 1px solid #ffaa00;
    color: #ffcc66;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    border-radius: 3px;
    line-height: 1.5;
}

#warning-strip.hidden {
    display: none;
}

/* UI Controls */
#ui-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

#music-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#music-controls .control-btn {
    flex: 0 0 auto;
}

#stats-display {
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    padding: 15px;
    border-radius: 4px;
    min-width: 200px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Accordion Styles */
.accordion-section {
    margin-bottom: 8px;
    border: 1px solid #00ff00;
    border-radius: 4px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background-color: #1a1a1a;
    border: none;
    color: #00ff00;
    padding: 10px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: left;
}

.accordion-header:hover {
    background-color: #2a2a2a;
}

.accordion-header.active {
    background-color: #00ff00;
    color: #000000;
}

.accordion-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0 12px;
}

.accordion-content.active {
    max-height: 2000px;
    padding: 8px 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.stat-section-header {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 4px;
}

.stat-requirement {
    margin-left: 5px;
    font-size: 11px;
}

.requirement-met {
    color: #00ff00;
}

.requirement-close {
    color: #ffff00;
}

.requirement-missing {
    color: #ff0000;
}

.stat-header {
    justify-content: center;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: bold;
}

.stat-subheader {
    justify-content: center;
    margin-bottom: 12px;
    font-size: 11px;
    font-style: italic;
}

.stat-divider {
    height: 1px;
    background-color: #00ff00;
    margin: 8px 0;
    opacity: 0.3;
}

.stat-label {
    color: #00ff00;
}

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

#music-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: #00ff00;
    color: #000000;
}

#volume-slider {
    width: 100px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-content {
    text-align: center;
}

.loading-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.loading-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #00ff00;
}

.spinner {
    border: 4px solid #1a1a1a;
    border-top: 4px solid #00ff00;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Startup Screen */
#startup-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.startup-content {
    text-align: center;
    animation: fadeIn 1s ease-in;
}

.title-glow {
    font-size: 64px;
    color: #00ff00;
    text-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        0 0 30px #00ff00,
        0 0 40px #00ff00;
    margin-bottom: 20px;
    letter-spacing: 4px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        text-shadow: 
            0 0 10px #00ff00,
            0 0 20px #00ff00,
            0 0 30px #00ff00,
            0 0 40px #00ff00;
    }
    50% {
        text-shadow: 
            0 0 20px #00ff00,
            0 0 30px #00ff00,
            0 0 40px #00ff00,
            0 0 50px #00ff00,
            0 0 60px #00ff00;
    }
}

.subtitle {
    font-size: 20px;
    color: #00cc00;
    margin-bottom: 30px;
    font-style: italic;
}

/* Startup Auth Status */
.startup-auth-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 15px 30px;
    border: 2px solid #00ff00;
    border-radius: 8px;
    background-color: rgba(0, 255, 0, 0.05);
}

#startup-user-status {
    color: #00ff00;
    font-size: 14px;
}

#startup-user-status.logged-in {
    color: #ffff00;
}

.startup-auth-btn {
    background-color: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 10px 25px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.startup-auth-btn:hover {
    background-color: #00ff00;
    color: #000000;
    box-shadow: 0 0 15px #00ff00;
}

.startup-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.startup-btn {
    background-color: transparent;
    border: 3px solid #00ff00;
    color: #00ff00;
    padding: 15px 40px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.startup-btn:hover {
    background-color: #00ff00;
    color: #000000;
    box-shadow: 0 0 20px #00ff00;
    transform: scale(1.05);
}

.startup-btn:active {
    transform: scale(0.98);
}

/* Character Creation Screen */
#character-creation,
#stat-distribution,
#startup-naming,
#game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 40px;
}

.game-over-content {
    background-color: #1a1a1a;
    border: 3px solid #00ff00;
    padding: 40px;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.game-over-content h1 {
    font-size: 48px;
    color: #00ff00;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #00ff00;
}

#game-over-text {
    font-size: 18px;
    color: #00ff00;
    line-height: 1.8;
    margin-bottom: 40px;
    white-space: pre-wrap;
}

.character-creation-content {
    background-color: #1a1a1a;
    border: 3px solid #00ff00;
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.5s ease-in;
}

.character-creation-content h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #00ff00;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #00ff00;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 12px;
    color: #00cc00;
    margin-top: 5px;
    font-style: italic;
}

/* Stat Distribution */
.stat-distribution-content {
    background-color: #1a1a1a;
    border: 3px solid #00ff00;
    padding: 40px;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-in;
}

.stat-distribution-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(90vh - 200px);
    padding-right: 15px;
}

.stat-distribution-scrollable::-webkit-scrollbar {
    width: 8px;
}

.stat-distribution-scrollable::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.stat-distribution-scrollable::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

.stat-instructions {
    text-align: center;
    color: #00ff00;
    margin-bottom: 30px;
    font-size: 16px;
}

.stat-instructions span {
    color: #ffff00;
    font-weight: bold;
    font-size: 18px;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    border-radius: 4px;
}

.stat-row label {
    flex: 1;
    color: #00ff00;
    font-weight: bold;
    font-size: 14px;
}

.stat-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 20px;
}

.stat-btn {
    width: 35px;
    height: 35px;
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.stat-btn:hover:not(:disabled) {
    background-color: #00ff00;
    color: #000000;
}

.stat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stat-value {
    min-width: 40px;
    text-align: center;
    color: #ffff00;
    font-weight: bold;
    font-size: 18px;
}

.stat-range {
    color: #666;
    font-size: 12px;
    min-width: 60px;
    text-align: right;
}

.stat-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.stat-buttons .startup-btn {
    flex: 1;
    max-width: 250px;
}

/* Idea Selection Tabs */
.idea-selection-content {
    max-width: 900px;
    width: 100%;
}

.idea-selection-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: #00ff00;
    color: #000000;
}

.tab-btn.active {
    background-color: #00ff00;
    color: #000000;
}

#roll-startup-result,
#custom-builder {
    margin-top: 20px;
}

.roll-result-card,
.custom-builder-card {
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.roll-result-card h3,
.custom-builder-card h3 {
    color: #00ff00;
    margin-bottom: 15px;
}

.roll-again-btn,
.build-startup-btn {
    margin-top: 15px;
    margin-right: 10px;
}

.builder-section {
    margin-bottom: 20px;
}

.builder-section label {
    display: block;
    color: #00ff00;
    margin-bottom: 8px;
    font-weight: bold;
}

.builder-select {
    width: 100%;
    padding: 10px;
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 4px;
}

.builder-select:focus {
    outline: none;
    border-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.builder-preview {
    margin-top: 20px;
    padding: 15px;
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    border-radius: 4px;
}

.builder-preview h4 {
    color: #00ff00;
    margin-bottom: 10px;
}

.requirements {
    color: #ffff00;
    font-size: 12px;
    margin-top: 10px;
    font-style: italic;
    padding: 8px;
    background-color: rgba(255, 255, 0, 0.1);
    border-left: 3px solid #ffff00;
    border-radius: 2px;
}

.selection-card .requirements {
    margin-top: 15px;
}

/* Selection Screens */
#founder-selection,
#idea-selection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1500;
    padding: 40px;
    overflow-y: auto;
}

.idea-selection-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#idea-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 15px;
    padding-bottom: 20px;
}

#idea-options::-webkit-scrollbar {
    width: 8px;
}

#idea-options::-webkit-scrollbar-track {
    background: #0a0a0a;
}

#idea-options::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

#idea-options::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

#founder-selection h2,
#idea-selection h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: #00ff00;
    text-align: center;
}

#founder-options,
#idea-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    width: 100%;
}

.selection-card {
    background-color: #1a1a1a;
    border: 2px solid #00ff00;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.selection-card:hover {
    background-color: #00ff00;
    color: #000000;
    transform: scale(1.02);
}

.selection-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: inherit;
}

.selection-card p {
    font-size: 14px;
    line-height: 1.6;
    color: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
    #ascii-art {
        font-size: 8px;
    }

    #dialogue-text {
        font-size: 14px;
    }

    .choice-btn {
        font-size: 12px;
        padding: 12px 15px;
    }

    #ui-controls {
        position: relative;
        top: 0;
        right: 0;
        margin: 10px;
    }

    #stats-display {
        min-width: auto;
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* User Status */
#user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 2px solid #00ff00;
}

#user-status-text {
    color: #00ff00;
    font-size: 12px;
    font-weight: bold;
}

#user-status-text.logged-in {
    color: #ffff00;
}

/* Save/Load Modal */
#save-load-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-load-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.save-load-modal-content {
    position: relative;
    background-color: #1a1a1a;
    border: 3px solid #00ff00;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.save-load-modal-content h2 {
    color: #00ff00;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.save-slots {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.save-slot {
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.3s ease;
}

.save-slot:hover {
    border-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slot-name {
    color: #00ff00;
    font-weight: bold;
    font-size: 16px;
}

.slot-status {
    color: #666;
    font-size: 12px;
}

.slot-status.has-save {
    color: #ffff00;
}

.slot-details {
    color: #00cc00;
    font-size: 12px;
    margin-bottom: 10px;
    min-height: 20px;
}

.slot-action-btn {
    width: 100%;
    background-color: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
}

.slot-action-btn:hover {
    background-color: #00ff00;
    color: #000000;
}

.slot-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slot-action-btn.load-btn {
    border-color: #ffff00;
    color: #ffff00;
}

.slot-action-btn.load-btn:hover {
    background-color: #ffff00;
    color: #000000;
}

.save-info {
    text-align: center;
    color: #00cc00;
    font-size: 12px;
    margin-top: 15px;
}

/* Auth Modal */
#auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.auth-modal-content {
    position: relative;
    background-color: #1a1a1a;
    border: 3px solid #00ff00;
    padding: 40px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.auth-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: 2px solid #00ff00;
    color: #00ff00;
    width: 30px;
    height: 30px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.auth-close-btn:hover {
    background-color: #00ff00;
    color: #000000;
}

#auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-tab-btn {
    flex: 1;
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 12px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.auth-tab-btn:hover {
    background-color: #00ff00;
    color: #000000;
}

.auth-tab-btn.active {
    background-color: #00ff00;
    color: #000000;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    color: #00ff00;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    background-color: #0a0a0a;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #00cc00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.auth-error {
    color: #ff0000;
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 12px;
}

.auth-submit-btn {
    width: 100%;
    background-color: transparent;
    border: 3px solid #00ff00;
    color: #00ff00;
    padding: 15px 40px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-submit-btn:hover {
    background-color: #00ff00;
    color: #000000;
    box-shadow: 0 0 20px #00ff00;
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ===== Inline formatting in scene text ===== */
#dialogue-text strong,
#game-over-text strong {
    color: #ffff00;
    font-weight: bold;
}

#dialogue-text em,
#game-over-text em {
    color: #99ff99;
    font-style: italic;
}

#dialogue-text .quote,
#game-over-text .quote {
    display: inline-block;
    border-left: 3px solid #00cc00;
    padding-left: 10px;
    color: #99ff99;
}

.ending-title {
    color: #ffff00;
    font-size: 22px;
    margin: 0 0 16px 0;
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.5);
    white-space: normal;
}

.requirements.requirement-warning {
    color: #ffaa00;
    background-color: rgba(255, 170, 0, 0.1);
    border-left-color: #ffaa00;
}

/* ===== Tier 1: HUD, turn summary, choices, portraits, ending, toasts ===== */

#ascii-art-container {
    gap: 30px;
}

#portrait {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.2;
    color: #99ff99;
    white-space: pre;
    margin: 0;
    padding: 10px 14px;
    border-left: 1px solid rgba(0, 255, 0, 0.35);
    max-height: 100%;
    overflow: hidden;
}

#hud {
    position: sticky;
    top: -20px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 6px 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 3px;
    background-color: #0b1a0b;
    font-size: 13px;
    color: #99ff99;
}

.hud-item {
    cursor: help;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.hud-item.hud-danger {
    color: #ffaa00;
}

@keyframes bumpGood {
    0%   { color: #ffffff; text-shadow: 0 0 8px #00ff00; transform: translateY(-2px); }
    100% { color: inherit; text-shadow: none; transform: none; }
}

@keyframes bumpBad {
    0%   { color: #ff6666; text-shadow: 0 0 8px #ff0000; transform: translateY(2px); }
    100% { color: inherit; text-shadow: none; transform: none; }
}

.hud-item.bump-good { animation: bumpGood 1.2s ease-out; }
.hud-item.bump-bad  { animation: bumpBad 1.2s ease-out; }

#turn-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 12px;
}

.turn-label {
    color: #00cc00;
    margin-right: 4px;
}

.delta-chip {
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid;
    white-space: nowrap;
}

.delta-good    { color: #66ff66; border-color: #33aa33; background: rgba(0, 255, 0, 0.08); }
.delta-bad     { color: #ff7777; border-color: #aa3333; background: rgba(255, 0, 0, 0.08); }
.delta-neutral { color: #cccc66; border-color: #888833; background: rgba(255, 255, 0, 0.06); }

.band-line {
    flex-basis: 100%;
    color: #ffff00;
    font-style: italic;
    margin-top: 2px;
}

#skip-hint {
    margin-top: 10px;
    font-size: 11px;
    color: #4c9a4c;
    text-align: right;
}

.choice-key {
    display: inline-block;
    min-width: 20px;
    margin-right: 10px;
    padding: 0 5px;
    border: 1px solid currentColor;
    border-radius: 3px;
    font-size: 11px;
    text-align: center;
    opacity: 0.8;
}

.choice-btn:focus-visible,
.control-btn:focus-visible,
.startup-btn:focus-visible,
.slot-action-btn:focus-visible {
    outline: 2px solid #ffff00;
    outline-offset: 2px;
}

/* Founder archetype cards with portraits */
.founder-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    text-align: left;
}

.card-portrait {
    font-size: 9px;
    line-height: 1.15;
    color: #99ff99;
    margin: 0;
    white-space: pre;
    flex: 0 0 auto;
}

.card-body { flex: 1 1 auto; }

.card-skills {
    font-size: 12px;
    color: #cccc66;
    margin-top: 8px;
}

/* Ending screen */
#ending-screen {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background-color: #050505;
    overflow-y: auto;
    padding: 30px 16px;
}

.ending-content {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-in;
}

#ending-art {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.2;
    color: #00ff00;
    white-space: pre;
    text-align: center;
    margin: 0 auto 20px auto;
    overflow-x: auto;
}

#ending-title {
    font-size: 26px;
    color: #ffff00;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.6);
    margin-bottom: 18px;
    white-space: pre-wrap;
}

#ending-text {
    font-size: 16px;
    line-height: 1.6;
    color: #00ff00;
    white-space: pre-wrap;
    margin-bottom: 26px;
}

#ending-text strong { color: #ffff00; }
#ending-text em { color: #99ff99; }

.recap-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 26px;
}

.recap-block {
    flex: 1 1 300px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 4px;
    padding: 14px 16px;
    background-color: rgba(0, 30, 0, 0.35);
}

.recap-block h3 {
    color: #ffff00;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.recap-stat {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 2px 0;
    border-bottom: 1px dashed rgba(0, 255, 0, 0.15);
}

.recap-stat span:last-child { color: #ffff00; }

.recap-equity {
    margin-top: 10px;
    font-size: 13px;
}

.recap-equity pre {
    margin: 4px 0 0 0;
    color: #ffff00;
    font-family: 'Courier New', monospace;
}

.recap-decisions {
    list-style: none;
    font-size: 13px;
    line-height: 1.7;
}

.recap-decisions li::before {
    content: '▸ ';
    color: #00cc00;
}

.recap-endings {
    margin-top: 12px;
    font-size: 12px;
    color: #99ff99;
}

.ending-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3000;
    pointer-events: none;
    max-width: min(560px, calc(100vw - 32px));
}

.toast {
    background-color: #0f1f0f;
    border: 1px solid #00ff00;
    color: #ccffcc;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.25);
}

.toast-in { opacity: 1; transform: translateY(0); }
.toast-success { border-color: #66ff66; }
.toast-error { border-color: #ff5555; color: #ffcccc; background-color: #1f0f0f; }

/* Save slots */
.slot-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slot-delete-btn {
    background-color: #1a1a1a;
    border: 2px solid #aa3333;
    color: #ff7777;
    padding: 6px 10px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 4px;
}

.slot-delete-btn:hover {
    background-color: #aa3333;
    color: #000;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    #map-container {
        position: relative;
        top: 0;
        left: 0;
        max-width: none;
        margin: 8px;
    }

    #ascii-art-container {
        flex-direction: column;
        gap: 8px;
        min-height: 30vh;
    }

    #portrait {
        border-left: none;
        border-top: 1px solid rgba(0, 255, 0, 0.35);
        font-size: 8px;
    }

    #music-controls {
        flex-wrap: wrap;
    }

    .founder-card {
        flex-direction: column;
    }
}

/* ===== Tier 2: events ===== */
#event-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 10px;
    border: 1px solid #ffff00;
    border-radius: 3px;
    color: #ffff00;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: fadeIn 0.4s ease-in;
}

/* ===== Tier 4: gallery, seed, hard mode ===== */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.form-group-inline { flex: 1 1 200px; margin-bottom: 0; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffaa00;
    font-size: 13px;
    cursor: pointer;
    padding-bottom: 10px;
}

.startup-btn-secondary { opacity: 0.8; }

.endings-modal-content {
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
}

.ending-row {
    padding: 8px 10px;
    border-bottom: 1px dashed rgba(0, 255, 0, 0.2);
}

.ending-row-title { color: #ffff00; font-size: 13px; }
.ending-unseen .ending-row-title { color: #4c9a4c; }
.ending-row-hint { color: #99ff99; font-size: 12px; font-style: italic; }
.ending-unseen .ending-row-hint { color: #6a8a6a; }

.runs-title {
    margin-top: 18px;
    color: #ffff00;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.run-row {
    font-size: 11px;
    color: #99ff99;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(0, 255, 0, 0.15);
}

.recap-seed {
    margin-top: 6px;
    font-size: 12px;
    color: #99ff99;
}

.recap-seed .control-btn { padding: 2px 8px; font-size: 11px; margin-left: 6px; }

#endings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Title screen music toggle */
.startup-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
