* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    margin-bottom: 15px;
    font-size: 2em;
}

.connection-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.status.connected {
    background: #10b981;
    color: white;
}

.status.disconnected {
    background: #ef4444;
    color: white;
}

.socket-id {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    opacity: 0.9;
}

.tabs {
    display: flex;
    background: #f3f4f6;
    border-bottom: 2px solid #e5e7eb;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
}

.tab-button:hover {
    background: #e5e7eb;
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    padding: 30px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel {
    background: #f9fafb;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.panel h2 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1em;
    min-width: 200px;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.response-box, .message-box, .info-box, .log-box, .chat-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    padding: 15px;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
}

.log-box {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.chat-box {
    max-height: 500px;
    margin-bottom: 15px;
}

.message, .log-entry, .chat-message {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f3f4f6;
    border-left: 4px solid #667eea;
}

.chat-message {
    border-left-color: #10b981;
}

.message.received {
    border-left-color: #10b981;
}

.message.sent {
    border-left-color: #667eea;
}

.log-entry.info {
    border-left-color: #3b82f6;
}

.log-entry.success {
    border-left-color: #10b981;
}

.log-entry.error {
    border-left-color: #ef4444;
}

.log-entry.warning {
    border-left-color: #f59e0b;
}

.timestamp {
    font-size: 0.85em;
    color: #6b7280;
    font-style: italic;
}

.username {
    font-weight: bold;
    color: #667eea;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }

    .tab-button {
        font-size: 0.9em;
        padding: 12px 10px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group input {
        width: 100%;
    }
}
