* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 0;
}

.header {
    background: #1a1a1a;
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.time-display {
    text-align: center;
}

.time-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.time-value {
    font-size: 28px;
    font-weight: bold;
    color: #4a9eff;
    font-family: 'Courier New', monospace;
}

.health-display {
    flex: 1;
    max-width: 300px;
}

.health-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.health-bar {
    width: 100%;
    height: 20px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff 0%, #2d5fb5 100%);
    width: 100%;
    transition: width 0.3s ease;
}

.health-value {
    font-size: 12px;
    color: #888;
}

.narrative-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.narrative-text {
    line-height: 1.6;
    font-size: 14px;
    color: #d0d0d0;
}

.dice-roll {
    background: #2a2a2a;
    border-left: 4px solid #4a9eff;
    padding: 12px;
    border-radius: 2px;
    font-size: 13px;
    margin-top: 12px;
}

.roll-result {
    color: #4a9eff;
    font-weight: bold;
}

.consequence {
    background: #2a2a2a;
    border-left: 4px solid #ff6b6b;
    padding: 12px;
    border-radius: 2px;
    font-size: 13px;
    margin-top: 8px;
}

.input-section {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: #1a1a1a;
    border-top: 1px solid #333;
}

#actionInput {
    flex: 1;
    padding: 12px 16px;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
    border-radius: 2px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#actionInput:focus {
    border-color: #4a9eff;
}

#submitButton {
    padding: 12px 24px;
    background: #4a9eff;
    color: #000;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

#submitButton:hover {
    background: #5aafff;
}

#submitButton:disabled {
    background: #666;
    cursor: not-allowed;
}

.game-over-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.game-over-modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #333;
    max-width: 500px;
}

.modal-content h2 {
    font-size: 32px;
    margin: 0 0 16px 0;
    color: #4a9eff;
}

.modal-content p {
    color: #b0b0b0;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

#restartButton {
    padding: 12px 32px;
    background: #4a9eff;
    color: #000;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}

#restartButton:hover {
    background: #5aafff;
}

