@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #0f0f23;
    background-image:
        repeating-linear-gradient(0deg, rgba(0,255,0,0.03) 0px, transparent 1px, transparent 2px, rgba(0,255,0,0.03) 3px),
        repeating-linear-gradient(90deg, rgba(0,255,0,0.03) 0px, transparent 1px, transparent 2px, rgba(0,255,0,0.03) 3px);
    color: #00ff00;
    padding: 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#main-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#tagline {
    font-size: 8px;
    color: #00ff00;
    opacity: 0.6;
    margin: -5px 0 20px 0;
    text-shadow: 1px 1px 0 #003300;
}

#footer {
    position: fixed;
    bottom: 16px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 9px;
    color: #00ff00;
    opacity: 0.8;
    pointer-events: none;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0,0,0,0.12),
        rgba(0,0,0,0.12) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

body > * { position: relative; z-index: 2; }

h1 {
    color: #00ff00;
    font-size: 14px;
    text-shadow: 2px 2px 0px #003300, 4px 4px 0px rgba(0,255,0,0.2);
    padding: 14px 20px;
    border: 4px solid #00ff00;
    background-color: #001a00;
    box-shadow: inset 0 0 20px rgba(0,255,0,0.1), 0 0 10px rgba(0,255,0,0.3);
    margin: 0 0 20px 0;
    display: inline-block;
}

button {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px 12px;
    margin: 4px 3px;
    cursor: pointer;
    background-color: #001a00;
    color: #00ff00;
    border: 3px solid #00ff00;
    box-shadow: 3px 3px 0px #003300;
    transition: all 0.1s;
}

button:hover {
    background-color: #00ff00;
    color: #001a00;
    box-shadow: 0 0 12px rgba(0,255,0,0.6);
}

button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #003300;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

select {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px 10px;
    margin: 4px 3px;
    cursor: pointer;
    background-color: #001a00;
    color: #00ff00;
    border: 3px solid #00ff00;
    box-shadow: 3px 3px 0px #003300;
}

select:hover {
    box-shadow: 0 0 12px rgba(0,255,0,0.5);
}

input[type="text"], input:not([type]) {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px 10px;
    margin: 4px 3px;
    background-color: #001a00;
    color: #00ff00;
    border: 3px solid #00ff00;
    box-shadow: inset 0 0 8px rgba(0,255,0,0.15);
    outline: none;
    text-align: left;
    width: 220px;
}

input[type="text"]:focus, input:not([type]):focus {
    box-shadow: 0 0 12px rgba(0,255,0,0.5), inset 0 0 8px rgba(0,255,0,0.15);
}

input::placeholder { color: #005500; }

label {
    font-size: 10px;
    color: #00ff00;
    display: inline-block;
    margin-bottom: 4px;
}

p { margin: 10px 0; }

#controls { margin-top: 10px; }

#row-network {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

#row-actions {
    margin-top: 8px;
}

#row-separator {
    display: none;
    width: 180px;
    border-top: 1px solid #003300;
    margin: 14px auto 6px;
}

.logged-in #row-separator { display: block; }

#row-fields { display: none; }
#reviewMsig-btn { display: none; }
.auth-required { display: none; }

.logged-in #row-fields { display: block; }
.logged-in #reviewMsig-btn { display: inline-block; }
.logged-in .auth-required { display: inline-block; }
.logged-in .auth-required:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

footer, #output {
    font-size: 9px;
    color: #00cc00;
    margin-top: 10px;
    text-shadow: 0 0 4px rgba(0,255,0,0.4);
}

#log {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: #00bb00;
    text-align: left;
    display: inline-block;
    margin: 8px auto 0;
    padding: 8px 12px;
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 500px;
}
#log:not(:empty) {
    border-left: 3px solid #003300;
}

/* Modal */
#review-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#review-modal.open { display: flex; }

#review-modal-card {
    background: #0f0f23;
    border: 4px solid #00ff00;
    box-shadow: 0 0 40px rgba(0,255,0,0.4), inset 0 0 20px rgba(0,255,0,0.05);
    width: 90vw;
    max-width: 960px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 3px solid #00ff00;
    background: #001a00;
    flex-shrink: 0;
    font-size: 10px;
    color: #00ff00;
    text-shadow: 1px 1px 0 #003300;
}

#review-modal-body {
    margin: 0;
    padding: 16px;
    overflow: auto;
    text-align: left;
    font-size: 11px;
    font-family: 'Press Start 2P', cursive;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1;
    color: #00ff00;
    line-height: 1.9;
}

/* Scrollbar */
#review-modal-body::-webkit-scrollbar { width: 8px; }
#review-modal-body::-webkit-scrollbar-track { background: #001a00; }
#review-modal-body::-webkit-scrollbar-thumb { background: #00ff00; }
