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

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

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Screen Management */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.screen.hidden {
    display: none;
}

/* Menu Screens */
.menu-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.menu-container h1 {
    font-size: 2.5em;
    margin-bottom: 50px;
    text-align: center;
    text-shadow: 0 0 10px #0f0;
}

.menu-container h2 {
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px #0f0;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-btn {
    background-color: #000;
    color: #0f0;
    border: 2px solid #0f0;
    padding: 15px 40px;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.menu-btn:hover {
    background-color: #0f0;
    color: #000;
    box-shadow: 0 0 20px #0f0;
}

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

/* Selection Lists */
.selection-list {
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #0f0;
    padding: 10px;
}

.selection-item {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #0f0;
    cursor: pointer;
    transition: all 0.3s;
}

.selection-item:hover {
    background-color: #0f0;
    color: #000;
}

.selection-item-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.selection-item-info {
    font-size: 0.9em;
    opacity: 0.8;
}

.no-items-message {
    text-align: center;
    padding: 20px;
    opacity: 0.7;
}

/* Game Screen */
#game-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#output-section {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    line-height: 1.6;
    scroll-behavior: smooth;
    white-space: pre-wrap;
}

#input-section {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-top: 2px solid #0f0;
    background-color: #000;
}

.prompt {
    font-size: 1.2em;
    margin-right: 10px;
}

#command-input {
    flex: 1;
    background-color: transparent;
    border: none;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    outline: none;
}

/* Output Text Styles */
.output-line {
    margin-bottom: 10px;
}

.user-input {
    color: #0ff;
}

.game-output {
    color: #0f0;
}

.system-message {
    color: #ff0;
}

.error-message {
    color: #f00;
}

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

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #0f0;
    border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: #0c0;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background-color: #f00;
    color: #fff;
    padding: 15px 25px;
    margin-bottom: 10px;
    border: 2px solid #fff;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 1em;
    min-width: 300px;
    max-width: 500px;
    text-align: center;
    animation: slideDown 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
    pointer-events: auto;
}

.toast.warning {
    background-color: #ff0;
    color: #000;
    border-color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.toast.success {
    background-color: #0f0;
    color: #000;
    border-color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.toast.info {
    background-color: #0ff;
    color: #000;
    border-color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .menu-container h1 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .menu-container h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .menu-btn {
        padding: 12px 30px;
        font-size: 1em;
        min-width: 150px;
    }

    #output-section {
        padding: 15px;
        font-size: 0.9em;
    }

    #input-section {
        padding: 8px 15px;
    }

    #command-input {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .menu-container h1 {
        font-size: 1.5em;
    }

    .menu-btn {
        padding: 10px 25px;
        font-size: 0.9em;
    }

    #output-section {
        padding: 10px;
        font-size: 0.85em;
    }
}
/* Player Selection Screen */
.player-setup {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    width: 100%;
    max-width: 800px;
}

.add-player-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    border: 1px solid #0f0;
    border-radius: 5px;
}

.player-select,
#player-name-input {
    background-color: #000;
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    padding: 10px;
    outline: none;
}

.player-select:focus,
#player-name-input:focus {
    border-color: #0ff;
    box-shadow: 0 0 10px #0ff;
}

.or-divider {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin: 5px 0;
}

.selected-players {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #0f0;
    border-radius: 5px;
}

.selected-players h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.players-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #0f0;
    border-radius: 3px;
    background-color: #001100;
}

.player-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #0f0;
    flex-shrink: 0;
}

.player-name {
    flex: 1;
    font-size: 1em;
}

.player-order {
    font-size: 0.9em;
    color: #888;
}

.remove-player-btn {
    background: none;
    border: 1px solid #f00;
    color: #f00;
    font-size: 1.5em;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.remove-player-btn:hover {
    background-color: #f00;
    color: #000;
}

.player-setup-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.menu-btn.primary {
    background-color: #0f0;
    color: #000;
    font-weight: bold;
}

.menu-btn.primary:hover:not(:disabled) {
    background-color: #0ff;
}

.menu-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Turn Indicator */
#turn-indicator {
    padding: 10px 20px;
    background-color: #001100;
    border-top: 1px solid #0f0;
    border-bottom: 1px solid #0f0;
    font-size: 1em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.turn-player-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #0f0;
    display: inline-block;
}