/* Prevent font flash */
@font-face {
    font-family: 'Ubuntu Mono';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: local('Ubuntu Mono'), local('UbuntuMono-Regular');
}

/* Fullscreen center layout */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #111;
    font-family: 'Ubuntu Mono', 'Courier New', Consolas, monospace;
    gap: 20px;
    opacity: 0;
    animation: fadeIn 0.1s ease-in forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Development mode banner */
.dev-mode-banner {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff6b35;
    color: #fff;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
    z-index: 1000;
}

.dev-indicator {
    color: #ffed4e;
    font-size: 1.2em;
    animation: pulse 2s infinite;
}

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

/* Sidebar */
.examples-sidebar {
    width: 240px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    color: #bbb;
    height: 80vh;
    box-sizing: border-box;
}

.examples-sidebar h3 {
    margin: 0 0 15px 0;
    color: #e6e6e6;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.examples-sidebar h3:not(:first-of-type) {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.examples-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.examples-sidebar li {
    margin-bottom: 8px;
}

.example-btn {
    width: 100%;
    padding: 8px;
    font-size: 0.8em;
    font-family: monospace;
    background: #333;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
}

.example-btn:hover {
    background: #444;
    color: #fff;
    border-color: #666;
    transform: translateX(2px);
}

.example-btn:active {
    background: #555;
}

/* Terminal container */
.terminal-container {
    width: 60vw;
    max-width: 900px;
    height: 80vh;
    background: #000;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header bar */
.terminal-header {
    background: #222;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
}

/* Title left side */
.terminal-title {
    color: #bbb;
    font-size: 0.95em;
}

/* Button group on the right */
.btn-group {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

/* Shared button styling */
.btn-group button {
    padding: 6px 14px;
    font-size: 0.9em;
    font-family: monospace;
    background: #444;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-group button:hover {
    background: #666;
    color: white;
}

/* Main content layout */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 1px;
    background: #333;
}

/* Output area */
#prompt {
    background-color: #000;
    flex: 2;
    padding: 10px;
    overflow-y: auto;
    color: #e6e6e6;
    font-size: 1.1em;
}

#output {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Stack visualization panel */
.stack-panel {
    flex: 1;
    background: #0a0a0a;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stack-header {
    background: #222;
    padding: 8px 10px;
    color: #888;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
}

.stack-viz {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

.stack-empty {
    color: #666;
    font-size: 0.9em;
    text-align: center;
    margin: auto;
}

.stack-item {
    background: #1a3a3a;
    border: 1px solid #2a5a5a;
    border-radius: 4px;
    padding: 12px;
    color: #5ac;
    text-align: center;
    font-weight: bold;
    min-width: 80px;
    transition: all 0.2s;
}

.stack-item:last-child {
    background: #2a4a5a;
    border-color: #4a7a9a;
    color: #8ef;
    box-shadow: 0 0 8px rgba(136, 238, 255, 0.2);
}

/* Input line */
#textbox {
    width: 100%;
    border: none;
    border-top: 1px solid #333;
    padding: 12px;
    font-size: 1.1em;
    color: #e6e6e6;
    background: #111;
    outline: none;
}

#textbox::placeholder {
    color: #555;
}

/* Overlay covering the screen */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.confirm-overlay.hidden {
    display: none;
}

/* Dialog box */
.confirm-box {
    background: #111;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 20px 30px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    max-width: 400px;
    color: #eee;
    font-family: monospace;
}

/* Message text */
#confirm-message {
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* Buttons */
.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.confirm-buttons button {
    padding: 6px 14px;
    font-size: 1em;
    font-family: monospace;
    background: #333;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.confirm-buttons button:hover {
    background: #555;
}

