body {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    position: relative;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    max-width: 800px;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, 
        rgba(10, 10, 10, 0.3), 
        rgba(21, 21, 21, 0.3), 
        rgba(26, 26, 26, 0.3), 
        rgba(18, 18, 18, 0.3));
    background-size: 400% 400%;
    animation: gradientBodyBG 20s ease infinite;
    z-index: -1;
}

#menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    width: auto;
    height: auto;
}

#menu-btn:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

#menu-dialog, #store-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

#menu-dialog.show, #store-dialog.show {
    display: flex;
}

#menu-dialog > div, #store-dialog > div {
    background: none;
    border: 1px solid rgba(224, 224, 224, 0.2);
    padding: 30px;
    border-radius: 15px;
    max-width: 90%;
    width: 400px;
}

.menu-options {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 35vh;
    overflow-y: auto;
}

.dialog-option {
    margin: 0;
}

.dialog-option select, 
.dialog-option button {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    min-height: 36px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dialog-option select:hover,
.dialog-option button:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

#game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, 
        rgba(10, 10, 10, 0.7), 
        rgba(15, 15, 15, 0.7), 
        rgba(12, 12, 12, 0.7), 
        rgba(18, 18, 18, 0.7));
    background-size: 400% 400%;
    animation: gradientGameBG 15s ease infinite;
    z-index: -1;
}

@keyframes gradientGameBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#story-text {
    flex: 1;
    margin: 100px 20px 20px 20px;
    padding: 20px;
    font-size: clamp(0.8rem, calc(1rem - 0.15vw * (var(--text-length) / 100)), 1.2rem);
    line-height: 1.6;
    border: none;
    background: none;
    border-radius: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-height: calc(60vh - 100px);
}

#story-text::-webkit-scrollbar {
    width: 8px;
}

#story-text::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

#story-text::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

#story-text::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.choices {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 35vh;
    overflow-y: auto;
}

.choice-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    min-height: 28px;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInChoice 0.5s ease forwards;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.choice-btn:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

@keyframes slideInChoice {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid #e0e0e0;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #e0e0e0; }
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    z-index: 2000;
}

#loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, 
        rgba(10, 10, 10, 0.7), 
        rgba(15, 15, 15, 0.7), 
        rgba(12, 12, 12, 0.7), 
        rgba(18, 18, 18, 0.7));
    background-size: 400% 400%;
    animation: gradientGameBG 15s ease infinite;
    z-index: -1;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.loader {
    flex: 1;
    margin: 80px 20px 20px 20px;
    padding: 20px;
    font-size: 1.2rem;
    line-height: 1.6;
    border: none;
    background: none;
    border-radius: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-height: calc(60vh - 100px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    width: 0%;
    height: 8px;
    background: linear-gradient(90deg, 
        rgba(150, 150, 255, 0.8),
        rgba(200, 200, 255, 0.9),
        rgba(150, 150, 255, 0.8));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(150, 150, 255, 0.5);
    border-radius: 20px;
    margin: 20px 0;
}

.progress-text {
    color: rgba(200, 200, 255, 0.9);
    font-size: 1em;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(150, 150, 255, 0.5);
}

#loading-screen h1 {
    color: rgba(220, 220, 255, 0.95);
    font-size: 3.5em;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow: 0 0 20px rgba(150, 150, 255, 0.6);
    animation: pulseTitle 2s ease-in-out infinite;
}

@keyframes pulseTitle {
    0% { text-shadow: 0 0 20px rgba(150, 150, 255, 0.6); }
    50% { text-shadow: 0 0 30px rgba(150, 150, 255, 0.8); }
    100% { text-shadow: 0 0 20px rgba(150, 150, 255, 0.6); }
}

.game-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Left align buttons */
    gap: 8px;
    max-height: 35vh;
    overflow-y: auto;
}

.game-buttons button {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    min-height: 36px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInButton 0.5s ease forwards;
}

.game-buttons button:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fadeInButton {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.game-buttons button:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Add fade transition for whole screen */
.fade-transition {
    animation: fadeTransition 1s ease-in-out;
}

@keyframes fadeTransition {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.please-wait-text {
    color: rgba(200, 200, 255, 0.6);
    font-size: 0.8em;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulsePlease 2s ease-in-out infinite;
}

@keyframes pulsePlease {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

#audio-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#audio-controls:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

#store-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: none;
    flex-direction: column;
    z-index: 1001;
}

#store-dialog.show {
    display: flex;
}

#store-dialog h2 {
    flex: 1;
    margin: 80px 20px 20px 20px;
    padding: 20px;
    font-size: 1.2rem;
    line-height: 1.6;
    border: none;
    background: none;
    border-radius: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-height: calc(60vh - 100px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-items {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 35vh;
    overflow-y: auto;
}

.store-item {
    border: 1px solid rgba(224, 224, 224, 0.2);
    background: transparent;
    padding: 8px 12px;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.store-item h3 {
    margin: 0 0 3px 0;
    font-size: 0.8rem;
    color: #e0e0e0;
}

.store-item p {
    margin: 0 0 6px 0;
    color: rgba(224, 224, 224, 0.7);
    font-size: 0.7rem;
}

.buy-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    width: 100%;
}

.buy-btn:hover:not(:disabled) {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

.buy-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(224, 224, 224, 0.1);
    color: rgba(224, 224, 224, 0.5);
}

#close-store {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 8px 12px;
    margin: 6px 0 0 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#close-store:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

#top-bar {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

#coins-display {
    position: fixed;
    bottom: auto;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 10px 20px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

#coins-display:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

#store-btn {
    background-color: #222;
    border: none;
    color: #e0e0e0;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Add responsive adjustments for smaller screens */
@media (max-height: 600px) {
    #story-text {
        max-height: 40vh;
        margin-bottom: 60px;
    }
    
    .choices {
        max-height: 35vh;
    }
}

/* Add responsive adjustments for larger screens */
@media (min-height: 900px) {
    #story-text {
        max-height: 50vh;
        margin-bottom: 80px;
    }
    
    .choices {
        max-height: 40vh;
    }
}

/* Add error message styling */
#error-message {
    display: none;
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ff6b6b;
    font-size: 0.9em;
}

#api-error-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.95);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #ff6b6b;
    color: #e0e0e0;
    text-align: center;
    z-index: 3000;
    max-width: 80%;
    display: none;
}

#api-error-dialog h2 {
    color: #ff6b6b;
    margin-bottom: 20px;
}

#api-error-dialog pre {
    background: rgba(255, 107, 107, 0.1);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
    text-align: left;
}

#api-error-dialog button {
    background-color: #ff6b6b;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

#api-error-dialog button:hover {
    background-color: #ff8787;
}

#timeline-dialog, #time-travel-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: none;
    flex-direction: column;
    z-index: 1001;
}

#timeline-dialog.show, #time-travel-dialog.show {
    display: flex;
}

#timeline-text, #time-travel-text {
    flex: 1;
    margin: 80px 20px 20px 20px;
    padding: 20px;
    font-size: 1.2rem;
    line-height: 1.6;
    border: none;
    background: none;
    border-radius: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-height: calc(60vh - 100px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-options, .time-points-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 35vh;
    overflow-y: auto;
}

.timeline-option-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    min-height: 36px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-option-btn:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

#prompt-input, #scenario-input, #choices-input {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 10px 0;
    resize: vertical;
    min-height: 100px;
}

#prompt-input::placeholder, #scenario-input::placeholder, #choices-input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

#prompt-dialog, #scenario-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: none;
    flex-direction: column;
    z-index: 1001;
}

#prompt-dialog.show, #scenario-dialog.show {
    display: flex;
}

#prompt-text, #scenario-input-text {
    flex: 1;
    margin: 80px 20px 20px 20px;
    padding: 20px;
    font-size: 1.2rem;
    line-height: 1.6;
    border: none;
    background: none;
    border-radius: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-height: calc(60vh - 100px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* QuantumCAT Console Dialog styles */
#quantum-console-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

#quantum-console-dialog.show {
    display: flex;
}

#console-content {
    background: none;
    border: 1px solid rgba(224, 224, 224, 0.2);
    padding: 30px;
    border-radius: 15px;
    max-width: 90%;
    width: 500px; /* Slightly wider for console feel */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#console-content h2 {
    margin: 0;
    text-align: center;
    color: #e0e0e0;
    font-size: 1.5em;
    letter-spacing: 2px;
}

#console-output {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(224, 224, 224, 0.1);
    color: #00ff00; /* Green text for console output */
    padding: 15px;
    height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border-radius: 8px;
    line-height: 1.4;
    white-space: pre-wrap; /* Preserve formatting for output */
}

#console-input {
    width: calc(100% - 20px); /* Adjust for padding */
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    resize: none; /* Disable resizing */
    height: 80px; /* Fixed height for input */
}

#console-input::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

#execute-console-btn, #close-console-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#execute-console-btn:hover, #close-console-btn:hover {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Error message in console output */
#console-output .error {
    color: #ff6b6b; /* Red text for errors */
}

#timeline-selection-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://wallpaperaccess.com/full/3352799.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: none;
    flex-direction: column;
    z-index: 1001;
}

#timeline-selection-dialog.show {
    display: flex;
}

#timeline-selection-text {
    flex: 1;
    margin: 80px 20px 20px 20px;
    padding: 20px;
    font-size: 1.2rem;
    line-height: 1.6;
    border: none;
    background: none;
    border-radius: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #444 #222;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-height: calc(60vh - 100px);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 35vh;
    overflow-y: auto;
}

.timeline-btn {
    background: transparent;
    border: 1px solid rgba(224, 224, 224, 0.2);
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInChoice 0.5s ease forwards;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-btn:hover:not(:disabled) {
    border-color: rgba(224, 224, 224, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.timeline-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.timeline-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(224, 224, 224, 0.1);
    color: rgba(224, 224, 224, 0.5);
}

.timeline-title {
    font-weight: bold;
    font-size: 0.8rem;
    color: #ffffff;
}

.timeline-description {
    color: rgba(224, 224, 224, 0.8);
    font-size: 0.65rem;
}

.timeline-difficulty {
    color: rgba(224, 224, 224, 0.6);
    font-size: 0.6rem;
}

.timeline-progress {
    color: rgba(150, 150, 255, 0.8);
    font-size: 0.6rem;
    font-weight: bold;
}

.timeline-status {
    color: rgba(100, 255, 100, 0.8);
    font-size: 0.6rem;
    font-weight: bold;
}

.timeline-btn.locked .timeline-status {
    color: rgba(255, 100, 100, 0.8);
}

#timeline-completion-display {
    position: absolute;
    top: 50px; /* Adjusted to be above story text */
    left: 20px;
    right: 20px;
    padding: 10px;
    color: rgba(200, 200, 255, 0.9);
    font-size: 0.9em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(150, 150, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(150, 150, 255, 0.2);
    z-index: 1;
    display: none; /* Hidden by default */
}