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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

h2 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #555;
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

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

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

.status-dot.connecting {
    background-color: #ffc107;
}

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

.status-dot.unsupported {
    background-color: #6c757d;
}

#status-text {
    font-weight: 500;
}

.device-info {
    text-align: center;
    margin-bottom: 16px;
    padding: 8px;
    background: #e9ecef;
    border-radius: 4px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn:hover:not(:disabled) {
    opacity: 0.9;
}

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

.btn-primary {
    background-color: #007bff;
    color: white;
}

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

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

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    background-color: #6c757d;
    color: white;
}

/* Auth Section Styles */
.auth-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.auth-section h2 {
    margin-bottom: 4px;
}

.otp-input-group {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.otp-input {
    flex: 1;
    padding: 12px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.otp-input:focus {
    outline: none;
    border-color: #007bff;
}

.auth-status {
    margin-top: 12px;
    padding: 8px;
    text-align: center;
    font-weight: 500;
    border-radius: 4px;
    min-height: 20px;
}

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

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

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

/* BLE Section Styles */
.ble-section {
    margin-bottom: 16px;
}

.session-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px;
    background: #d4edda;
    border-radius: 4px;
    color: #155724;
}

.session-valid {
    color: #28a745;
    font-weight: bold;
}

.log-section {
    margin-bottom: 16px;
}

.log-container {
    height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-bottom: 8px;
}

.log-entry {
    margin-bottom: 4px;
    padding: 2px 0;
}

.log-entry.info {
    color: #333;
}

.log-entry.success {
    color: #28a745;
}

.log-entry.error {
    color: #dc3545;
}

.log-entry.warn {
    color: #ffc107;
}

.info-section {
    text-align: center;
}

.help-text {
    font-size: 12px;
    color: #666;
}
