/* Odysseus Trail - Retro Terminal Style */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Courier New', 'Courier', monospace;
    background: #000;
    color: #fff;
    min-height: 100vh;
    padding: 0;
    overflow-x: hidden;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    background: #000;
    min-height: 100vh;
    position: relative;
}

/* Terminal Borders - Pixel Art Style */
.terminal-border {
    height: 20px;
    background: #0000ff;
    border: 2px solid #000;
    position: relative;
}

.top-border::before,
.bottom-border::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #0000ff 0px,
        #0000ff 2px,
        #000080 2px,
        #000080 4px
    );
}

.top-border::after,
.bottom-border::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #0000ff 0px,
        #0000ff 8px,
        #000080 8px,
        #000080 10px
    );
}

/* Terminal Screen */
.terminal-screen {
    background: #000;
    color: #fff;
    padding: 20px;
    min-height: calc(100vh - 40px);
    font-size: 16px;
    line-height: 1.6;
}

/* Status Display */
.status-display {
    border: 2px solid #00ffff;
    padding: 10px;
    margin-bottom: 20px;
    background: #000;
    font-family: 'Courier New', monospace;
}

.status-line {
    margin: 5px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.status-line span {
    color: #00ffff;
}

.status-line span span {
    color: #fff;
    font-weight: bold;
}

#morale-value {
    color: #fff;
}

#morale-value.low {
    color: #ff0000;
}

#morale-value.medium {
    color: #ffff00;
}

#dead-count {
    color: #ff0000;
}

/* Progress Visual Bar */
.progress-visual {
    margin-top: 15px;
    padding: 10px 0;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 30px;
    margin: 10px 0;
}

.progress-dotted-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
    background: repeating-linear-gradient(
        to right,
        #00ffff 0px,
        #00ffff 4px,
        transparent 4px,
        transparent 8px
    );
}

.progress-ship {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    transition: left 0.5s ease;
    z-index: 10;
    font-size: 24px;
    filter: drop-shadow(0 0 5px #00ffff) drop-shadow(0 0 10px #00ffff);
    text-shadow: 0 0 10px #00ffff;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.progress-labels span:first-child {
    color: #00ffff;
}

.progress-labels span:last-child {
    color: #ffff00;
}

/* Terminal Text */
.terminal-text {
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    color: #fff;
}

.terminal-text p {
    margin: 2px 0;
    color: #fff;
}

/* Choices Display */
.choices-display {
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.choices-prompt {
    margin-bottom: 10px;
    color: #fff;
    font-weight: bold;
}

.choice-item {
    margin: 8px 0;
    padding-left: 20px;
    color: #fff;
    cursor: pointer;
    transition: color 0.2s;
}

.choice-item:hover {
    color: #00ffff;
}

.choice-item.active {
    color: #ffff00;
}

/* Input Prompt */
.input-prompt {
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cursor {
    color: #00ffff;
    animation: blink 1s infinite;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Event Log */
.event-log-terminal {
    margin-top: 30px;
    border-top: 2px solid #00ffff;
    padding-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.log-title {
    color: #00ffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.recent-event-terminal {
    color: #ffff00;
    margin-bottom: 10px;
    padding: 5px;
    background: rgba(0, 255, 255, 0.1);
    border-left: 3px solid #00ffff;
    padding-left: 10px;
}

.effects-summary {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    font-size: 12px;
    color: #888;
}

.effect-item {
    margin: 3px 0;
}

.effect-positive {
    color: #00ff00;
}

.effect-negative {
    color: #ff0000;
}

/* Motif Hint */
.motif-hint {
    margin: 15px 0;
    padding: 10px;
    border: 2px dashed #ffff00;
    color: #ffff00;
    font-style: italic;
    background: rgba(255, 255, 0, 0.1);
}

.motif-hint.hidden {
    display: none;
}

/* Terminal-style Yes/No Choice */
.yes-no-choice {
    margin: 20px 0;
    padding: 15px;
    border: 2px solid #00ffff;
    background: rgba(0, 255, 255, 0.05);
    font-family: 'Courier New', monospace;
}

.yes-no-choice.hidden {
    display: none;
}

.yes-no-text {
    color: #ffff00;
    margin-bottom: 15px;
    line-height: 1.6;
}

.yes-no-options {
    display: flex;
    gap: 30px;
    color: #00ffff;
    font-weight: bold;
}

.yes-no-options span {
    cursor: pointer;
    transition: color 0.2s;
}

.yes-no-options span:hover {
    color: #ffff00;
}

/* Game Over / Victory Screens */
.game-over-screen,
.victory-screen {
    text-align: center;
    padding: 40px;
    background: #000;
    border: 3px solid;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.game-over-screen {
    border-color: #ff0000;
}

.victory-screen {
    border-color: #00ff00;
}

.game-over-screen h2,
.victory-screen h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.game-over-screen h2 {
    color: #ff0000;
}

.victory-screen h2 {
    color: #00ff00;
}

.game-over-screen p,
.victory-screen p {
    font-size: 16px;
    line-height: 1.8;
    margin: 15px 0;
    color: #fff;
}

.stats-summary {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    text-align: left;
    display: inline-block;
}

.stats-summary h3 {
    color: #00ffff;
    margin-bottom: 15px;
}

.stats-summary p {
    font-size: 14px;
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-screen {
        padding: 15px;
        font-size: 14px;
    }

    .status-line {
        flex-direction: column;
        gap: 5px;
    }

    .choice-modal-content {
        padding: 20px;
    }

    .choice-modal-content p {
        font-size: 16px;
    }

    .choice-modal-buttons {
        flex-direction: column;
    }

    .choice-modal-btn {
        width: 100%;
    }
}

/* Scrollbar styling for terminal feel */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000;
    border: 1px solid #00ffff;
}

::-webkit-scrollbar-thumb {
    background: #00ffff;
    border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffff00;
}
