body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 2rem;
    margin: 0;
}

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

h1, h2 {
    color: #111;
    margin-top: 0;
}

h1 {
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

.card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.description {
    text-align: center;
    color: #666;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

.connection-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: #e60023; /* Tron Red */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    background-color: #b8001c;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#connectionStatus {
    font-weight: bold;
    padding: 0.5rem;
    background-color: #eee;
    border-radius: 4px;
    text-align: center;
}

textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    box-sizing: border-box; /* Important for 100% width */
}

textarea:read-only {
    background-color: #f8f8f8;
}

#logArea {
    background-color: #2d2d2d;
    color: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
}

/* Add these styles to your existing style.css file */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}

.form-grid label {
    font-weight: bold;
    margin-bottom: -0.25rem;
}

.form-grid input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* On wider screens, make the form two columns */
@media (min-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.75rem 1.25rem;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    margin-bottom: 1rem;
}

#broadcastResult {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    word-break: break-all;
    display: none; /* Hidden by default */
}

#broadcastResult.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#broadcastResult.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Toast notification styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    z-index: 10000;
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background-color: #28a745;
    border-left: 4px solid #1e7e34;
}

.toast-error {
    background-color: #dc3545;
    border-left: 4px solid #c82333;
}

.toast-warning {
    background-color: #ffc107;
    color: #212529;
    border-left: 4px solid #e0a800;
}

.toast-info {
    background-color: #17a2b8;
    border-left: 4px solid #138496;
}

/* Responsive adjustments for toast */
@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}