﻿:root {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f3f4f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #ffffff 0, transparent 35%), #f3f4f6;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 40px auto;
}

header {
    margin-bottom: 24px;
}

h1 {
    margin: 0 0 6px;
    font-size: 2rem;
}

.subtitle {
    margin: 0;
    color: #6b7280;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #9ca3af;
}

    .status-dot.connected {
        background: #22c55e;
    }

    .status-dot.reconnecting {
        background: #f59e0b;
    }

    .status-dot.disconnected {
        background: #ef4444;
    }

.status-text {
    font-weight: 600;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

    .card.full {
        grid-column: 1 / -1;
    }

    .card h2 {
        margin-top: 0;
        margin-bottom: 16px;
        font-size: 1.15rem;
    }

.description {
    margin-top: -8px;
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 0.9rem;
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input {
    flex: 1;
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font: inherit;
    text-transform: uppercase;
}

    input:focus {
        outline: none;
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    }

button {
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: #4f46e5;
    color: white;
}

    button:hover {
        background: #4338ca;
    }

    button.secondary {
        background: #e5e7eb;
        color: #111827;
    }

        button.secondary:hover {
            background: #d1d5db;
        }

    button.danger {
        background: #dc2626;
    }

        button.danger:hover {
            background: #b91c1c;
        }

    button.success {
        background: #16a34a;
    }

        button.success:hover {
            background: #15803d;
        }

.event-box {
    margin-top: 14px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.event-title {
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.85rem;
}

#log {
    min-height: 260px;
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    background: #111827;
    color: #e5e7eb;
    border-radius: 10px;
    font-family: Consolas, Monaco, monospace;
}

.log-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

@media (max-width: 760px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .card.full {
        grid-column: auto;
    }

    .container {
        width: min(100% - 20px, 1100px);
        margin: 20px auto;
    }
}
