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

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

/* Screen Management */
.screen {
    display: none;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: block;
}

/* Main Menu */
#mainMenu {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#mainMenu.active {
    display: flex;
}

.ascii-logo {
    margin-bottom: 50px;
    animation: glow 2s ease-in-out infinite alternate;
}

.ascii-logo pre {
    font-size: 12px;
    line-height: 1;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

@keyframes glow {
    from { text-shadow: 0 0 10px #00ff00; }
    to { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

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

.menu-item {
    font-size: 18px;
    cursor: pointer;
    padding: 10px 20px;
    border: 1px solid #00ff00;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 300px;
}

.menu-item:hover {
    background-color: #00ff00;
    color: #000000;
    box-shadow: 0 0 15px #00ff00;
}

.cursor {
    animation: blink 1s infinite;
}

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

/* Cutscene Screen */
.cutscene-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 40px;
    text-align: center;
}

.cutscene-content {
    border: 2px solid #00ff00;
    padding: 40px;
    background: rgba(0, 255, 0, 0.05);
    max-width: 800px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cutscene-content h2 {
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 0 0 10px #00ff00;
}

.cutscene-content p {
    margin-bottom: 15px;
    font-size: 16px;
}

.cutscene-controls {
    display: flex;
    gap: 20px;
}

.cutscene-btn {
    background: #000000;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 15px 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
}

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

/* Dialogue Options */
.dialogue-options {
    margin-bottom: 20px;
    border: 1px solid #00ff00;
    padding: 15px;
    background: rgba(0, 255, 0, 0.02);
}

.dialogue-options h4 {
    margin-bottom: 15px;
    color: #00aaff;
    font-size: 14px;
}

.dialogue-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialogue-choice {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    transition: all 0.3s ease;
}

.dialogue-choice:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00aaff;
}

.dialogue-choice.trust-option {
    border-color: #00aa00;
    background: rgba(0, 170, 0, 0.05);
}

.dialogue-choice.trust-option:hover {
    background: rgba(0, 170, 0, 0.15);
    border-color: #00ff00;
}

.dialogue-choice.neutral-option {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.05);
}

.dialogue-choice.neutral-option:hover {
    background: rgba(255, 170, 0, 0.15);
    border-color: #ffdd00;
}

.dialogue-choice.suspicious-option {
    border-color: #aa0000;
    background: rgba(170, 0, 0, 0.05);
}

.dialogue-choice.suspicious-option:hover {
    background: rgba(170, 0, 0, 0.15);
    border-color: #ff0000;
}

/* Settings Menu */
#settingsMenu.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.settings-container {
    border: 2px solid #00ff00;
    padding: 40px;
    background-color: rgba(0, 255, 0, 0.05);
    min-width: 400px;
}

.settings-container h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    text-shadow: 0 0 10px #00ff00;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
}

.setting-item input[type="range"] {
    width: 100%;
    background: #000000;
    border: 1px solid #00ff00;
    height: 25px;
    appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff00;
    cursor: pointer;
}

.setting-item select {
    width: 100%;
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
}

/* Difficulty Selection Screen */
#difficultyScreen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.difficulty-container {
    border: 2px solid #00ff00;
    padding: 40px;
    background-color: rgba(0, 255, 0, 0.05);
    min-width: 600px;
    text-align: center;
}

.difficulty-container h2 {
    margin-bottom: 30px;
    font-size: 28px;
    text-shadow: 0 0 10px #00ff00;
}

.difficulty-options {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    gap: 30px;
}

.difficulty-option {
    border: 1px solid #00ff00;
    padding: 30px 20px;
    background-color: rgba(0, 255, 0, 0.03);
    flex: 1;
    transition: all 0.3s ease;
}

.difficulty-option:hover {
    background-color: rgba(0, 255, 0, 0.1);
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.difficulty-option h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #00ff88;
}

.difficulty-option p {
    margin-bottom: 10px;
    font-size: 14px;
    text-align: left;
}

.difficulty-option .menu-item {
    margin-top: 20px;
    font-size: 16px;
    cursor: pointer;
}

/* Game Screen */
#gameScreen {
    padding: 10px;
}

.timer {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border: 2px solid #00ff00;
    text-shadow: 0 0 10px #00ff00;
    z-index: 1000;
}

.difficulty-indicator {
    position: fixed;
    top: 10px;
    right: 20px;
    font-size: 14px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 15px;
    border: 1px solid #00ff00;
    color: #00ff00;
    z-index: 1000;
}

/* Character Selection */
.character-selection {
    margin-top: 60px;
    padding: 20px;
}

.character-selection h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 20px;
}

.character-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.character-card {
    border: 1px solid #00ff00;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 255, 0, 0.02);
}

.character-card:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.character-card.completed {
    border-color: #00aa00;
    background: rgba(0, 170, 0, 0.1);
}

.character-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.character-card p {
    margin-bottom: 5px;
    font-size: 14px;
}

.character-status {
    margin-top: 15px;
}

.status-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.status-bar span:first-child {
    width: 80px;
}

.trust-bar, .suspicion-bar {
    width: 150px;
    height: 15px;
    border: 1px solid #00ff00;
    margin: 0 10px;
    position: relative;
    background: #000000;
}

.trust-fill {
    height: 100%;
    background: #00ff00;
    transition: width 0.5s ease;
}

.suspicion-fill {
    height: 100%;
    background: #ff0000;
    transition: width 0.5s ease;
}

/* Conversation Interface */
.conversation-interface {
    margin-top: 60px;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.character-info {
    border-bottom: 1px solid #00ff00;
    padding: 20px;
}

.character-info h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.character-meters {
    display: flex;
    gap: 30px;
}

.meter-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.conversation-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.conversation-history {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #00ff00;
    padding: 15px;
    margin-bottom: 20px;
    background: rgba(0, 255, 0, 0.02);
    max-height: 400px;
}

.message {
    margin-bottom: 15px;
    padding: 8px;
    border-left: 3px solid #00ff00;
    padding-left: 15px;
}

.message.player {
    border-left-color: #00aaff;
    text-align: right;
    border-left: none;
    border-right: 3px solid #00aaff;
    padding-right: 15px;
    padding-left: 8px;
}

.message.system {
    border-left-color: #ffaa00;
    font-style: italic;
}

.input-area {
    display: flex;
    gap: 10px;
}

.input-area input {
    flex: 1;
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
}

.input-area button {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-area button:hover {
    background: #00ff00;
    color: #000000;
}

.conversation-controls {
    padding: 20px;
    border-top: 1px solid #00ff00;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversation-controls button {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.conversation-controls button:hover {
    background: #00ff00;
    color: #000000;
}

/* Minigame Container */
.minigame-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.minigame-content {
    border: 2px solid #00ff00;
    padding: 40px;
    background: #000000;
    max-width: 600px;
    width: 90%;
    text-align: center;
}

.minigame-content h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

#minigameArea {
    margin: 20px 0;
    min-height: 200px;
    border: 1px solid #00ff00;
    padding: 20px;
    background: rgba(0, 255, 0, 0.02);
}

.minigame-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.minigame-controls button {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.minigame-controls button:hover {
    background: #00ff00;
    color: #000000;
}

/* Final Hack Screen */
.final-hack-screen {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
}

.final-hack-screen h2 {
    margin-bottom: 30px;
    font-size: 24px;
    text-shadow: 0 0 15px #00ff00;
}

.hack-phase {
    border: 2px solid #00ff00;
    padding: 30px;
    margin-bottom: 20px;
    background: rgba(0, 255, 0, 0.02);
}

.hack-phase h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

#hackPhaseContent {
    margin: 20px 0;
    min-height: 200px;
    text-align: left;
}

#hackPhaseSubmit {
    background: #000000;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 15px 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s ease;
}

#hackPhaseSubmit:hover {
    background: #00ff00;
    color: #000000;
    box-shadow: 0 0 20px #00ff00;
}

.hack-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.progress-bar {
    width: 400px;
    height: 30px;
    border: 2px solid #00ff00;
    background: #000000;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #00ff00;
    transition: width 1s ease;
}

/* Game Over Screen */
#gameOverScreen.active {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.game-over-content {
    border: 2px solid #00ff00;
    padding: 40px;
    background: rgba(0, 255, 0, 0.05);
    max-width: 600px;
}

.game-over-content h2 {
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 0 0 15px #00ff00;
}

#gameOverMessage {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

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

.loading-spinner {
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#loadingText {
    font-size: 18px;
    text-shadow: 0 0 10px #00ff00;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: #000000;
    border: 1px solid #00ff00;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border: 1px solid #000000;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ascii-logo pre {
        font-size: 8px;
    }
    
    .character-list {
        gap: 15px;
    }
    
    .character-card {
        padding: 15px;
    }
    
    .character-meters {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-bar {
        width: 250px;
    }
    
    .hack-progress {
        flex-direction: column;
        gap: 10px;
    }
}