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

body.bot-ui {
    background-color: #333;
    color: #fff;
    font-family: 'Digital-7 Mono', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.bot-ui .container {
    background-color: #c0c0c0;
    border: 5px solid #000;
    border-radius: 10px;
    padding: 1.5rem;
    width: 95%;
    max-width: 1200px;
}

.bot-ui .header, .bot-ui .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bot-ui h1 {
    font-family: 'Press Start 2P', cursive;
    color: #000;
    text-align: center;
    flex-grow: 1;
}

.bot-ui .timers {
    display: flex;
    gap: 20px;
}

.bot-ui .main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 1rem;
}

.bot-ui .left-panel, .bot-ui .right-panel, .bot-ui .bottom-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bot-ui .bottom-panel {
    flex-basis: 100%;
    flex-direction: row;
}

.bot-ui .window {
    background-color: #d3d3d3;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1rem;
    flex-grow: 1;
}

.bot-ui h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: #000;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.bot-ui label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: #000;
    margin-bottom: 0.5rem;
    display: block;
}

.bot-ui .led-text {
    background-color: #8bac0f;
    color: #0f380f;
    border: 2px solid #0f380f;
    border-radius: 3px;
    padding: 10px;
    font-family: 'Digital-7 Mono', sans-serif;
    font-size: 1.2rem;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.5);
}

.bot-ui textarea.led-text {
    width: calc(100% - 24px);
    height: 100px; /* Larger text area */
    resize: vertical;
}

.bot-ui input[type="number"].led-text {
     width: calc(100% - 24px);
}

.bot-ui #log-box, .bot-ui #trades-display {
    height: 150px;
    max-height: 150px; /* Prevent resizing */
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
}

/* --- Button Styles --- */
.bot-ui .controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Rectangular dark grey buttons */
.bot-ui .rect-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem; /* Smaller font */
    line-height: 1;
    text-align: center;
    background-color: #555;
    color: #fff;
    border: 2px solid #000;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 3px #333;
}
.bot-ui .rect-button:active {
    box-shadow: 0 1px #333;
    transform: translateY(2px);
}

/* Red circle stop button */
.bot-ui #stop-btn {
    background-color: #d81e1e;
    color: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem; /* Smaller font */
    cursor: pointer;
    box-shadow: 0 4px #7f0000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.bot-ui #stop-btn:active {
    box-shadow: 0 2px #7f0000;
    transform: translateY(2px);
}


.ghost {
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="%2339FF14" d="M8 0a8 8 0 0 0-8 8v8h16V8a8 8 0 0 0-8-8zm-3 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm6 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM4 12a1 1 0 0 1-1-1v-1h2v1a1 1 0 0 1-1 1zm4 0a1 1 0 0 1-1-1v-1h2v1a1 1 0 0 1-1 1zm4 0a1 1 0 0 1-1-1v-1h2v1a1 1 0 0 1-1 1z"/></svg>');
    position: fixed;
    bottom: 10px;
    animation: ghost-move 10s linear infinite;
    z-index: 9999;
}

@keyframes ghost-move {
    0% { left: -50px; }
    100% { left: 100%; }
}

/* Dark Mode Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    -webkit-appearance: none;
    appearance: none;
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #000;
}

.dark-mode .container {
    background-color: #000;
    border-color: #ff8c00;
}

.dark-mode .window {
    background-color: #1a1a1a; /* Charcoal */
    border-color: #ff8c00;
}

.dark-mode h1, .dark-mode h2 {
    color: #ff8c00; /* Bright Orange */
    border-bottom-color: #ff8c00;
}

.dark-mode .led-text {
    background-color: #1a1a1a; /* Charcoal */
    color: #ff8c00; /* Bright Orange */
    border-color: #ff8c00;
}

.dark-mode #wallet-address {
    color: #ff8c00;
}

/* Prize Pool Window */
.prize-pool-window {
    flex: 0.5;
    text-align: center;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 8px;
    background-color: #d3d3d3;
    margin-right: 20px;
}

.prize-pool-window h2 {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
}

.lights {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

.light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #000;
}

.light.red { background-color: #4b0000; }
.light.green { background-color: #003300; }

.light.red.flashing { animation: flash-red 1s infinite; }
.light.green.flashing { animation: flash-green 1s infinite; }

.prize-pool-text {
    height: 30px;
    overflow: hidden;
    position: relative;
}

.scroll-text {
    position: absolute;
    white-space: nowrap;
    animation: scroll-left 10s linear infinite;
}

@keyframes flash-red {
    0%, 100% { background-color: #ff1a1a; box-shadow: 0 0 5px #ff1a1a; }
    50% { background-color: #4b0000; box-shadow: none; }
}

@keyframes flash-green {
    0%, 100% { background-color: #39FF14; box-shadow: 0 0 5px #39FF14; }
    50% { background-color: #003300; box-shadow: none; }
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
