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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

#status-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

#status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
}

.status-connected {
    background: #d4edda;
    color: #155724;
}

.status-disconnected {
    background: #f8d7da;
    color: #721c24;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-connected .status-dot {
    background: #28a745;
}

.status-disconnected .status-dot {
    background: #dc3545;
}

.status-waiting .status-dot {
    background: #ffc107;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

#qr-container {
    text-align: center;
    margin: 30px 0;
}

#qr-container h2 {
    color: #333;
    margin-bottom: 15px;
}

#qr-code {
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#qr-code img {
    max-width: 250px;
    height: auto;
}

#qr-container p {
    color: #666;
    margin-top: 10px;
}

.card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    color: #333;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-group small {
    display: block;
    color: #888;
    margin-top: 5px;
    font-size: 0.85rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

#send-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#contacts-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.contact-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #667eea;
}

.contact-item .name {
    font-weight: 600;
    color: #333;
}

.contact-item .number {
    color: #888;
    font-size: 0.9rem;
}

#controls {
    margin-top: 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    #qr-code img {
        max-width: 200px;
    }
}