/* style.css - Videogame retro aesthetic based on NES.css */

body {
    background-color: #0f0f1b;
    /* Dark synthwave blue */
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent scrolling */
}

#unsupported-warning {
    background-color: #e74c3c;
    color: white;
    padding: 40px;
    border: 4px solid #c0392b;
    text-align: center;
    max-width: 600px;
}

#app-container {
    display: flex;
    flex-direction: column;
    width: 98vw;
    height: 96vh;
    gap: 15px;
    max-width: 1600px;
}

#top-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px;
    height: 28%;
    min-height: 140px;
}

.top-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#bottom-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Important for flex child scrolling */
}

.full-height {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Reduced Font Sizes */
/* Reduced Font Sizes */
h1 {
    font-size: 22px;
    color: #4ade80;
    text-shadow: 2px 2px #000;
    text-align: center;
    margin-bottom: 8px;
    margin-top: 5px;
}

.nes-container.with-title>.title {
    font-size: 16px;
    margin-top: -2rem;
    padding: 0 10px;
}

.nes-btn {
    font-size: 12px;
    padding: 8px 12px;
}

.nes-input {
    font-size: 12px;
    padding: 8px;
}

p,
label,
span,
div {
    font-size: 12px;
}

/* Header */
header {
    text-align: center;
}

.pixel-logo {
    height: 55px;
    margin-bottom: 10px;
    image-rendering: pixelated;
}

/* Role Selector */
.role-selector {
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 0;
}

/* Connection Panel */
.connection-panel {
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 25px 20px 15px 20px;
    text-align: center;
}

.connect-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

#baud-display {
    color: #f1c40f;
    display: block;
    margin-bottom: 0;
}

.status-disconnected {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 0;
}

.status-connected {
    color: #2ecc71;
    font-weight: bold;
    margin-top: 0;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex-grow: 1;
}

/* Logs Container */
.logs-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-grow: 1;
    min-height: 0;
    padding-top: 10px;
}

.log-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 15px 15px 10px 15px;
}

.main-rx {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Terminal Text Area */
.terminal-text {
    flex-grow: 1;
    overflow-y: auto;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    line-height: 1.5;
    color: #2ecc71;
    background-color: #2c3136;
    /* Lighter than the container border/background */
    padding: 10px;
    border: 2px solid #000;
    word-break: break-all;
    margin-top: 5px;
}

.terminal-text.large-text {
    font-size: 12px;
    color: #4ade80;
}

.terminal-text::-webkit-scrollbar {
    width: 8px;
}

.terminal-text::-webkit-scrollbar-track {
    background: #000;
    border-left: 2px solid #333;
}

.terminal-text::-webkit-scrollbar-thumb {
    background: #4ade80;
}

/* Footer */
footer {
    text-align: center;
    color: #fff;
    font-size: 6px;
    line-height: 1.5;
    padding-top: 5px;
}

.nes-container.is-dark.with-title>.title {
    background-color: #212529;
    color: #fff;
}

/* Hide/Show */
.hidden {
    display: none !important;
}

.active-ui {
    display: flex;
}