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

body {
    overflow: hidden;
    background-color: #2d5016;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Courier New', Courier, monospace;
}

#gameCanvas {
    border: 2px solid #1a3010;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background-color: #4a7c2e;
}

#darknessOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    --darkness-level: 0;
    background: radial-gradient(circle 160px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0,0,0,0) 0%, rgba(0,0,0,var(--darkness-level)) 60%), rgba(0,0,0, var(--darkness-level));
    pointer-events: none;
    z-index: 999;
    transition: background 300ms linear, opacity 300ms linear;
}

#unifiedDialogue {
    position: fixed;
    bottom: 55px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
    max-width: 350px;
    max-height: 300px;
    overflow-y: auto;
    pointer-events: none;
    padding: 5px;
}

.dawg-message {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 2px;
    backdrop-filter: blur(2px);
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: lowercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
    margin-bottom: 0;
}

.dragon-message {
    background-color: rgba(139, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 2px;
    backdrop-filter: blur(2px);
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: rgba(255, 200, 100, 0.95);
    text-transform: lowercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    animation: slideIn 0.3s ease-out;
    margin-bottom: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#unifiedDialogue::-webkit-scrollbar {
    width: 4px;
}

#unifiedDialogue::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

#unifiedDialogue::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

#dawgDialogue {
    position: fixed;
    bottom: 55px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1001;
    max-width: 350px;
    max-height: 300px;
    overflow-y: auto;
    pointer-events: none;
    padding: 5px;
}

#dragonDialogue {
    position: fixed;
    bottom: 55px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1002;
    max-width: 350px;
    max-height: 300px;
    overflow-y: auto;
    pointer-events: none;
    padding: 5px;
}

#dawgDialogue::-webkit-scrollbar,
#dragonDialogue::-webkit-scrollbar {
    width: 4px;
}

#dawgDialogue::-webkit-scrollbar-track,
#dragonDialogue::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

#dawgDialogue::-webkit-scrollbar-thumb,
#dragonDialogue::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

#dawgDialogueText {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: lowercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

#dragonDialogueText {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: rgba(255, 200, 100, 0.95);
    text-transform: lowercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

#mrBobInput {
    position: fixed;
    bottom: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 2px;
    backdrop-filter: blur(2px);
    z-index: 1000;
}

.input-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: lowercase;
    letter-spacing: 1px;
}

.pixel-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    outline: none;
    padding: 2px 4px;
    width: 150px;
    text-transform: lowercase;
    image-rendering: pixelated;
}

.pixel-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pixel-input:focus {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.pixel-button {
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 3px 8px;
    cursor: pointer;
    text-transform: lowercase;
    transition: all 0.2s;
}

.pixel-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.pixel-button:active {
    background: rgba(255, 255, 255, 0.3);
}

#optionSelector {
    position: fixed;
    bottom: 15px;
    left: 15px;
    display: none;
    flex-direction: row;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 2px;
    backdrop-filter: blur(2px);
    z-index: 1000;
}

.option-button {
    font-family: 'Courier New', Courier, monospace;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 16px;
    cursor: pointer;
    text-transform: lowercase;
    transition: all 0.2s;
    text-align: center;
    min-width: 150px;
}

.option-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.option-button.selected {
    background: rgba(255, 255, 150, 0.3);
    border-color: rgba(255, 255, 200, 0.8);
    box-shadow: 0 0 8px rgba(255, 255, 150, 0.5);
}

.option-button:active {
    background: rgba(255, 255, 255, 0.3);
}
