body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    margin-bottom: 20px;
}

h1, h2, h3 {
    color: #ffffff;
}

main {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

#controls, #log-container {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#controls {
    flex-basis: 30%;
}

#log-container {
    flex-basis: 70%;
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
}

#coin-input, #body-ratio-input, #avg-candles-input, #size-multiplier-input {
    padding: 8px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-radius: 4px;
    width: 60px; /* Set a fixed width for the number inputs */
    text-align: right;
}

#coin-input {
    text-align: left; /* Override for the coin input field */
}

.input-group label {
    margin-right: 10px;
    white-space: nowrap;
}

#mute-checkbox, #exclude-15m-checkbox {
    /* Custom styling to align the checkbox */
    width: 60px; /* Match the width of the inputs above */
    height: 20px;
    margin: 0;
    padding: 0;
    accent-color: #007bff; /* Optional: style the check color */
}


#coin-input {
    border-radius: 4px 0 0 4px;
    width: auto; /* Override fixed width for this specific input */
    flex-grow: 1;
}

#add-coin-btn {
    width: 78px; /* Match the total width of the number inputs (60px + 2*8px padding + 2*1px border) */
    padding: 8px 12px;
    border: 1px solid #007bff;
    background-color: #007bff;
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

#add-coin-btn:hover {
    background-color: #0056b3;
}

#tracked-coins-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

#tracked-coins-list li {
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #555; /* Default 'off' state */
    border-radius: 50%;
    transition: background-color 0.2s ease-in-out;
}

.status-dot.live {
    background-color: #28a745; /* 'Live' state */
}

.remove-coin-btn {
    padding: 4px 8px;
    border: none;
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.remove-coin-btn:hover {
    background-color: #c82333;
}

#alerts-display-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 450px; /* Or adjust as needed */
    overflow-y: auto;
}

.alert-card {
    background-color: #2c2c2c;
    border-left: 5px solid #007bff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    animation: slideInFromLeft 0.5s ease-out forwards;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-card h4 {
    margin: 0 0 5px 0;
    color: #00aaff;
    font-size: 1.1em;
}

.alert-card p {
    margin: 0;
    color: #d0d0d0;
    font-size: 0.95em;
}

/* ДОБАВЛЕНО: Стили для контейнера графика */
.chart-container {
    width: 100%;
    height: 220px;
    margin-top: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.log-box {
    height: 200px;
    overflow-y: auto;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #333;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9em;
}

#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-alert {
    background-color: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(100%);
    animation: slideIn 0.5s forwards, fadeOut 0.5s 4.5s forwards;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

footer {
    margin-top: 20px;
    text-align: center;
    color: #888;
}