body {
    font-family: "Courier New", Courier, monospace;
    background-color: black;
    color: #00FF00;
    margin: 0;
    padding: 20px;
    text-align: center;
    background-size: 20px 20px;
}

.container {
    max-width: 1600px; /* Increased from 800px */
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.8);
    border: 3px solid #00FF00;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px #00FF00, inset 0 0 5px #00FF00;
    display: flex;
    flex-direction: column; /* Added to ensure proper layout */
}

h1 {
    color: #FFFF00;
    text-shadow: 2px 2px #FF00FF, -2px -2px #00FFFF;
    font-size: 36px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

select,
button {
    width: 100%;
}

input {
    width: 100%;
    box-sizing: border-box;
}

select,
textarea,
input,
button {
    padding: 10px;
    margin: 10px 0;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    background-color: #000000;
    color: #00FF00;
    border: 2px solid #00FF00;
    border-radius: 5px;
}

textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    height: auto;
    resize: vertical;
    overflow-y: auto;
}

textarea::-webkit-scrollbar {
    width: 10px;
}

textarea::-webkit-scrollbar-track {
    background: #000080;
    border-radius: 5px;
}

textarea::-webkit-scrollbar-thumb {
    background: #00FF00;
    border-radius: 5px;
    border: 2px solid #000080;
}

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

/* For Firefox */
textarea {
    scrollbar-width: thin;
    scrollbar-color: #00FF00 #000080;
}

select:focus,
textarea:focus,
input:focus {
    outline: none;
    border-color: #FF00FF;
    box-shadow: 0 0 10px #FF00FF;
}

button {
    background-color: #008000;
    color: #FFFF00;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease-out;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: #FF00FF;
    color: #FFFF00;
    box-shadow: 0 0 15px #FF00FF;
}

button:active {
    transform: scale(0.95);
    box-shadow: 0 0 5px #FF00FF;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:active::after {
    animation: ripple 0.4s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }

    20% {
        transform: scale(25, 25);
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

th,
td {
    border: 1px solid #00FF00;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #008000;
    color: #FFFF00;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: rgba(0, 128, 0, 0.2);
}

#helpIcon {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    background-color: #FF00FF;
    color: #FFFF00;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s;
    border: 2px solid #FFFF00;
    text-shadow: 1px 1px #000000;
    overflow: hidden;
}

#helpIcon:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 0 20px #FFFF00;
}

#helpIcon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

#helpIcon:active::after {
    animation: ripple 0.4s ease-out;
}

#helpContent {
    display: none;
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #00FF00;
    padding: 15px;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 0 15px #00FF00;
}

#output,
#traceOutput {
    overflow-wrap: break-word;
    background-color: #000000;
    border: 2px solid #00FF00;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: inset 0 0 10px #00FF00;
}

#output {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#output:hover {
    background-color: #001100;
}

#traceOutput {
    overflow-wrap: break-word;
    background-color: #000000;
    border: 2px solid #00FF00;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: inset 0 0 10px #00FF00;
    font-family: 'Courier New', Courier, monospace;
}

#traceOutput h3 {
    color: #FFFF00;
    text-shadow: 2px 2px #FF00FF, -2px -2px #00FFFF;
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
}

.trace-tree {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.trace-line {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.trace-pc, .trace-depth {
    color: #888;
    margin-right: 10px;
}

.trace-gas {
    color: #00FFFF;
    min-width: 60px;
    margin-right: 10px;
}

.trace-op {
    color: #00FF00;
    min-width: 100px;
    margin-right: 10px;
}

.trace-arrow {
    color: #FF00FF;
    margin: 0 10px;
}

.trace-stack {
    color: #FFFF00;
}

.trace-tree li:nth-child(odd) {
    background-color: rgba(0, 128, 0, 0.1);
}

.trace-tree li:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.2);
}

.trace-memory, .trace-storage {
    color: #FFA500;
    margin-left: 10px;
}

.trace-error {
    color: #FF0000;
    font-weight: bold;
    margin-left: 10px;
}

#skeletonLoader {
    display: none;
}

.skeleton-line {
    height: 20px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #000000 25%, #008000 50%, #000000 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 5px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s steps(1) infinite;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 10px;
    }

    h1 {
        font-size: 28px;
    }

    #helpIcon {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 18px;
    }
}

@media (max-width: 1650px) { /* Added responsive breakpoint */
    .container {
        margin: 0 20px;
    }
}

#historyContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

#historyContainer>* {
    margin: 0 5px;
}

#historyContainer>*:nth-child(2) {
    margin-left: 0;
}

#historyContainer>*:last-child {
    margin-right: 0;
}

#networkInfo {
    margin-bottom: 16px
}

footer {
    max-width: 1600px; /* Increased from 800px */
    margin: 20px auto 0;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    border: 1px solid #00FF00;
}

footer p {
    color: #00FF00;
    font-size: 14px;
    margin: 0;
}

footer a {
    color: #FFFF00;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #FF00FF;
    text-decoration: underline;
}


.json-key {
    color: #d14;
}

.json-string {
    color: #4CAF50;
}

.json-number {
    color: #2980b9;
}

.json-boolean {
    color: #e67e22;
}

.json-null {
    color: #8e44ad;
}

/* Trace container styles */
.trace-container {
  margin-top: 20px;
  padding: 0px;
  border: none;
  background-color: rgba(0, 0, 0, 0.8);
  font-family: 'Courier New', Courier, monospace;
  overflow-x: auto;
}

.trace-container h3 {
  color: #FFFF00;
  text-shadow: 2px 2px #FF00FF, -2px -2px #00FFFF;
  font-size: 24px;
  margin-bottom: 15px;
  text-align: center;
}

.trace-tree {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.trace-line {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.trace-pc, .trace-depth {
  color: #888;
  margin-right: 10px;
}

.trace-gas {
  color: #00FFFF;
  min-width: 60px;
  margin-right: 10px;
}

.trace-op {
  color: #00FF00;
  min-width: 100px;
  margin-right: 10px;
}

.trace-arrow {
  color: #FF00FF;
  margin: 0 10px;
}

.trace-stack {
  color: #FFFF00;
}

.trace-tree li:nth-child(odd) {
  background-color: rgba(0, 128, 0, 0.1);
}

.trace-tree li:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.2);
}

.trace-container::-webkit-scrollbar {
  height: 10px;
}

.trace-container::-webkit-scrollbar-track {
  background: #000080;
  border-radius: 5px;
}

.trace-container::-webkit-scrollbar-thumb {
  background: #00FF00;
  border-radius: 5px;
  border: 2px solid #000080;
}

.trace-container::-webkit-scrollbar-thumb:hover {
  background: #00FFFF;
}

.trace-container {
  scrollbar-width: thin;
  scrollbar-color: #00FF00 #000080;
}

.trace-memory, .trace-storage {
  color: #FFA500;
  margin-left: 10px;
}

.trace-error {
  color: #FF0000;
  font-weight: bold;
  margin-left: 10px;
}

.main-output {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #00FF00;
}

.toggle-trace-view {
  background-color: #000080;
  color: #00FF00;
  border: 2px solid #00FF00;
  padding: 5px 10px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s;
}

.toggle-trace-view:hover {
  background-color: #00FF00;
  color: #000080;
}

.trace-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-family: 'Courier New', Courier, monospace;
}

.trace-table th {
  text-align: left;
  padding: 8px;
  background-color: #000080;
  color: #00FF00;
  font-weight: bold;
}

.trace-table td {
  padding: 8px;
  border-top: 1px solid #00FF00;
  border-bottom: 1px solid #00FF00;
}

.trace-table tr {
  background-color: rgba(0, 0, 0, 0.8);
}

.trace-table tr:hover {
  background-color: rgba(0, 128, 0, 0.2);
}

/* Color coding for different operation types */
.trace-table tr.op-push1,
.trace-table tr.op-push2,
.trace-table tr.op-push32 {
  background-color: rgba(0, 0, 255, 0.2);
}

.trace-table tr.op-mstore,
.trace-table tr.op-mload {
  background-color: rgba(255, 0, 255, 0.2);
}

.trace-table tr.op-sstore,
.trace-table tr.op-sload {
  background-color: rgba(255, 165, 0, 0.2);
}

.trace-table tr.op-call,
.trace-table tr.op-staticcall,
.trace-table tr.op-delegatecall {
  background-color: rgba(255, 255, 0, 0.2);
}

/* Depth indentation */
.trace-table tr[class^="depth-"] td:first-child {
  padding-left: calc(8px + var(--depth, 0) * 20px);
}

.trace-table tr.depth-0 { --depth: 0; }
.trace-table tr.depth-1 { --depth: 1; }
.trace-table tr.depth-2 { --depth: 2; }
.trace-table tr.depth-3 { --depth: 3; }
/* Add more depth levels as needed */

.trace-container pre {
  background-color: #000000;
  color: #00FF00;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
}