* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

h2, h3 {
    color: #3498db;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

p {
    line-height: 1.6;
    margin-bottom: 1em;
}

.section {
    border-left: 5px solid #3498db;
    padding-left: 20px;
    margin: 30px 0;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin: 8px 4px;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none !important;
}

#qr-container {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 2px dashed #3498db;
    border-radius: 10px;
    max-width: 300px;
}

#qr-reader {
    margin: 20px 0;
    border: 2px solid #2ecc71;
    border-radius: 10px;
    overflow: hidden;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    margin: 10px 0;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

#log {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 10px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
}

#connection-status, #data-channel-status {
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
}

#connection-status {
    background: #ff7979;
    color: white;
}

#connection-status.connected {
    background: #2ecc71;
}

#data-channel-status {
    background: #f1c40f;
    color: #333;
}

#data-channel-status.open {
    background: #2ecc71;
    color: white;
}